Things used in this project

Hardware components:
TinyDuino Basic Kit
×1
TinyScreen
×1

Code

file_12606.txtC/C++
Libraries included at https://codebender.cc/sketch:80336#TinyScreen_Ke.ino
// Modified from the original TinyScreen_Demo
// Saves power by sleeping the display unless a button is pushed.
// Keeps approximate decimal time if you turn it on at midnight! :)

#define	BLACK           0x00
#define	BLUE            0xE0
#define	RED             0x03
#define	GREEN           0x1C
#define	DGREEN           0x0C
#define YELLOW          0x1F
#define WHITE           0xFF
#define ALPHA           0xFE
#define	BROWN           0x32

float keKeKe;

uint8_t amtcolors=7;
uint8_t colors[]={BLACK,BLUE,RED,GREEN,WHITE,DGREEN,YELLOW};

uint8_t i=0;
  
uint8_t nextColor(){
  if(i>amtcolors)i=0;
  return colors[i++];
}
  
#include "SSD1331.h"
#include <SPI.h>
#include <Wire.h>

SSD1331 display = SSD1331(0);


void setup(void) {
  Wire.begin();
  display.begin();
}

void loop() {
  keKeKe = millis();
  keKeKe = keKeKe / 864000;
  
  if(display.getButtons()){
  	display.on();
    display.fontColor(BLUE,BLACK);
    display.clearWindow(0,0,96,64);
    display.setFont(liberationSans_16ptFontInfo);
    display.setCursor(25,16);
    display.print(keKeKe);
    display.setFont(liberationSans_8ptFontInfo);
	display.fontColor(YELLOW,BLACK);
	display.print("KE");
    delay(2000);
  }else{
    display.off();
  }
  
}
TinyScreen_Ke.zipArduino
No preview (download only).
Codebender

Credits

Photo on 7 5 17 at 5 06 pm 7 05huowsyxv
Alex Glow

The Hackster team's resident Hardware Nerd. I like robots, music, EEG, wearables, and languages. FIRST Robotics kid.

Contact

Replications

Did you replicate this project? Share it!

I made one

Love this project? Think it could be improved? Tell us what you think!

Give feedback

Comments

Similar projects you might like

TinyDuino Radio Controller
Easy
  • 2,262
  • 41

Full instructions

Create a radio transmitter and receiver to control a simple robot!

Ping, the tiny pong clone
Easy
  • 972
  • 28

Full instructions

Tiny pong, lots of fun

Wearable Neopixel Sparkle
Easy
  • 458
  • 9

Full instructions

Who doesn't want a bit of extra sparkle in their everyday life? This simple wearable is easy to make and very comfortable and light.

Smart ID
Easy
  • 135
  • 3

Full instructions

This project is a base for the Smart ID project, which will feature 4D Systems' 3.2" gen4 HMI display modules.

Wearable Tech with TinyLily: Arduino Basics
Easy
  • 1,660
  • 16

Protip

Sewable, washable, and extremely small: build your own wearable devices with this Arduino-based board!

TinySpinner
Easy
  • 485
  • 13

Full instructions

TinyCircuits LED Spinner for games.

Add projectSign up / Login