MicroPython | 2 min | 5674
Hi again!... First of all:
I've just uploaded some code for the Wipy 2.0. I wanted to write some python code. That was why I took the Wipy 2.0 and programmed something like a weather report box. In this project the Wipy 2.0 reads the GPS coordinates via UART, then makes a web get request using the API of openweathermap, and after that the results are displayed on a LCD.
If you like this, please leave a comment, share and/or like! It would be very much appreciated!
Things used in this project
(*) For this project I used the Ublox NEO-6M but you should probably buy the new NEO-M8N (see here)
Software apps and online services:
Wipy 2.0 NEO-6M ST7735
These are the default connection setting, you can change them using the constructor of the
my_display = Display(self, uSPI=0, pinDC='P7', pinCS='P8', pinRST='P6')
- Download the complete Github repository
- Update your Wipy firmware
- Register on Open Weather Map API to get an API key.
- Connect the GPS module and the ST7735 display as indicated in the Wiring section.
- Modify the
boot.pyfile to enter your
- Note: the firmware (1.5.0.b2 and I think early versions too) has a bug and the DNS server is not set if you use static IP address and this is needed to resolve the get request.
- Modify the
main.pyfile to include your API key:
updatingWeather(self, my_gps, my_display)method -line 40-.
- Optional: change the GPS and Weather update rates in milliseconds in the
UPDATE_GPS = const(10000)(default = 10 seconds)
UPDATE_WEATHER = const(50000)(default = 50 seconds)
- Copy the all the files to the flash memory of the Wipy 2.0 and restart the board.
- Revision 0.1b
- GPS library forked from: https://github.com/inmcm/micropyGPS
- ST7735 library rewriten from: http://forum.43oh.com/topic/4352-universal-color-lcd-graphics-library-2/