Circuit diagram

3Dsimo Kit
Device: 3Dsimo Kit
Rev. 1.00 Page 17/18
++materialID;
}
else {
materialID = 0 ;
}
loadMaterial (materialID);
}
// save that this button UP was already pressed and used
buttonsPressed |= 0x01 ;
}
else {
// save that this button UP was released
buttonsPressed &= 0xFE ;
}
// button DOWN pressed
if ( digitalRead (BTN_UP) && ! digitalRead (BTN_DOWN)){
if (!(buttonsPressed & 0x02 )){
if (materialID > 0 ){
--materialID;
}
else {
materialID = MATERIAL_COUNT- 1 ;
}
loadMaterial(materialID);
}
// save that this button DOWN was already pressed and used
buttonsPressed |= 0x02 ;
}
else {
// save that this button DOWN was released
buttonsPressed &= 0xFD ;
}
}
/*
* GPIO, OLED initialize
* load material profile
* preset timer
*/
void setup () {
// initialize OLED display
ssd1306_128x32_i2c_init ();
ssd1306_clearScreen ();