Home › Evil Mad Scientist Forums › LED Matrix Kits › TTL pulses
- This topic has 8 replies, 2 voices, and was last updated 12 years ago by tnaik01.
-
AuthorPosts
-
November 29, 2012 at 10:46 am #20137tnaik01Participant
Can the board can send and/or receive TTL (+5/0 V) style TTL pulses?
- This topic was modified 6 years, 7 months ago by Windell Oskay.
November 29, 2012 at 2:12 pm #21037Windell OskayKeymasterHi Tina,
What board are you asking about?November 30, 2012 at 10:33 am #21038tnaik01ParticipantThe Peggy 2
November 30, 2012 at 1:43 pm #21039Windell OskayKeymasterYes, you can use any available I/O pins for sending and/or receiving TTL pulses.
November 30, 2012 at 4:33 pm #21040tnaik01ParticipantThanks 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 #21041Windell OskayKeymasterIf 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_2
However, 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 #21042tnaik01ParticipantI 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 #21043Windell OskayKeymaster> 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 #21044tnaik01ParticipantYes. Thank you, that was what I was trying to do.
-
AuthorPosts
- You must be logged in to reply to this topic.