Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "U8glib.h"
- U8GLIB_PCD8544 u8g(8, 9, 11, 10, 12); // SPI Com: SCK/CLK = 13, MOSI/DIN = 11, CS/CE = 10, A0/DC = 9, Reset/RST = 8
- int sensorPin = A0;
- int sensorValue = 0;
- void setup() {
- }
- void loop() {
- // picture loop
- u8g.firstPage();
- do {
- u8g.setContrast(128);
- u8g.setFont(u8g_font_fub35n);
- u8g.setPrintPos(0, 44);
- u8g.print(sensorValue);
- } while( u8g.nextPage() );
- sensorValue = analogRead(sensorPin);
- delay(1000);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement