One of the ways to break into the system is to use bad USBs and to use bad USBs you must know Arduino and the syntax of Arduino language is a bit difficult. But don't worry, we solved this problem to some extent, you can use 'rubyino' library and convert your ruby codes to arduino codes. In this method, you don't need to learn Arduino codes and you only need Arduino IDE to upload the codes. Let's get started.
how to install ?
- install with gem
gem install Rubyino
- install with git ( github page
git clone https://github.com/nimacpp/rubyino.git
cd rubyino
gem build rubyino.gemspec
gem install rubyino*.gem
Rubyino's functions
first you need include gem and then set value for it like this :
require "Rubyino"
app = Rubyino.new("namefile")
now you can work with Rubyino
functions on Rubyino
delay(timer sleep) :
app.delay(500)
print(print keyboard) :
app.print "hello world"
Enter(Enter key) :
app.enter
Window or cmd key + key :
win_pls "r" # win+r
and for translate codes to Arduino need ter
function like this :
app.ter
one Example for know that :
require "rubyino"
app = Rubyino.new("file")
app.delay(5000)
app.win_pls('r')
app.print "echo hello world"
app.enter
app.print "ls -a"
app.ter
save it and run it . script will create a file named file.ino for you .
Please open the file with the Arduino ide program and press the upload button to upload the script to the arduino
Top comments (0)