Welcome Guest! To enable all features please Login or Register.
Options
Go to last post Go to first unread
Meels82  
#1 Posted : Sunday, April 05, 2015 11:49:26 PM(UTC)
Meels82

Rank: Newbie

Groups: Registered
Joined: 4/5/2015(UTC)
Posts: 3

Has anyone else had issues uploading a completed program?

I've had mixed results trying to upload my code, sometimes it finishes its timing tests and loads fine. Other times it just sits of Listening for timing data.... even tho there are no untimed agents or nodes in the project.

I thought it may be my project so I made a simple blink as per the tutorial and the same thing happened, sits on listening for timing data......

I updated to 1.1.4.0 and the same thing happens.

Ive tried:

Changing USB ports
Using a different Arduino
Restarting Embiro
Restarting Computer
Rewriting Code

Im not sure if its a bug or I'm stupid (possibly both)

its been a great program thus far my only 2 issues are this and the fact that you cant see your finished code. My plan was to run my finished code on a PCduino3 but that doesn't seem like a possibility at this stage.



Any help with the Timing Data issue would be greatly appreciated.

Cheers


PS

Found out how I possibly broke it, I inserted a custom code node and in the Setup box I put Serial.begin(9600); and in the Loop I set it to Trigger and Serial.println("bblah blah");


When you try and upload it with that code in there it will listen for data forever, Then if you delete the Custom node it will still fail to upload, Doesnt matter what you try and do.

Edited by user Monday, April 06, 2015 12:01:51 AM(UTC)  | Reason: Not specified

Meels82  
#2 Posted : Monday, April 06, 2015 2:48:31 AM(UTC)
Meels82

Rank: Newbie

Groups: Registered
Joined: 4/5/2015(UTC)
Posts: 3

Im an idiot and I think ive fixed my own issue

swapped out Serial.println("mytext") for Serial.println(Input_Text);

Also worked out Serial.begin has to be set to (57600) or it will just bomb out
EmbrioAdmin  
#3 Posted : Monday, April 06, 2015 3:59:44 AM(UTC)
EmbrioAdmin

Rank: Administration

Groups: Administrators
Joined: 12/11/2014(UTC)
Posts: 661

Thanks: 1 times
Was thanked: 36 time(s) in 33 post(s)
Thanks for the report and the solution! Saved me some time.

The timing program already has a built in Serial.begin, so adding another via a custom node I'm sure is bad. I'll add some code to take out extra Serial.begins for the timing program. I'm not sure why hard coding a string caused problems. I do know that for string inputs the timing code uses a random string of the max length for that input to test the worst case scenario, maybe it doesn't do well with a string literal.

I've also just noticed that sometimes changes to a custom node aren't picked up by the compiler, it could be that even though you made a change that would fix your problem the compiler is still using the old custom node. If you have a chance could you try compiling a timing program again after closing and re-opening the program to see if that's the cause?
Meels82  
#4 Posted : Wednesday, April 08, 2015 12:49:20 AM(UTC)
Meels82

Rank: Newbie

Groups: Registered
Joined: 4/5/2015(UTC)
Posts: 3

I have had that issue with the complier however I cant seem to replicate the issue at the moment.


What I have noticed is if I use the Serial.print command instead of Serial.println that when Compiling I get infinite timing data again.


Also, Leaving anything like a Processing program running thats reading the serial port or leaving the port monitor open in Arduino IDE will stop the timing program from doing its thing

Edited by user Wednesday, April 08, 2015 1:14:04 AM(UTC)  | Reason: Not specified

EmbrioAdmin  
#5 Posted : Wednesday, April 08, 2015 11:42:08 AM(UTC)
EmbrioAdmin

Rank: Administration

Groups: Administrators
Joined: 12/11/2014(UTC)
Posts: 661

Thanks: 1 times
Was thanked: 36 time(s) in 33 post(s)
The timing program runs your code through a loop then sends data back like:

tim:ABCDE:1:123

Embrio needs to find a line in that format, where "tim" is telling it its timing data, "ABCDE" will be a hash of the code that's being timed, 1 is the index of the code being timed (there could be a bunch of nodes being timed in the same program), and 123 is the counted microseconds. The program should be connecting at 57600 baud.

If you're serial.printing something that messes up those lines it could interfere with the timing procedure, and if something else is listening on the port and blocks Embrio from connecting that could also cause a problem. There's probably a better way to do the communication but that's how it works for now.

If you have timing problems, try opening up a serial monitor and see what the timing program is sending back, it should send an update about once per second. I recently made a change so that Embrio looks for ####tim:etc and then removes everything before the "tim:", so it should be more flexible, but I'm sure there are still things you could be serial.printing that break it. If you reproduce the problem show me the custom node and the serial monitor data so I can figure out a fix.
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Notification

Icon
Error