Search found 5 matches
- Mon Apr 10, 2017 12:05 am
- Forum: General Discussion
- Topic: Porting Arduino I2C method to ESP32?
- Replies: 2
- Views: 7430
Re: Porting Arduino I2C method to ESP32?
I'm not familiar with the TCA9548, but don't you have to give the address of the register you're reading from? I know on the MCP23017 you do something like this: // Specify register to read cmd = i2c_cmd_link_create(); i2c_master_start(cmd); i2c_master_write_byte (cmd, (addr<<1) | I2C_MASTER_WRITE, ...
- Sun Feb 26, 2017 4:40 pm
- Forum: General Discussion
- Topic: Problem reading I2C sensor
- Replies: 11
- Views: 22497
Re: Problem reading I2C sensor
Didn't you say there had to be a 5 msec delay before reading the data back from the sensor? I don't see a delay in the code you posted.
Best regards,
Pete C.
Best regards,
Pete C.
- Sat Feb 04, 2017 11:11 pm
- Forum: General Discussion
- Topic: MCP23017 Port Expander
- Replies: 9
- Views: 28486
Re: MCP23017 Port Expander
Neil, I worked on your Adafruit port a bit, and got it working pretty well. I wound up writing a generic I2C register read/write library and then changed your changes to use that instead. I wired a 23017's chips two ports together, added some LEDs, and wrote a test program which alternates between t...
- Wed Jan 25, 2017 8:49 pm
- Forum: ESP-IDF
- Topic: Use I2S in I2S_MODE_DAC_BUILT_IN Mode
- Replies: 7
- Views: 13595
Re: Use I2S in I2S_MODE_DAC_BUILT_IN Mode
Hmm... I think I should have typed
Code: Select all
return (unsigned short) s & 0xff00 | (unsigned short) s >> 8;
- Wed Jan 25, 2017 4:05 am
- Forum: ESP-IDF
- Topic: Use I2S in I2S_MODE_DAC_BUILT_IN Mode
- Replies: 7
- Views: 13595
Re: Use I2S in I2S_MODE_DAC_BUILT_IN Mode
Doesn't this do the same thing?
Code: Select all
static int convert_sample(short s) {
return s & 0xff00 | s >> 8;
}