Add info about pins usage and some tweak to try to debug 2d UART (to raspberry pi)

This commit is contained in:
Pierrick C 2018-08-12 17:09:47 +02:00
parent 57b22c4cc5
commit d9d6d80588

View File

@ -22,6 +22,19 @@ Use with:
* Adafruit Ultimate GPS FeatherWing * Adafruit Ultimate GPS FeatherWing
* Bosch BME280 sensor (air temperature, humidity, atmospheric pressure) on I2C * Bosch BME280 sensor (air temperature, humidity, atmospheric pressure) on I2C
Pins used:
* TX/RX : Ultimate GPS FeatherWing (data)
* A5 : Ultimate GPS FeatherWing EN (enabe/disable GPS power)
* I2C SDA/SCL : BME280 sensor
* D5 : RW / RO jumper
* D10, D11 : UART TX & RX to Raspberry pi (115200 baudrate)
* D9 : to EN pin on Raspberry Lipo SHIM
* D13 : onboard LED (as RW/RO indicator)
Back pins diagramm:
D05 D10 D11 D09 NC_
GND GND SCL SDA 3V3
Git repository : Git repository :
https://framagit.org/arofarn/Cameteo https://framagit.org/arofarn/Cameteo
@ -293,7 +306,7 @@ if gps_enable:
# Second UART to communicate with raspberry pi (throught GPIO) # Second UART to communicate with raspberry pi (throught GPIO)
if send_json_data: if send_json_data:
rpi_uart = UART(board.D10, board.D11, rpi_uart = UART(board.D10, board.D11,
baudrate=115200, timeout=2000) baudrate=9600, timeout=2000, parity=None)
# Set onboard Neopixel : used as atmo data output # Set onboard Neopixel : used as atmo data output
# brightness is fixed to 1 to spare some memory. Use neopixel_max_value instead # brightness is fixed to 1 to spare some memory. Use neopixel_max_value instead
@ -331,6 +344,7 @@ while True:
data.show() data.show()
if send_json_data: if send_json_data:
rpi_uart.write(data.json + '\n') rpi_uart.write(data.json + '\n')
print(data.json + '\n')
if backup_data: if backup_data:
data.write_on_flash() data.write_on_flash()
if data_to_neopixel: if data_to_neopixel: