tw_two emoji

Posts tagged with :tw_two:

ryan
@ryan0
https://cloud-17yd5lsjg-hack-club-bot.vercel.app/0image.png
matt
@matt0
Building an I2C bus :cooll-thumbs:
https://cloud-2kyatwykh-hack-club-bot.vercel.app/0img_0610.jpghttps://cloud-5uuec6e1e-hack-club-bot.vercel.app/0img_0609.jpg
matt
@matt0
finished learning about i2c and reading the IS31FL3731's data sheet. It works!!!!!
use std:Duration};

use rppal::i2c::I2c;

fn main() {
    let mut i2c = I2c::new().expect("Failed to init i2c");

    i2c.set_slave_address(0x74)
        .expect("Failed to set slave address");

    for row in 0..6 {
        thread::sleep(Duration::from_millis(200));
        i2c.block_write(0x24 + row * 24, &vec![8; 24].into_boxed_slice())
            .expect("Failed to write fill command");
    }
}