This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Arduboy2.h> | |
Arduboy2 arduboy; | |
BeepPin1 beep1; | |
BeepPin2 beep2; | |
static bool tonesPlaying = false; | |
static uint8_t duration = 0; | |
static uint8_t *tonesStart = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Quick and dirty NES to DMG button driver (originally by Mr.Blinky) | |
* | |
* Using digital pins so it can be easily run on any Arduino | |
* Because DigitalRead and DigitalWrite are pretty slow, no delays are | |
* required when changing controller pin states and reading in data | |
*/ | |
//NES button state masks | |
#define BS_A _BV(7) | |
#define BS_B _BV(6) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<!DOCTYPE eagle SYSTEM "eagle.dtd"> | |
<eagle version="8.2.2"> | |
<drawing> | |
<settings> | |
<setting alwaysvectorfont="no"/> | |
<setting verticaltext="up"/> | |
</settings> | |
<grid distance="0.1" unitdist="inch" unit="inch" style="lines" multiple="1" display="no" altdistance="0.01" altunitdist="inch" altunit="inch"/> | |
<layers> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
`default_nettype none // disable implicit definitions by Verilog | |
//----------------------------------------------------------------- | |
// minimalDVID_encoder.vhd : A quick and dirty DVI-D implementation | |
// | |
// Author: Mike Field <[email protected]> | |
// | |
// DVI-D uses TMDS as the 'on the wire' protocol, where each 8-bit | |
// value is mapped to one or two 10-bit symbols, depending on how | |
// many 1s or 0s have been sent. This makes it a DC balanced protocol, | |
// as a correctly implemented stream will have (almost) an equal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Copyright (C) 2018 Pharap (@Pharap) | |
Licensed under the Apache License, Version 2.0 (the "License"); | |
you may not use this file except in compliance with the License. | |
You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 | |
Unless required by applicable law or agreed to in writing, software |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Wire.h> | |
#include "Arduboy2.h" | |
uint8_t AcXH, AcXL; | |
constexpr float Tau = 6.28318530718; | |
constexpr float mapRange(float input, float inputMin, float inputMax, float outputMin, float outputMax) | |
{ | |
return outputMin + (input - inputMin) * ((outputMax - outputMin) / (inputMax - inputMin)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Font data for Bit5x5 | |
// based on http://www.mattlag.com/bitfonts/bit5x5.ttf | |
// | |
#include <avr/io.h> | |
#include <avr/pgmspace.h> | |
// Character bitmaps for Bit5x5 | |
static const unsigned char font[] PROGMEM = |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:100000000C94E8050C9410060C9410060C94100641 | |
:100010000C9410060C9410060C9410060C94100608 | |
:100020000C9410060C9410060C94510F0C941309A8 | |
:100030000C9410060C9410060C9410060C941006E8 | |
:100040000C9410060C9410060C9410060C941006D8 | |
:100050000C9410060C9410060C9410060C94940B3F | |
:100060000C9410060C9410060C9410060C941006B8 | |
:100070000C9410060C9410060C9410060C941006A8 | |
:100080000C9410060C9410060C9410060C94100698 | |
:100090000C9410060C9410060C9410060C94100688 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Read Joystick | |
* ------------ | |
* | |
* Reads two analog pins that are supposed to be | |
* connected to a joystick made of two potentiometers | |
* | |
* http://www.0j0.org | http://arduino.berlios.de | |
* copyleft 2005 DojoDave for DojoCorp | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @file Arduboy2.cpp | |
* \brief | |
* The Arduboy2Base and Arduboy2 classes and support objects and definitions. | |
*/ | |
#include "Arduboy2.h" | |
#include "ab_logo.c" | |
#include "glcdfont.c" |
NewerOlder