TTL pulses

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #20137
    tnaik01
    Participant

    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.
    #21037
    Windell Oskay
    Keymaster

    Hi Tina,

    What board are you asking about?
    #21038
    tnaik01
    Participant

    The Peggy 2 

    #21039
    Windell Oskay
    Keymaster

    Yes, you can use any available I/O pins for sending and/or receiving TTL pulses.

    #21040
    tnaik01
    Participant

    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
    #21041
    Windell Oskay
    Keymaster

    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.
    #21042
    tnaik01
    Participant

    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?




    #21043
    Windell Oskay
    Keymaster

    > 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.
    #21044
    tnaik01
    Participant

    Yes. Thank you, that was what I was trying to do.

Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.