2914_altimeter object in combination with LCD_Ding_Batty gives strange result *SOLVED*
JeroenG
Posts: 5
Hi everyone,
I have a HD44780 lcd where I want to display altitude on.
Using the spin object of Ding-Batty (http://obex.parallax.com/object/337) I'm able to display text, and I've already used it to display gps information.
When I however call the start function of the 2914 Altimeter object (https://www.parallax.com/downloads/altimeter-driver-and-demo-spin-source-code) the display is showing strange things.
Sometimes it displays space characters in between the text (e x a m p l e), and sometimes also strange characters.
I confirmed that both objects work fine separately, but not together.
Unfortunatly I'm still a newbie on spin, and I have no clue on why this happens.
I attached the test project that I used to verify the problem.
Is there anyone who can help?
Thanks
Jeroen
I have a HD44780 lcd where I want to display altitude on.
Using the spin object of Ding-Batty (http://obex.parallax.com/object/337) I'm able to display text, and I've already used it to display gps information.
When I however call the start function of the 2914 Altimeter object (https://www.parallax.com/downloads/altimeter-driver-and-demo-spin-source-code) the display is showing strange things.
Sometimes it displays space characters in between the text (e x a m p l e), and sometimes also strange characters.
I confirmed that both objects work fine separately, but not together.
Unfortunatly I'm still a newbie on spin, and I have no clue on why this happens.
I attached the test project that I used to verify the problem.
Is there anyone who can help?
Thanks
Jeroen
zip
43K
Comments
It looks like there's a bug in the 29124 Altimeter object code. In the start_explicit() function, the code tries to set the resolution to 1024, but it does this before initializing I2C or access to the altimeter, which I think results in collecting samples() using incompletely initialized variables.
I moved the call to set_resolution() in the start_explicit() code that should be sufficient to fix the problem:
By the way, the LCD display code was some of the first code I wrote for the Propeller -- well actually it is the second version of the code, the first version was terrible
Nowedays the serial displays are more common, but I had this one lying around, so always good to see other people also still use them.
Thank you!
Please share your working project so that more new people can learn from it.