/*
I2C LCD Bitbang printing
"Hello i2c World!"
*/
#define SDA 4 // PIN A4 LCD
#define SCL 5 // PIN A5 LCD
//sets i2c pins as outputs and pulls both high for 1us
void i2c_start(){
pinMode(SDA,OUTPUT);
digitalWrite(SDA, 1);
pinMode(SCL,OUTPUT);
digitalWrite(SCL, 1);
delayMicroseconds(1);
digitalWrite(SDA, 0);
digitalWrite(SCL, 0);
}
//i2c write function takes in 8 bit int
void i2c_write(uint8_t data){
for(int i=7; i>=0; i--):
digit
}
// sum function
int sum(int a, int b){
return a + b;
}
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
}
void loop() {
// put your main code here, to run repeatedly:
int total = sum(5,5);
Serial.println(total);
}