![]() I picked 1 because when running for the first time the Processing program I could see that this was the entry matching the Serial Port used with my Arduino. MySerialPort = new Serial(this, Serial.list()1 ], 115200) You will notice these lines in the Processing program printArray(Serial.list()) // do this to find your arduino In your arduino IDE check which port your Arduino is connected to ![]() The keyPressed() function is called once every time a key is pressed.īefore this works you need to pick the right serial port MySerialPort = new Serial(this, Serial.list(), 115200) Open the port you are using at the rate you want: PrintArray(Serial.list()) // do this to find your arduino Then download Processing if you don't have it yet and load this sketch import rial.* if (incomingChar = 0) then no new char was received, otherwise later in the loop you still have the char received Load this in your UNO - don't open the serial console void setup() else incomingChar = 0 // not really needed but in case you want to do things in the loop upon receiving new chars. Write a little Processing program and just send l,u,r,d when you detect an arrow is pressed
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |