Тёмный

Raspberry Pi Pico (RP2040) I2C Example with MicroPython and C/C++ | Digi-Key Electronics 

DigiKey
Подписаться 160 тыс.
Просмотров 32 тыс.
50% 1

Опубликовано:

 

16 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 14   
@KellyDiversified
@KellyDiversified Год назад
Great speaker and explanation. Moves a little fast, but can always rewind and repeat - thanks!
@grantpeterson2524
@grantpeterson2524 3 года назад
I just recently got my Pico from you guys about 2 months ago before this video was published. Love the clear but concise language and voice!
@MUHAMMADYAWARIFRAHEEM
@MUHAMMADYAWARIFRAHEEM 3 года назад
Very informative video
@cattflap1447
@cattflap1447 3 года назад
Excellent, thank you 😁
@peterbell4736
@peterbell4736 6 месяцев назад
I find many tutorials for using pico as an i2c master (controller), but not a lot of help using pico as an i2c slave (responder). I'm aware of the library created by Don Perron (and the epmoyer derivative) but haven't had a great deal of success with it. I have control system using a network of RPis, and currently using chips such as the mcp23017 for i/o. I wish to replace the various i/o devices with picos.
@cstanford8046
@cstanford8046 7 месяцев назад
Is the SCL really 400kHz? I measured 250kHz after looking at it on a logic analyzer.
@scienceofart9121
@scienceofart9121 2 года назад
I have a question, where are the DEVID constant comes from ? My peripheral adress is 0x6c and it returns x01
@ariaas1096
@ariaas1096 2 года назад
I want to run and get data from GY-271 with raspberry pi pico and I don't know how I must do it. It works with I2C. could you help, please?
@TheStrafendestroy
@TheStrafendestroy Год назад
So I have looked at my i2c line with a logic analyzer and keep gettin g a setup to read followed by a NAK even though im trying to write to the device. I 100 percent have to right address for the device 102 for the EZO_RTD. I did not pull up my resistor in internally since i have them externally. Help would be appreciated I have been trying ti fix this for days void i2c_setup(int SDA, int SCL,uint clock_speed,i2c_inst_t* i2c_port) { i2c_init(i2c_port, clock_speed); // This example will use I2C0 on the default SDA(Pin 0) and SCL(Pin 1) gpio_set_function(SDA, GPIO_FUNC_I2C); // Serial Clock gpio_set_function(SCL, GPIO_FUNC_I2C); // Serial Data line gpio_pull_up(SDA); gpio_pull_up(SCL); } int main() { int SDA = 0; int SCL = 1; // Vairable for read and write blocks uint8_t rxbuff[40]; // Receiving Buffer const uint8_t command[2]= "r"; // Command int len_bytes_command = strlen(command); int max_length_receive_bytes = 40; uint8_t address = 102; // Enable USB UART so we can print status output stdio_init_all(); i2c_setup(SDA,SCL,400*1000,i2c0); while(1) { int written = i2c_write_blocking(i2c0,address,command,1,false); sleep_ms(600); printf("Bytes:%d,Address: %d ",written,address); } return 0; }
@gorge9774
@gorge9774 3 года назад
Hi, i get error that i could not communicate with ADXL343, I don't have an accelerometer as you so i changed ADXL343_ADDR to: ADXL343_ADDR = 0x4c, So it should work fine. I would be grateful if you could help me solve this problem By the way my accelerometer is Grove - MMA7660FC bytearray((DEVID,)) = b'\xe5' data = '\x00'
Далее
Programming a Raspberry Pi Pico with C or C++
19:47
Просмотров 111 тыс.