Jack Daly
Published © LGPL

8BitCADE XL - An Educational DIY Game Console

The 8BitCADE XL is an educational, DIY Game Console that you create to learn in a fun and rewarding way – learn electronics & programming wh

BeginnerShowcase (no instructions)10,287

Things used in this project

Hardware components

Arduino Micro
Arduino Micro
×1
Pro Micro - 5V/16MHz
SparkFun Pro Micro - 5V/16MHz
×1
Tactile Switch, Top Actuated
Tactile Switch, Top Actuated
×1
JLCPCB Customized PCB
JLCPCB Customized PCB
×1
8BitCADE XL DIY Kit
×1

Software apps and online services

Arduino IDE
Arduino IDE

Hand tools and fabrication machines

Soldering iron (generic)
Soldering iron (generic)
Solder Wire, Lead Free
Solder Wire, Lead Free
Multitool, Screwdriver
Multitool, Screwdriver

Story

Read more

Schematics

8BitCADE XL Schematic

We are open source!

Code

8BitCADE_Hardware_Test.ino

Arduino
The 8BitCADE XL hardware test. To download it, head on over to the 8bitcade website at 8bitcade.com/resources
If you want to check out more code for the 8bitcade, the games can be accessed at 8bitcade.com/game and if you want to learn to program using Arduino, head over to 8bitcade.com/learn
/* 8BitCADE Hardware Test written by Steve Daly
  Tests All buttons except reset, LEDS, sound and OLED.
  Sprite Demo using https://diyusthad.com/image2cpp Settings BMP image, Set file resolution eg 34x34, Black Background, Brightness 128, Scale to fit keeping proportions, Centre is required,
  Output Arduino Code, Identifier player (name of sprite), Draw Mode Vertical, Generate code and copy and paste just the drawing code.
*/

#include <Arduboy2.h>
Arduboy2 arduboy;
#include <ArduboyTones.h>
ArduboyTones sound(arduboy.audio.enabled);
#include "sprite.h"

int LED_G = 3;
int LED_R = 10;
int LED_B = 9;

char text[] = "Press Buttons!";
char text1[] = "Hear Sound!";

void setup() {
  arduboy.begin();
  arduboy.clear();
  pinMode(LED_G, OUTPUT);
  pinMode(LED_R, OUTPUT);
  pinMode(LED_B, OUTPUT);

  arduboy.audio.on(); //turns on audio
}
void loop() {
  arduboy.clear();
  arduboy.pollButtons();

  if (arduboy.justPressed(LEFT_BUTTON))
  {
    Sprites::drawOverwrite(0, 0, consoleleft, 0); // X, Y, sprite name.
    arduboy.display();
    digitalWrite(LED_G, LOW);   // turn the LED on (HIGH is the voltage level)
    delay (100);
    digitalWrite(LED_G, HIGH);   // turn the LED on (HIGH is the voltage level)
  }

  if (arduboy.justPressed(RIGHT_BUTTON))
  {
    Sprites::drawOverwrite(0, 0, consoleright, 0); // X, Y, sprite name.
    arduboy.display();
    digitalWrite(LED_B, LOW);   // turn the LED on (HIGH is the voltage level)
    delay (100);
    digitalWrite(LED_B, HIGH);   // turn the LED on (HIGH is the voltage level)
  }

  if (arduboy.justPressed(UP_BUTTON))
  {
    Sprites::drawOverwrite(0, 0, consoleup, 0); // X, Y, sprite name.
    arduboy.display();
    digitalWrite(LED_R, LOW);   // turn the LED on (HIGH is the voltage level)
    delay (100);
    digitalWrite(LED_R, HIGH);   // turn the LED on (HIGH is the voltage level)
  }
  if (arduboy.justPressed(DOWN_BUTTON))
  {
    Sprites::drawOverwrite(0, 0, consoledown, 0); // X, Y, sprite name.
    arduboy.display();
    digitalWrite(LED_G, LOW);   // turn the LED on (HIGH is the voltage level)
    delay (100);
    digitalWrite(LED_G, HIGH);   // turn the LED on (HIGH is the voltage level)
    digitalWrite(LED_R, LOW);   // turn the LED on (HIGH is the voltage level)
    delay (100);
    digitalWrite(LED_R, HIGH);   // turn the LED on (HIGH is the voltage level)
    digitalWrite(LED_B, LOW);   // turn the LED on (HIGH is the voltage level)
    delay (100);
    digitalWrite(LED_B, HIGH);   // turn the LED on (HIGH is the voltage level)
  }
  if (arduboy.justPressed(A_BUTTON))
  {
    Sprites::drawOverwrite(0, 0, console_a, 0); // X, Y, sprite name.
    arduboy.display();
    arduboy.setCursor(30, 54);
    arduboy.print(text1);
    arduboy.display();
    delay (100);

    for (int i = 0; i < 2000; i = i + 100) {
      sound.tone(i, 50);
      delay(50);
    }

  }
  if (arduboy.justPressed(B_BUTTON))
  {
    Sprites::drawOverwrite(0, 0, console_b, 0); // X, Y, sprite name.
    arduboy.setCursor(30, 54);
    arduboy.print(text1);
    arduboy.display();
    delay (100);

    for (int i = 2100; i > 0; i = i - 100) {
      sound.tone(i, 50);
      delay(50);
    }

  }

  else {
    Sprites::drawOverwrite(0, 0, console, 0); // X, Y, sprite name.
    arduboy.setCursor(25, 54);
    arduboy.print(text);
    arduboy.display();
    delay (100);
    {
    }
  }
}

Github! 8BitCADE Calculator!

See our GitHub repo that will be growing over time! Here you can find the Calculator that actually has a tutorial written about it! Check it out at 8bitcade.com/learn

Credits

Jack Daly

Jack Daly

1 project • 12 followers
Hi Makers! I'm Jack, a Maker, Student and founder of microcade. If you have any questions, email me at jackdaly@playmicrocade.com

Comments