kirknorthrop/SSD1306_minimal

attiny with a 64x32 oled display

Opened this issue · 4 comments

Im trying to use this for a simple project with an attiny 84 and a 64x32 oled display. is this possible? Heres the code

const int BATT_V_R = 3;

void setup() {
// put your setup code here, to run once:
TinyWireM.begin();
pinMode(BATT_V_R, INPUT); // BATTERY VOLTAGE READING
}

void read(){
analogRead (BATT_V_R );
BattVolt = (BATT_V_R * (4.2 / 1023.0)) - 3.5; // 854 is = to 3.5 v which is dead
// converts to percent of 100 for display
displayVolt = BattVolt * (100 / .7);

// READS CURRENT andcuts power when threshold reached
rawV = analogRead(LD_C_M) * (4.2 / 1023.0);
current = rawV / 7;

if (current >= .6) { speed_control = 0; }
else {}

}
void Display(){
// insert display funtions here
}

float current = 0 ;

void loop() {
// put your main code here, to run repeatedly:
read();
Display();
}

Thank you

what oled display are you using?

what would i use for the display functions?

what would i use for the display functions?

please check here :

void init(uint8_t address);

you might want to void init(uint8_t address); and then start drawing void printString( char * pText );