We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Im trying to change the brightness of a LED. The brightness is controlled by a slider on my iPhone that communicates with Processing though OpenOSC. The slider sends values between 0 and 255. My idea is that OpenOSC communicates with Processing. Processing then communicates with Arduino though serial communication.
I managed to establish the connection between the iPhone and Processing. I also managed to make an Arduino code that works when i manually type the serial input. For some reason the whole thing doesn't work. I guess the problem is the serial communication between Processing and the Arduino.
Processing code:
Arduino code:
Answers
Screenshots can be slow to load, hard to read, and cannot be searched nor copy / pasted. Prefer pasting code and error messages in textual mode in your message. Don't forget to format the code using the C button or Ctrl+K on the selected text.
Thanks - Didn't knew how to format the code:
Arduino:
Processing:
My idea is that the problem is line 25 in the Processing code:
Arduino.write("val");
I would prefer the line to be this but then it gives an error:
Arduino.write(val);
Try:
Arduino.write(str(val));