Hi Derek, I would connect the 3.3V from the ESP8266 to the CMPS12.
Even if it seem to work with the 5V, I2C signal on ESP8266 should be 3.3V.
Search found 126 matches
- Thu Mar 24, 2022 4:51 pm
- Forum: General Discussion and Questions
- Topic: i2c reading register
- Replies: 11
- Views: 3826
- Thu Mar 24, 2022 6:32 am
- Forum: General Discussion and Questions
- Topic: i2c reading register
- Replies: 11
- Views: 3826
Re: i2c reading register
Derek, can you scan I2C addresses with this command? from machine import Pin, I2C # construct an I2C bus i2c = I2C(scl=Pin(5), sda=Pin(4), freq=100000) i2c.scan() I want to know if communication is working. Does CMPS12 powered with 3.3V ? As CMPS12 consume around 18mA , I hope there is no variation...
- Wed Mar 23, 2022 8:02 pm
- Forum: General Discussion and Questions
- Topic: i2c reading register
- Replies: 11
- Views: 3826
Re: i2c reading register
Can you try this code? from machine import Pin, I2C from ustruct import unpack ADDRESS_CMPS12 = const(0x60) REG_BEARING_8 = const(0x01) REG_BEARING_16 = const(0x02) i2c = I2C(scl=Pin(5), sda=Pin(4), freq=100000) # unsigned char bearing_8 = unpack('B', i2c.readfrom_mem(ADDRESS_CMPS12, REG_BEARING_8, ...
- Wed Mar 23, 2022 6:12 am
- Forum: General Discussion and Questions
- Topic: i2c reading register
- Replies: 11
- Views: 3826
Re: i2c reading register
Derek, I don't have this compass cmps12 , but we can start with the following steps : Scan I2C, to check wiring Read a register Decode registers Can you scan I2C addresses with this command? from machine import Pin, I2C # construct an I2C bus i2c = I2C(scl=Pin(5), sda=Pin(4), freq=100000) i2c.scan()
- Sat Mar 12, 2022 7:38 pm
- Forum: Programs, Libraries and Tools
- Topic: Python-only neural network
- Replies: 1
- Views: 2090
Re: Python-only neural network
I've created a pure MicroPython Neural Network I've posted it here.
- Mon Feb 21, 2022 7:57 pm
- Forum: ESP32 boards
- Topic: DHT22 measure fails
- Replies: 4
- Views: 1936
Re: DHT22 measure fails
I'm maybe wrong, but, can you check gnd braising on ESP32 board, it does not seem good on the picture.
- Mon Feb 14, 2022 6:10 am
- Forum: ESP32 boards
- Topic: Controlling a servo
- Replies: 3
- Views: 1272
Re: Controlling a servo
You dont' need TXS0108E, it works without it.
Proposed schematic is here, just change it to use wanted Pin.
If you want to use an external 5V power supply, you will need to connecte ESP32 GND with external power supply GND.
Proposed schematic is here, just change it to use wanted Pin.
If you want to use an external 5V power supply, you will need to connecte ESP32 GND with external power supply GND.
- Fri Feb 04, 2022 8:51 pm
- Forum: ESP8266 boards
- Topic: serial communication and variables
- Replies: 15
- Views: 18939
Re: serial communication and variables
yes but, this car.json document is inside the microcontoler?.. because if that is the case, I don't see the advantage regarding the use of a dictionary, now if the car.json file comes via serial it would be difficult because remember that what is going to communicate with the esp8266 via serial is ...
- Fri Feb 04, 2022 4:07 pm
- Forum: ESP8266 boards
- Topic: serial communication and variables
- Replies: 15
- Views: 18939
Re: serial communication and variables
If the list of color is very long, I recommend using a json file outside of your code. hello, I'm a bit confused about what you mean when you tell me to use json outside the code Create a json file name it cars.json and write the following json structure in it. Documentation is here {"ford": {"rang...
- Wed Feb 02, 2022 4:17 pm
- Forum: ESP8266 boards
- Topic: implementation of interrupt : ISR-Handler-Asyncio...
- Replies: 18
- Views: 10896
Re: implementation of interrupt : ISR-Handler-Asyncio...
I've recently read this, it's about writing interrupt handlers with micropython.schedule.