Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "U8glib.h"
- U8GLIB_DOGM128 u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
- int BPM=0;
- void draw(void) {
- // graphic commands to redraw the complete screen should be placed here
- u8g.setFont(u8g_font_profont29);
- u8g.setPrintPos(0, 40);
- // call procedure from base class, http://arduino.cc/en/Serial/Print
- u8g.print("Puls:");
- u8g.print(BPM);
- }
- void setup(void) {
- u8g.setContrast(55);
- }
- void loop(void) {
- // picture loop
- u8g.firstPage();
- do {
- draw();
- } while( u8g.nextPage() );
- // rebuild the picture after some delay
- delay(500);
- }
Advertisement
Add Comment
Please, Sign In to add comment