Thread: Arduino project programming question

  1. #1
    Registered User
    Join Date
    Oct 2011
    Posts
    7

    Arduino project programming question

    Hey guys, I'm new here so... sup!
    Anyway, I have a question about an Arduino project I'm currently working on. The website said that it's based on C/C++ so I wasn't really sure where to post this I guess this'll do. Ok so I built this LED 24x6 Matrix (which can be found on instructables.com) for an engineering class. The board's purpose is to scroll words across and it was programmed using an Arduino board. We have to make it seem practical and I had an idea but I didn't know if this was even possible (or how to code it, I'm still a freshman). My idea was to have it display a headline on a website every time the website updates its main headline. So like if you go on nfl.com right now the main headline is "Farewell to Al" and that's what would scroll across on the LEDs. I was thinking maybe there was a way for the Arduino/program to scan the source code of the site and display whatever was in between certain tags, for example. Not sure if this is possible. Any help would be greatly appreciated! Thanks,

    ~Niko

    I'm not a programmer so this may sound like a ridiculous request. If it is, can you please just drop a comment and let me know so I don't get my hopes up? lol
    Last edited by qtip2293; 10-10-2011 at 01:27 PM.

  2. #2
    Registered User
    Join Date
    Dec 2006
    Location
    Canada
    Posts
    3,229
    Arduino language is basically C++, so this forum is good.

    That is certainly possible, but just like all things in programming and engineering, start small, and build up. A very common beginner mistake is to be too ambitious, and end up not having anything working (I know because I just finished my first year engineering a few years ago, and I was exactly like that).

    Do you have scrolling a constant string working already?

  3. #3
    Registered User
    Join Date
    Oct 2011
    Posts
    7
    Yepp, we have a fully functional program. I'm just trying to play around with it and go above and beyond.

  4. #4
    Registered User
    Join Date
    Dec 2006
    Location
    Canada
    Posts
    3,229
    That is great!

    Will the Arduino be connected to a PC, or would it talk to the internet directly (through an Ethernet shield, for example)? It's a lot easier to go through the PC.

  5. #5
    Registered User
    Join Date
    Oct 2011
    Posts
    7
    Connected straight to a Mac via USB

  6. #6
    Registered User
    Join Date
    Dec 2006
    Location
    Canada
    Posts
    3,229
    Ok. So now there are a few things you need to do -

    1. make the Arduino talk to the Mac through USB (virtual serial port)
    2. have the Arduino scroll whatever comes from the serial port (for all intents and purposes, the USB port is a serial port to both the Mac and the Arduino)
    3. write a program on the Mac that reads the site you want, parse it, find the string you are looking for, and sends it over the serial port

    In that order.

    So first, you'll need to figure out how to access a serial port on the Mac (there should be plenty of tutorials for that), and then you'll need to figure out how to access the serial port on an Arduino (the Serial class in Arduino library).

  7. #7
    Registered User
    Join Date
    Oct 2011
    Posts
    7
    Hmm. Ok well the thing is, they give us absolutely no knowledge on any of this stuff before we build it. So we're literally following schematics and praying that it works after we're done which is pointless if we're not grasping the concept. Do you mind explaining the first two steps a little more? Thanks a lot for the reply by the way I didn't think anyone would help.

  8. #8
    Registered User
    Join Date
    Dec 2006
    Location
    Canada
    Posts
    3,229
    Ah I see. This is not an easy task. It's very good that you are seeking knowledge by doing extra, but if you didn't have prior programming experience, this is probably aiming a little too far for now. In particular, to do step 3, you need to figure out how to use an external library, and how to do simple parsing (pattern matching, string manipulation). A more practical goal may be, for example, to have the user type a string on the Mac, and have it displayed on the LEDs.

    Anyways, accessing the serial port on the Mac would depend on the language. Do you have a preferred language for Mac programming?

  9. #9
    Registered User
    Join Date
    Oct 2011
    Posts
    7
    I guess C++? Lol maybe a lack of knowledge is a reason to change my goals a little bit. If I were you I wouldn't spend too much time trying to figure this out because it would probably be over my head anyway. Thanks for the help, maybe I'll still try to play around with it and see what happens!

  10. #10
    Registered User
    Join Date
    Dec 2006
    Location
    Canada
    Posts
    3,229
    Maybe something like having the user press different buttons for different messages?

  11. #11
    Registered User
    Join Date
    Oct 2011
    Posts
    7
    Sure, that'll work. Any sort of modification will get us points we just have to find a practical use for it.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Programming project
    By Eman in forum General Discussions
    Replies: 1
    Last Post: 04-06-2011, 10:27 AM
  2. moving multiple servos through Arduino board
    By cross-side in forum C Programming
    Replies: 26
    Last Post: 02-17-2011, 11:08 PM
  3. Arduino programming
    By Terese in forum C++ Programming
    Replies: 5
    Last Post: 12-11-2010, 01:03 PM
  4. plz help me in my c programming project
    By fifi25 in forum C Programming
    Replies: 2
    Last Post: 11-04-2010, 07:39 AM
  5. C Programming Project Help!!!
    By Neildadon in forum C Programming
    Replies: 1
    Last Post: 05-21-2002, 12:42 PM

Tags for this Thread