You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is the current code. I put commands for an LED to flash in setup() so that i know where the microcontroller is at in terms of its boot up. It doesnt make it past the first flash of the led, meaning it doesnt make it through the initialization of i2c and the oled. Thank you
The text was updated successfully, but these errors were encountered:
How can i modify this for the attiny 84?
Also how can i combine this to be used with a 64x32 oled display?
#include <TinyWireM.h>
#include <Tiny4kOLED.h>
uint8_t width = 64;
uint8_t height = 32;
const int S_CL = 4;
const int S_DA = 6 ;
const int LED = 9;
void setup() {
//setup code here, to run once:
pinMode(S_CL, OUTPUT); // scl
pinMode(LED, OUTPUT);
pinMode(S_DA, OUTPUT); //SDA
digitalWrite(LED, HIGH); // Debug: Indicate wakeup
delay(100);
digitalWrite(LED, LOW);
TinyWireM.begin();
oled.begin(64, 32, sizeof(tiny4koled_init_64x32), tiny4koled_init_64x32);
oled.clear();
oled.setFont(FONT6X8);
oled.on();
digitalWrite(LED, HIGH); // Debug: Indicate wakeup
delay(100);
digitalWrite(LED, LOW);
}
void SOL() {
digitalWrite(LED, HIGH);
delay(50);
digitalWrite(LED, LOW);
delay(50);
}
// add void read
void loop() {
// put main code here, to run repeatedly:
// flash LED
SOL();
delay(50);
oled.clear();
oled.setCursor(0, 0);
oled.setFont(FONT8X16);
oled.println("displayVolt");
oled.setCursor(12, 12);
oled.println("%"); // print
delay(20);
SOL();
oled.clear();
SOL();
SOL();}
This is the current code. I put commands for an LED to flash in setup() so that i know where the microcontroller is at in terms of its boot up. It doesnt make it past the first flash of the led, meaning it doesnt make it through the initialization of i2c and the oled. Thank you
The text was updated successfully, but these errors were encountered: