L.R.A 78 Posted June 10, 2014 Share Posted June 10, 2014 Hi guys i bring more bugs So i was trying to send data by serial to my launchpad and i was feeling lazy so i use energia Serial. Problem is Serial.available doesn't seem to work. I try to send for example the number 256 and serial available just returns 2 istead of 3, but after i empty it, sundedly there's the 3rd byte and Serial.available returns 1 (it's not the number 5, it's realy the 6). So i'm going to try to check what the problem is but i realy never worked with the UART so if anyone could help it would be apreciated Quote Link to post Share on other sites
energia 485 Posted June 17, 2014 Share Posted June 17, 2014 @L.R.A can you please post the Sketch you used. I try to send for example the number 256 and serial available just returns 2 istead of 3, but after i empty it, sundedly there's the 3rd byte and Serial.available returns 1 (it's not the number 5, it's realy the 6). Do you mean you send a string 256 and Serial.available() returns only 2? Quote Link to post Share on other sites
L.R.A 78 Posted June 18, 2014 Author Share Posted June 18, 2014 @L.R.A can you please post the Sketch you used. Do you mean you send a string 256 and Serial.available() returns only 2? in the Serial monitor i send the number 256 (string) or even 99999 and the the Serial.available only says i sended 2 chars Quote Link to post Share on other sites
SixSixSevenSeven 23 Posted June 19, 2014 Share Posted June 19, 2014 code? Quote Link to post Share on other sites
bobnova 59 Posted June 20, 2014 Share Posted June 20, 2014 On Energia 0101E0012 with a TM4C129 Serial.available() returns the correct number of characters with this test sketch: void setup() { Serial.begin(115200); } void loop(){ if (Serial.available()){ delay(1000); Serial.print(Serial.available()); Serial.print(" characters received. They were: "); while(Serial.available()){ Serial.print(Serial.read()); Serial.print(","); } Serial.println(); } } Does your program/sketch/code/whatver give the serial data enough time to be received? These chips are fast enough that I've found I need to wait for incoming data in places where I don't have to with an Arduino or MSP430G. Quote Link to post Share on other sites
L.R.A 78 Posted June 21, 2014 Author Share Posted June 21, 2014 I just went and used TivaWare to program my UART comunication and it works just fine. Gona try some tests (maybe) later to check what was my problem with Energia Quote Link to post Share on other sites
NickTompkins 4 Posted July 8, 2014 Share Posted July 8, 2014 We are having the same issue as described above. Quote Link to post Share on other sites
L.R.A 78 Posted July 8, 2014 Author Share Posted July 8, 2014 We are having the same issue as described above. i can't realy help with this right now, exams and stuff prevent me from that. Starting next week i'll be in vacation and then i can try to see why Energia isn't working 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.