Maintenance notice: These forum archives are read-only, and will be removed shortly. Please visit our forums at their new location, https://www.evilmadscientist.com/forums/.

TTL pulses

edited December 2012 in General
Can the board can send and/or receive TTL (+5/0 V) style TTL pulses?

Comments

  • Hi Tina,
    What board are you asking about?
  • The Peggy 2 
  • Yes, you can use any available I/O pins for sending and/or receiving TTL pulses.
  • 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?



    Thanks


    Tina
  • 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_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.
  • edited December 2012
    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?




  • > 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.
  • edited December 2012
    Yes. Thank you, that was what I was trying to do.
Sign In or Register to comment.