
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
This gem is a prototyping API for Arduino in Ruby. Helps prototype Arduino programs quickly from the computer, without the need to burn to the board frequently.
gem install arduino
require "arduino"
#Arduino.new(port, baudrate)
board = Arduino.new("/dev/ttyUSB1")
Port is something like "/dev/ttyUSB0" on linux and COMx (COM1/COM2) on windows. Baudrate is optional. It is 115200 by default.
The output pins must be set explicitly.
#Arduino.output(list_of_output_pins)
board.output(10,11,13)
Digital I/O
Arduino.setHigh(pin)
Arduino.setLow(pin)
Arduino.getState(pin)
- returns true
if pin state is high, else it returns false
Analog I/O
Arduino.analogRead(pin)
- returns the analog valueArduino.analogRead(pin, value)
- sets the analog valueMisc
1.) Arduino.turnOff
- sets all the pins to low state
2.) Arduino.close
- closes serial connection. Using this makes sure that you won't have to disconnect & reconnect the Arduino again to recover the serial port.
# This is the blink program.
require "arduino"
#specify the port Baudrate is optional and set to 115200 by default
board = Arduino.new("/dev/ttyUSB1")
#declare output pins
board.output(13)
#perform operations
10.times do
board.setHigh(13)
sleep(1)
board.setLow(13)
sleep(1)
end
© 2010 Akash Manohar akash@akash.im under the MIT License
Thanks to the following people:
FAQs
Unknown package
We found that arduino demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.