What am I doing wrong? #529
Replies: 13 comments
-
Posted at 2014-06-18 by @gfwilliams It might be that you're sending data to the lcd before it is initialised? Maybe try adding |
Beta Was this translation helpful? Give feedback.
-
Posted at 2014-06-18 by DrAzzy What happens when you run it interactively? Are you able to get any data out of the GPS? Are you able to control the LCD manually? I figure the callback must be running, otherwise it would leave the "LCD OK" on the screen.... My suspicion is that it's not getting data - possibly it's getting no data, but that's being translated into an empty string? The GPS module states that it's for interfacing with GPS devices that support the NMEA standard/protocol/whateveryoucallit - Per the NMEA description( http://www.gpsinformation.org/dale/nmea.htm#hardware ), that means 4800 baud, maybe higher on some units. 57600 is 12 times faster than this. Is there a reason that you picked that? Also, are you running this by sending from the IDE, or are you save()ing? If you want that to work after using save(), you need to put the connect() call for the GPS into onInit() as well. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2014-06-18 by user7143 I am able to get data out of the GPS by calling variables from the command line. I am unable to control the LCD manually when the GPS is running but am able to do so when I comment out the GPS code. So it seems that somehow the GPS code is preventing the LCD code from working. Although the code is similar to the Walking GPS code on the site. I am running at 57600 baud as thats how the GPS I am using is configured. I can try another unit that operates at 9600 baud although it has a smaller antenna. Maybe the rapid update on the GPS is preventing the LCD screen from re loading. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2014-06-18 by user7143 Update. Tried using the another GPS at 9600 baud and I now the LCD screen works. So it seems that the callbacks were coming to fast for the screen to keep up. Thanks for your help. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2014-06-19 by @gfwilliams Thanks for letting us know. I've got a bug open to look at speeding up the Serial port handling (here) so hopefully this'll get fixed soon. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2014-06-23 by user7143 In case this information helps. I tried changing the speed of the other GPS unit from 57600 to 9600 baud. It still did not work. I believe the reason for this is the period of the updates rather than the baud rate. The two GPS units that I am using are the Adafruit Ultimate GPS and a LS20031. So I think the issue is the 5hz output set from the factory on the LS20031. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2014-06-23 by @gfwilliams That's a strange one - have you tried maybe updating the screen on every second GPS update? If the update speed is too high, that may help. Otherwise, I've got a new version of the firmware available here which I plan to release soon. The Serial API is slightly re-done (sending strings, not characters), so the GPS receiver part now looks like:
That should handle significantly higher data rates. I don't see 57600 being a problem at all. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2014-06-28 by user7143 I uploaded the V66 to the espruino. Now I am confused to how to read the data on the gps. When I try to initalize I get gps |
Beta Was this translation helpful? Give feedback.
-
Posted at 2014-06-30 by @gfwilliams Sorry - it looks like there's some kind of problem with the Serial communications in the new version. I tested it before it went out, but it seems some bug has crept in and the data is received but only as zeros. I'll see what I can do to fix it and will update you in an hour or so. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2014-06-30 by @gfwilliams Ok, I just did a quick test and setting the port up with
There seems to be another big issue with memory leaks though. Sorry about that. I'll fix it for the 'real' 1v66 release, and I'll try and get that out soon so nobody else encounters this. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2014-06-30 by @gfwilliams Ok, if you install the binary from here: http://www.espruino.com/binaries/git/commits/d1cb6a8b48eedc8bfa52f68b32d03f2603d7e62b/ Go to the link, copy the address of the '...1r3.bin' file, paste it into the Web IDE flasher page and click 'advanced flash'. It should solve your problems. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2014-06-30 by Frida It did very well, I now have no memory leak on my bluetooth comm, which I have with 1V65, so 1V66 did the job. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2014-06-30 by user7143 Thank you. That fixed the issues with reading data at a higher rate. I am now able to read both the Adafruit GPS and the other GPS with the higher update rate and baud rate at the same time. Amazing how much easier this seems to be to learn than an Arduino like platform. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2014-06-18 by user7143
I am fairly new to Javascript and am trying to understand why I am having an issue displaying gps data on a PCD8544. If I comment out the GPS code the display will characters. When the GPS code is included the LCD screen does not display any characters. I tried converting the lat1 variable from number to string but that did not work. WHat am I doing wrong?
Beta Was this translation helpful? Give feedback.
All reactions