LCD Buses + Weather Reporter

Hello community,

This is yet another LCD Display project with buses time and additionally the weather information. First of all I thank each person on the community who has helped some how to get this project working! [and specially to the Spark Team for bringing such a cool device and platform, you guys rock]… I’m using parts of code from different places so some of them should look familiar, like the one to get the time from a server :)… It gets the time when it boots and then every 60 seconds refresh it by calculating the time difference and resyncs every hour, just in case.

By the way, I haven’t seen it here yet, but my project includes the LCD I2C code, so if you need it, there it is!

Here is the code that I’m currently using, sorry that I didn’t even clean it up or anything, that’s to come but I figured it’s better to give you something than nothing for now… http://pastebin.com/7FXZ11QJ

Backend: The information get’s filled in by a service that send information to the cloud by function exposure.

To Do: A button that I can press which will make it beep (buzzer) whenever a bus is 8 mins away (the time it takes me to get to the bus stop)

Pictures + Video:

And video can be watched here: https://plus.google.com/115943246606357766021/posts/gGKTzdsTEf8

9 Likes

Hey, cool project! I am happy to see that you could take some lines of my code, it seems to work at least. :smiley:

Meanwhile i cleanup up my code, so there is a better way how to get the timestamp, without extra parsing. As you are just printing the date string, you could let timeapi print the string you want, and remove local parse/format.

I am interested in the wheater data, how do you access it?

Oh great, thanks a lot… I’m printing the date string when I request it, but I do need to store the seconds since epoch as I’m re-generating the time every minute without making any HTTP calls (by adding 60 secs).

Here is my weather data backend script (PHP): http://pastebin.com/KFnn63Hy.
I’m using this great service http://forecast.io with this library: https://github.com/tobias-redmann/forecast.io-php-api. ForecastIO API info: https://developer.forecast.io

2 Likes

I have spend ~4 very late hours (it is 1am) to make usb-serial and then 16x2 LCD to work. Serial was a miss, and sending same data via Cloud didn’t work too well either.

But LCD I got working, thanks to you @Iv4n and this topic. I only had to adjust from 20x4 to 16x2 matrix.

My I2C LCD was this: http://www.ebay.co.uk/itm/121225262440

Tomorrow I’ll clean off the non-LCD code from this and continue working with my own projects.

3 Likes

That’s great @weakset, I’m so glad I’m giving something back to the community!

And it looks great, happy hacking and coding!

1 Like

Hi @Iv4n, Hi @Coffee,

I got an 20x4 and a 16x2 LCD running using your code!

Great work, great device :smile:

@joky we want to see pictures! :smiley:

Hi,

still in progress. I setup a Arduino Yun with a 8-Relay Board, an 16x2 + 4 Buttons to control 2 pizza-ovens in a restaurant. The advantage should be, that the controlling (over PID) is much more accurate than the current thermostat (which varies 380±20°C) and the whole thing is remote controllable and we can integrate it in our home automation (warmup every day at 4pm except holiday, turn off at 11pm).

In addition I’ll integrate a power-alarm. Since all gas-oventops has been replaced by inductive ones, we’re quite on limit of our power supply. We already have a power-monitoring device and the idea is to display the current power status on the display and on an industrial signal light. If the power exceeds 80 Amps there should be also a “emergency” Power-Off for some heating devices.

Photos to follow :frowning:

regards

That’s great @joky, can’t wait for the pictures! :stuck_out_tongue:

@Iv4n I tried to use your code sample… I’d like to get the time too… and maybe one or two other things…

Get Time Extract

But when I run it I get

“Can not find http response”

You can ignore the “mydisp” code its just there so I can see the output on a little oled without having to go into a loop…
It seems that some of the client code is a little tricky with a couple of bugs but you seem to have got it working without any issues.

1 Like

Hello Dom, I can’t properly see the gist that you sent, could you fix it so I can help you?

1 Like

Fixed… I copied the wrong URL. Thanks.

No problem, the TCPClient changed a little bit. I copied your code and modified it a little bit, give this a try: http://pastebin.com/XrQCKLLn

Perfect… Works Brilliantly. Really appreciate you taking a look at it…

1 Like