Skip to content

Instantly share code, notes, and snippets.

@smching
Last active March 5, 2016 05:18
Show Gist options
  • Save smching/176fcaa6def844ebd672 to your computer and use it in GitHub Desktop.
Save smching/176fcaa6def844ebd672 to your computer and use it in GitHub Desktop.
Wireless Router Remote Control Car
#!/usr/bin/lua
port= "/dev/ttyUSB0"
serialout= io.open(port,"w") --open serial port and prepare to write data
str= os.getenv("QUERY_STRING").."\r" -- get message from URL and terminate with carriage return(\r), eg. @2\r
serialout:write(str)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment