Compare commits
No commits in common. "f498e9b0cc4c42a62b591cfea70f944516cca43e" and "96295c6d500d6380b46303c3140cb1244601e6bf" have entirely different histories.
f498e9b0cc
...
96295c6d50
26
main.c
26
main.c
@ -158,7 +158,7 @@ void decreaseDutyCycle() {
|
||||
void checkButton(uint8_t pin, const char* message, void (*command)()) {
|
||||
if (bit_is_clear(PINC, pin)) {
|
||||
Serial.println(message);
|
||||
delay(200);
|
||||
delay(1000);
|
||||
command();
|
||||
}
|
||||
}
|
||||
@ -230,27 +230,3 @@ void sendCommand(uint8_t cmd, float value) {
|
||||
|
||||
|
||||
|
||||
|
||||
// void sendCommand(uint8_t cmd, float value) {
|
||||
// uint16_t cmd_value = ((uint16_t)cmd << 8) | (uint16_t)(value * 16);
|
||||
// uint8_t upper_byte = cmd_value >> 8;
|
||||
// uint8_t lower_byte = cmd_value & 0xFF;
|
||||
|
||||
// i2c_start();
|
||||
// i2c_write(PWM_SLAVE_ADDR << 1);
|
||||
// i2c_write(cmd);
|
||||
// i2c_write(upper_byte);
|
||||
// i2c_write(lower_byte);
|
||||
// i2c_stop();
|
||||
|
||||
// Serial.print("Sent command: 0x");
|
||||
// Serial.print(cmd, HEX);
|
||||
// Serial.print(", value: ");
|
||||
// Serial.print(cmd_value / 16);
|
||||
// Serial.print(", cmd value: ");
|
||||
// Serial.print(cmd_value);
|
||||
// Serial.print(", data bytes: 0x");
|
||||
// Serial.print(upper_byte, HEX);
|
||||
// Serial.print(" ");
|
||||
// Serial.println(lower_byte, HEX);
|
||||
// }
|
Loading…
Reference in New Issue
Block a user