Jack Daly
Published © LGPL

8BitCADE XL - An Educational DIY Game Console

8BitCADE XL is an educational DIY gaming console created to educate in a fun and rewarding way - learn code while playing retro games!

BeginnerShowcase (no instructions)1,246
8BitCADE XL - An Educational DIY Game Console

Things used in this project

Hardware components

Arduino Micro & Genuino Micro
Arduino Micro & Genuino 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

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);
    {
    }
  }
}

Credits

Jack Daly

Jack Daly

0 projects • 0 followers
Hi makers! Its Jack from 8BitCADE. Check out 8bitcade.com/release to be notfied for our kickstarter launch!

Comments