Theshadowwalker91 0 Posted November 28, 2011 Share Posted November 28, 2011 what i want to do is have an arduino send serial data to multiple msp430 launchpads. so that when the msp430 gets a certain message it will start doing a pattern and it will take care of light control while the arduino can do other things. any helpp would be appreciated. i also posted on the Arduino forum about this. what i need help with is reading serial data sent from the arduino and then doing a task based on the data. i am doing a Multi-drop set up with about 7 430s and one arduino mega. each 430 will be controlling 8 rgb leds via shift registers here is a rough idea on the data that will be sent from the arduino Serial1.print ('<'); //start Serial1.print ('5'); // address Serial1.print ("001"); // Foreground is Blue Serial1.print ("010"); // Background is Green Serial1.print ("100"); // Marker is Red Serial1.print ('>'); // end any help would be great. Quote Link to post Share on other sites
bluehash 1,581 Posted November 28, 2011 Share Posted November 28, 2011 You can build up a parser. Look at the SD card code here. It uses Rickta's serial code and the parser from the Petite FatFs example from elmChan. Quote Link to post Share on other sites
Theshadowwalker91 0 Posted December 1, 2011 Author Share Posted December 1, 2011 sorry but how would that help me. Quote Link to post Share on other sites
zeke 693 Posted December 1, 2011 Share Posted December 1, 2011 It means this: Step 1: Copy his code Step 2: Adapt it to your needs by writing new functions Step 3: ... Step 4: PROFIT! Quote Link to post Share on other sites
Theshadowwalker91 0 Posted December 1, 2011 Author Share Posted December 1, 2011 ya but i am not trying to do anything with an sd card. also i do not need to send data back to the arduino. i just need the msp to realize there is data coming in read it and if it is meant for that msp then do something based on the data and if it is not meant for that msp then to just ignore it. Quote Link to post Share on other sites
Rickta59 589 Posted December 2, 2011 Share Posted December 2, 2011 i just need the msp to realize there is data coming in read it and if it is meant for that msp then do something based on the data and if it is not meant for that msp then to just ignore it. Sounds like your best bet would be the code in the link below written by oPossum. It is compact and provides blocking reads: http://www.43oh.com/forum/viewtopic.php?f=10&t=1727 -rick Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.