Search found 65 matches

by rodmcm
Tue Dec 07, 2021 3:13 am
Forum: ESP32 Arduino
Topic: analogRead(pin) as part of an Interrupt Service Routine
Replies: 1
Views: 3444

Re: analogRead(pin) as part of an Interrupt Service Routine

Yes you are correct, the button is defined as an input but you are using it as an analog input, it will not change state with the resistor network attached Why not just sample the input as an analog and then invoke FuncButtonAnalogRead( int16-t AnalogIn) If you have too much code in the loop ( in yo...
by rodmcm
Wed Nov 24, 2021 12:38 am
Forum: ESP32 Arduino
Topic: what is the proper way to reset I2C after an error? Is there a Wire.reset()?
Replies: 1
Views: 5271

Re: what is the proper way to reset I2C after an error? Is there a Wire.reset()?

The latest Wire.h at https://www.arduino.cc/en/reference/wire only has limited commands
Usually a failure to read is handled by external programming such as "if Value>0 then ok else fault"
You can also detect with available() which returns the no of bytes that can be read
by rodmcm
Wed Nov 24, 2021 12:28 am
Forum: ESP32 Arduino
Topic: pins_arduino.h to esp32 mapping
Replies: 2
Views: 6304

Re: pins_arduino.h to esp32 mapping

Also when you select tools>board>ESP32 Arduino> your board type
then the IO configuration is done for you
by rodmcm
Wed Nov 24, 2021 12:25 am
Forum: ESP32 Arduino
Topic: pins_arduino.h to esp32 mapping
Replies: 2
Views: 6304

Re: pins_arduino.h to esp32 mapping

Perhaps this will assist
by rodmcm
Sun Nov 21, 2021 3:32 am
Forum: ESP32 Arduino
Topic: Sampling I2C sensor using a Timer Interrupt
Replies: 2
Views: 5891

Re: Sampling I2C sensor using a Timer Interrupt

If you set up a simple wire read from both sensors you can measure the period to read them both which will be well below your sample period. You can then sample the reading through then interrupt
by rodmcm
Sun Nov 21, 2021 3:29 am
Forum: ESP32 Arduino
Topic: Sampling I2C sensor using a Timer Interrupt
Replies: 2
Views: 5891

Re: Sampling I2C sensor using a Timer Interrupt

Hi
What are you exactly trying to do by sampling through an interrupt? What is the purpose?
by rodmcm
Sat Sep 04, 2021 10:59 am
Forum: ESP32 Arduino
Topic: ESP32 Serial2 Uart TX pin problem
Replies: 1
Views: 2555

Re: ESP32 Serial2 Uart TX pin problem

If you are going back to using 25 and 26 as inputs then you probably need to assign them with pinmode(25,INPUT_PULLUP) or similar
by rodmcm
Tue Sep 29, 2020 2:03 am
Forum: ESP32 Arduino
Topic: Modbus Master Serial RTU without RS485
Replies: 5
Views: 5690

Re: Modbus Master Serial RTU without RS485

send null characters