- Table of contentShow
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!
Code: https://goo.gl/v7NCkj Things used in this project
Hardware components
(*) 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:
Wiring
Wipy 2.0 NEO-6M ST7735 3.3v
VCC
VCC
GND
GND
GND
P3
(G12
)RX
P4
(G11
)TX
P6
(G13
)RES
P7
(G14
)RS/DC
P8
(G15
)CS
P10
(G17
)SCL
P11
(G22
)SDA
These are the default connection setting, you can change them using the constructor of the
Display
class asmy_display = Display(self, uSPI=0, pinDC='P7', pinCS='P8', pinRST='P6')
Instructions
- 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.py
file to enter yourSSID
andWPA
password.- 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.py
file to include your API key:API
variable underupdatingWeather(self, my_gps, my_display)
method -line 40-. - Optional: change the GPS and Weather update rates in milliseconds in the
main.py
file: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.
Preview
Changelog
- Revision 0.1b
Credits
- 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/
We use cookies to improve our services. Read more about how we use cookies and how you can refuse them.
Empty