November 29, 2012 at 10:46 am #20137
Can the board can send and/or receive TTL (+5/0 V) style TTL pulses?
November 29, 2012 at 2:12 pm #21037
- This topic was modified 2 years, 6 months ago by Windell Oskay.
Hi Tina,What board are you asking about?November 30, 2012 at 10:33 am #21038
The Peggy 2November 30, 2012 at 1:43 pm #21039
Yes, you can use any available I/O pins for sending and/or receiving TTL pulses.November 30, 2012 at 4:33 pm #21040
Thanks Windell. I am trying to program via the matlab gui interface. I am just now having trouble calling the LEDs. On a regular arduino I can just call the pin, say if I had an array and light up the LED connected to it. How would I go about calling each individual LED? Is there a tutorial anywhere for this?ThanksTinaNovember 30, 2012 at 4:47 pm #21041
If you are writing a program on the Peggy 2, you can indeed use the standard commands– pinMode and digitalWrite –to take individual pins high or low. We also have a Peggy 2 library for Arduino that provides functions for lighting up individual LED locations. You can find the article about that– along with the rest of the Peggy 2 documentation –on our wiki: http://wiki.evilmadscientist.com/Peggy_2However, I’m guessing (and please let me know if this is the case) you’re asking about is not actually writing programs on the Peggy 2 in the usual way, but instead sending serial commands that are designed to work with Firmata firmware. If that is what you want to do, you’ll need to upload the Firmata program to the Peggy 2 before you use it, and use the commands supported by Firmata.December 2, 2012 at 6:08 pm #21042
I am trying to use MATLAB’s GUI interface to control the LEDs. So I guess my question is such: Using the arduino library you could address an LED via SetPoint(x, y). When I just use a simple array set up (not peggy) I would typically address the pin. Instead of digitalWrite, could I perhaps use SetPoint(x, y) in matlab since it is interfacing with Arduino?December 2, 2012 at 6:26 pm #21043
> Well, actually I am trying to use MATLAB’s GUI interface to control the LEDs.You did already say that, but it is actually as I was guessing, more or less: It’s not that you’re writing a program that runs on the Arduino, you’re using Matlab’s firmware on the Arduino, which is designed to interface with the Matlab GUI that you run. That firmware parses commands (a fairly limited set of commands) from the computer and then executes the corresponding command on the Arduino itself.If you want to add a SetPoint function that you can use within MatLab, extend the Matlab firmware by adding the Peggy 2 library to it, and calling the functions that you want to from within that firmware.December 2, 2012 at 7:47 pm #21044
Yes. Thank you, that was what I was trying to do.
- You must be logged in to reply to this topic.