Skip to content

Instantly share code, notes, and snippets.

@jci
Created November 9, 2017 04:13
Show Gist options
  • Save jci/7449a2d9a184f17e7e69c7ae9ece53c5 to your computer and use it in GitHub Desktop.
Save jci/7449a2d9a184f17e7e69c7ae9ece53c5 to your computer and use it in GitHub Desktop.
#include <inttypes.h>
#include <Arduino.h>
#include <Wire.h>
uint8_t lcd_addr = 0x24;
void setup() {
Wire.begin();
// put your setup code here, to run once:
Serial.begin(9600);
Serial.println("\nI2C Scannerzzzzzz");
}
void loop() {
Wire.beginTransmission(lcd_addr);
Wire.write(B10101010);
Wire.endTransmission();
// Serial.println("\nON");
delay(200);
Wire.beginTransmission(lcd_addr);
Wire.write(B01010101);
Wire.endTransmission();
// Serial.println("\nOFF");
delay(200);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment