We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hi everybody I'm verry new with processing an I really need some help. I want to read 3 Text files which countains numbers from 0 to 100. I want to send this values to my arduino. I have also 3 LEDs and I want them to light up with the value it's getting from the Text file. So bassically I want that each LED showing the graph of one text file. Can somebody pleas help me? I know there are many examples but none of these is doing the exact thing I'm looking for. It would be grat if somebody could post a code here. Thank you verry much! You're really doing me a favour!!
Answers
Can you read a text file in Processing? You can use loadStrings() or loadTable()
Can you talk to your arduino? Based on the data you get from the text file, you could send the data directly or you could send some data token based on the information on the source text file. Let's say your source file provides values from 0 to 1024 and your arduino has an 10 bit resolution ADC (just for convenience). Then you read the data and then you send it to your arduino directly. If you are using digital pins, then you can light up the LED if your data is above 512 or turn it off if it is below it.
Two post that could be relevant to you:
https://forum.processing.org/two/discussion/16618/processing-with-arduino-void-serialevent#Item_1
https://forum.processing.org/two/discussion/22677/issue-when-displaying-data-from-a-text-file-to-a-8x8-led-matrix#latest
Kf