View Single Post
Old 11-26-2016, 03:11 PM   #28 (permalink)
Join Date: Oct 2016
Location: Seattle, WA
Posts: 69

s2k - '02 Honda s2000
Thanks: 12
Thanked 47 Times in 35 Posts
Thanks for posting the code! I was logging in to check just that ....

Regarding metric: it crashes while running --- but otherwise takes? So live data is lost .... I'm not really asking, I'll check the behavior ...

I'm fairly certain calling the LCD or writing the JSON output takes longer than any of the primary functions, but I haven't measured yet (it's fairly easy to measure using a quick millis() check) --- If I'm correct, then 38.4 should be plenty fast. Let me run a quick calculation:

json file is about 579 bytes, depending. 38.4bps is 4,800Bps, so about an 8th of a second or 125ms to send the payload. the javascript routines on the Pi are set for 100ms by default, adding a total delay from real-time to .225 per second.

Standard mpguino is .250 seconds ..... so I'd say we are well within operating parameters.

In order to accurately measure acceleration functions the standard loop delays needs to be suppressed. I will have more questions about how to deal with LCD delays ... but all in good time.

Also, I notice you support the tinkerkit LCD ... does the tinkerkit use fewer pins than the standard method of using 8 (+ 1 for contrast and 3 grounds) wires to connect to the LCD? Both Adafruit and Osepp have shields that claim to use 2 pins to connect to soft buttons and LCD. The soft buttons are irrelevant here but using 1 or 2 pins for LCD communication would make it very easy to attach an LCD for programming and detach it for a small footprint.
  Reply With Quote
The Following User Says Thank You to skybolt For This Useful Post:
t vago (11-26-2016)