Created
May 3, 2018 15:24
-
-
Save ninp0/6813a290ffd20ecbc51cce57880f592e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Code for Teensy text to Morse is Located Here: https://github.com/ninp0/teensy_text_to_morse | |
$ csi | |
csi[v0.2.840]:001 >>> CSI::Plugins::Serial.help | |
USAGE: | |
serial_obj = CSI::Plugins::Serial.connect( | |
block_dev: 'optional serial block device path (defaults to /dev/ttyUSB0)', | |
baud: 'optional (defaults to 9600)', | |
data_bits: 'optional (defaults to 8)', | |
stop_bits: 'optional (defaults to 1)', | |
parity: 'optional (defaults to SerialPort::NONE)', | |
flow_control: 'optional (defaults to SerialPort::NONE)' | |
) | |
line_state = CSI::Plugins::Serial.get_line_state( | |
serial_obj: 'required serial_obj returned from #connect method' | |
) | |
modem_params = CSI::Plugins::Serial.get_modem_params( | |
serial_obj: 'required serial_obj returned from #connect method' | |
) | |
CSI::Plugins::Serial.request( | |
serial_obj: 'required serial_obj returned from #connect method', | |
request: 'required string to write to serial device' | |
) | |
CSI::Plugins::Serial.response( | |
serial_obj: 'required serial_obj returned from #connect method' | |
) | |
session_data_arr = CSI::Plugins::Serial.dump_session_data | |
CSI::Plugins::Serial.flush_session_data | |
CSI::Plugins::Serial.disconnect( | |
serial_obj: 'required serial_obj returned from #connect method' | |
) | |
CSI::Plugins::Serial.authors | |
=> nil | |
csi[v0.2.840]:002 >>> serial_obj = CSI::Plugins::Serial.connect(block_dev: '/dev/ttyACM0') | |
=> {:serial_conn=>#<SerialPort:fd 11>, | |
:session_thread=> | |
#<Thread:0x000055d7ae0a6208@/usr/local/rvm/gems/ruby-2.5.1@csi/gems/csi-0.2.840/lib/csi/plugins/serial.rb:92 sleep>} | |
csi[v0.2.840]:003 >>> CSI::Plugins::Serial.request(serial_obj: serial_obj, request: 'Tune in Tokyo!') | |
=> 14 | |
csi[v0.2.840]:004 >>> hist | |
1: CSI::Plugins::Serial.help | |
2: serial_obj = CSI::Plugins::Serial.connect(block_dev: '/dev/ttyACM0') | |
3: CSI::Plugins::Serial.request(serial_obj: serial_obj, request: 'Tune in Tokyo!') | |
csi[v0.2.840]:005 >>> hist --save 2..3 /tmp/text_to_morse_tune_in_tokyo.rb | |
Saving history in /tmp/text_to_morse_tune_in_tokyo.rb... | |
History saved. | |
csi[v0.2.840]:006 >>> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment