Inscrit le: 29 Juil 2017
|Posté le: Lun 30 Oct - 12:40 (2017) Sujet du message: Sending char type to be read by arduino
I have been working in Processing (Java) up until now to create a program that presents a selection of images to a subject, waits for a mouse click (over the right image), then plays and audio file and sends a char type over usb to an arduino. This triggers one of a number of events involving some servo motors and other things which occur in sync with the audio file. There are a number of different events programmed on the arduino. It listens to the serial port and executes the code that is associated with the received character. The Processing program then waits the appropriate amount of time for the arduino to finish doing its thing (and the audio to stop), then it presents the next set of images. This repeats a number of times, till all trials are complete.
My question is whether or not I can use Presentation to accomplish this goal, and specifically whether or not I can send a char type to the arduino, defined as such on the arduino site: "A data type that takes up 1 byte of memory that stores a character value... You can see the specific encoding in the ASCII chart". You're probably well aware of that, but I'm somewhat new to this kind of thing and I want to be clear and thorough since I'm on a very tight schedule to get this done.
I didn't find the right solution from the Internet.