![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
LIGHT2
Diff: main.cpp
- Revision:
- 236:fd7961dfa78a
- Parent:
- 235:c831718303c9
- Child:
- 237:c2cfe349f5c1
diff -r c831718303c9 -r fd7961dfa78a main.cpp --- a/main.cpp Mon Jun 14 10:36:29 2021 +0000 +++ b/main.cpp Fri Jun 25 12:21:04 2021 +0000 @@ -215,11 +215,11 @@ pc.baud(9600); // i2c init -// i2c.frequency(400 * 1000); // 0.4 mHz -// wait_ms(2); // Power Up wait -// look_for_hardware_i2c(); // Hardware present -// init_as5510(i2c_slave_addr1); -// make_delay(); + i2c.frequency(400 * 1000); // 0.4 mHz + wait_ms(2); // Power Up wait + look_for_hardware_i2c(); // Hardware present + init_as5510(i2c_slave_addr1); + make_delay(); // spi init eeprom_cs = 1; @@ -310,10 +310,10 @@ // timer_while ++; //i2c for SW valve - //if(OPERATING_MODE == 5) { -// read_field(i2c_slave_addr1); -// if(DIR_VALVE_ENC < 0) value = 1023 - value; -// } + if(OPERATING_MODE == 5) { + read_field(i2c_slave_addr1); + if(DIR_VALVE_ENC < 0) value = 1023 - value; + } } }