Search found 2686 matches

by Roberthh
Mon May 24, 2021 8:11 am
Forum: ESP8266 boards
Topic: IRQ interrupt callback runs multiple times
Replies: 3
Views: 458

Re: IRQ interrupt callback runs multiple times

It could be a mix of both. The 4N35 is not really fast, especially when switching off. That's common to optocouplers. The data sheet talks of 10 µs. You could speed that up by a resistor between Base and Emittter (pins 4 and 6), which in turn also reduces sensitivity. And the way the optocoupler is ...
by Roberthh
Sun May 23, 2021 8:02 pm
Forum: Raspberry Pi microcontroller boards
Topic: Problem with UART reading (MH-Z19B sensor)
Replies: 13
Views: 1120

Re: Problem with UART reading (MH-Z19B sensor)

Thats' strange. If you are always have three extra bytes upfront, you could try for read 12 byte and discard the first three. B.T.W.: Which version of the firmware do you use? Edit: I would move the clearing of the input buffer INTO the loop before you send a command. Then any remainder of a previou...
by Roberthh
Sun May 23, 2021 12:05 pm
Forum: Raspberry Pi microcontroller boards
Topic: Problem with UART reading (MH-Z19B sensor)
Replies: 13
Views: 1120

Re: Problem with UART reading (MH-Z19B sensor)

You have to add the read best immediately before you send the command to the sensor. There is no difference to the UART behavior between running code from the IDE or from Flash. If you say: Remove the first two bytes: did you still process the whole 9 bytes you expect from the sensor? Or was the mes...
by Roberthh
Sun May 23, 2021 12:01 pm
Forum: ESP8266 boards
Topic: IRQ interrupt callback runs multiple times
Replies: 3
Views: 458

Re: IRQ interrupt callback runs multiple times

The ESP8266 (and the ESP32) have the habit of detecting multiple 0/1 transitions when signals with slow ramp are applied. That will cause multiple interrupts to be fired. You have to add something like a schmitt-trigger gate between your 4N35 and the ESP8266. E.g. a 74HC14 gate. If you use two inver...
by Roberthh
Sun May 23, 2021 10:16 am
Forum: ESP8266 boards
Topic: ESP01: power I2C sensor from board instead of battery
Replies: 2
Views: 1256

Re: ESP01: power I2C sensor from board instead of battery

It is unclear to me what prevents you from using MP with an ESP01. It might not be the best suited MCU for that, and especially the 512k models w/o USB bridge are uncomfortable to handle. But not different than with C/C++. But it's your choice which platform and language to use, and not need to spam...
by Roberthh
Sun May 23, 2021 9:00 am
Forum: ESP8266 boards
Topic: How to reset ESP01-S after converting TX to GPIO
Replies: 3
Views: 1119

Re: How to reset ESP01-S after converting TX to GPIO

So you should be able to open a topic. You did not exactly tell which ESP01 device you are using, but the 512k is very limited for Python. You will have a reduced feature set and no file system. For better user experience go for a 2M or 4M flash device. The default set-up is for a 4M device, like We...
by Roberthh
Sun May 23, 2021 6:16 am
Forum: Raspberry Pi microcontroller boards
Topic: Problem with UART reading (MH-Z19B sensor)
Replies: 13
Views: 1120

Re: Problem with UART reading (MH-Z19B sensor)

If you look at your own post you can tell, that the sensor actually responds with the proper message. Only there are some other bytes upfront. That is "noise", cause the the power up of the board. You have to get rid of that at the start of your coding. So, at the startup of your code, before sendin...
by Roberthh
Sat May 22, 2021 6:52 am
Forum: ESP32 boards
Topic: BME280.py vs bmp280.py
Replies: 4
Views: 428

Re: BME280.py vs bmp280.py

Hard to tell without a reliable reference. I also derived a BME280 driver and did a careful review and fox on how the calibration data was read from the device. You'll find it here: https://github.com/robert-hh/BME280 It has a float and int variant. The int variant follows the datasheet of Bosch and...
by Roberthh
Fri May 21, 2021 4:17 pm
Forum: ESP32 boards
Topic: BME280.py vs bmp280.py
Replies: 4
Views: 428

Re: BME280.py vs bmp280.py

Could you give the full URL path of the two respective drivers you are using. Otherwise comparison is difficult.
by Roberthh
Wed May 19, 2021 12:11 pm
Forum: General Discussion and Questions
Topic: I2C to Accelerometer
Replies: 6
Views: 656

Re: I2C to Accelerometer

Then it should have a Genuine Chip on it. Although it looks weird on the picture. But that may be a photo artifact. Did you solder the wires to the Pico board?