We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When I run the test, I get the following output:
miniterm.rb:11:in `initialize': wrong number of arguments (5 for 1..2) (ArgumentError) from miniterm.rb:11:in `new' from miniterm.rb:11:in `<main>'
Does that make sense? It is trying to run:
sp = SerialPort.new(ARGV[0].to_i, ARGV[1].to_i, ARGV[2].to_i, ARGV[3].to_i, SerialPort::NONE)
but the new method is looking for 2 args, looking at api docs:
(SerialPort) new(port, *params)
The text was updated successfully, but these errors were encountered:
I know 5 years old but it seems a simple question that should have been answered
I got the same thing.
try replacing miniterm.rb with...
require "../serialport.so" require "rubygems" require "serialport" if ARGV.size < 4 STDERR.print <<EOF Usage: ruby #{$0} num_port bps nbits stopb EOF exit(1) end sp = SerialPort.new(ARGV[0], ARGV[1].to_i, ARGV[2].to_i, ARGV[3].to_i, SerialPort::NONE) open("/dev/tty", "r+") { |tty| tty.sync = true Thread.new { while true do tty.printf("%c", sp.getc) end } while (l = tty.gets) do sp.write(l.sub("\n", "\r")) end } sp.close
in lib/serialport type ruby ../../test/miniterm.rb "/dev/ttyACM0" 1200 8 1 or something. That worked for me.
lib/serialport
ruby ../../test/miniterm.rb "/dev/ttyACM0" 1200 8 1
Sorry, something went wrong.
No branches or pull requests
When I run the test, I get the following output:
Does that make sense? It is trying to run:
but the new method is looking for 2 args, looking at api docs:
(SerialPort) new(port, *params)
The text was updated successfully, but these errors were encountered: