Search found 3 matches

by Vaibhavik
Tue Feb 23, 2021 7:29 am
Forum: General Discussion and Questions
Topic: UART and Raspberry Pi Pico (RP2040)
Replies: 7
Views: 944

Re: UART and Raspberry Pi Pico (RP2040)

Still not able to get CO2 readings on the terminal sir. Would you please review the code and the library? import mhz14a from machine import UART,Pin from time import sleep_ms CO2Sensor = UART(1,tx=Pin(18),rx=Pin(19)) attempts = 0 ppm=0 while attempts < 3: ppm = CO2Sensor.readCO2() if ppm > 0: print(...
by Vaibhavik
Fri Feb 19, 2021 8:40 am
Forum: General Discussion and Questions
Topic: UART and Raspberry Pi Pico (RP2040)
Replies: 7
Views: 944

Re: UART and Raspberry Pi Pico (RP2040)

Hello sir , Thankyou for your prompt reply , being a complete newbee in micropython , getting another error in the following code , request you to please have a glimpse at the same. Thanks again! import mhz14a from machine import UART from time import sleep_ms CO2Sensor = UART(uartNum=1,rxPin=19, tx...
by Vaibhavik
Fri Feb 19, 2021 5:48 am
Forum: General Discussion and Questions
Topic: UART and Raspberry Pi Pico (RP2040)
Replies: 7
Views: 944

Re: UART and Raspberry Pi Pico (RP2040)

Hello sir, Encountered the same problem with the UART communication with the sensor. Below is the code : sensor code import mhz14a from time import sleep_ms CO2_Sensor = mhz14a.MHZ14A(uartNum=1, rxPin=18, txPin=19) attempts = 0 ppm=0 while attempts < 3: ppm = CO2Sensor.readCO2() if ppm > 0: print("C...