Rebuild for use as library with PlatformIO

This commit is contained in:
2023-11-03 18:47:32 +01:00
parent 87417ee974
commit 87bc3d6d8e
18 changed files with 33 additions and 6 deletions
+2
View File
@@ -0,0 +1,2 @@
.vscode/arduino.json
.vscode/c_cpp_properties.json
+1 -1
View File
@@ -462,7 +462,7 @@ void LedSign::SetBrightness(uint8_t brightness)
};
#elif SHADES == 8
const int counts[SHADES] = {
0.0f,
C(0.0f),
C(0.030117819624378613658712f),
C(0.104876339357015456218728f),
C(0.217591430058779512857041f),
@@ -20,6 +20,7 @@
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <Arduino.h>
#include "Charliplexing.h"
const unsigned int inhale_time_ms = 500;
@@ -7,6 +7,7 @@
30/Dez/09 - V0.0 wrote the first version at 26C3/Berlin
*/
#include <Arduino.h>
#include "Charliplexing.h"
struct point {
@@ -1,6 +1,6 @@
#include "Charliplexing.h"
#include "Myfont.h"
#include "Arduino.h"
#include <Arduino.h>
#include <EEPROM.h>
int toggleState;
@@ -19,6 +19,13 @@ byte world[SIZEX][SIZEY][2]; //Creates a double buffer world
long density = 50; //Sets density % during seeding
int geck = 0; //Counter for re-seeding
void upToggleState();
void plasma();
void life();
void DNA();
int neighbours(int x, int y);
void seedWorld();
void setup(){
toggleState = EEPROM.read(EEPROMaddress);
upToggleState();
@@ -11,6 +11,7 @@
On every other column, LEDs between the sines will be subtly lit (hopefully resembling DNA nucleobases).
*/
#include <Arduino.h>
#include "Charliplexing.h" //initializes the LoL Sheild library
@@ -28,6 +28,7 @@
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <Arduino.h>
#include <Charliplexing.h> //Imports the library, which needs to be
//Initialized in setup.
@@ -39,6 +40,9 @@ byte world[2][SIZEX][SIZEY]; //Creates a double buffer world
const int density = 50; //Sets density % during seeding
int geck = 0; //Counter for re-seeding
void seedWorld();
byte neighbours(byte x, byte y);
void setup() {
LedSign::Init(); //Initilizes the LoL Shield
randomSeed(analogRead(5));
@@ -11,6 +11,7 @@
then this value is shaped using a sine function, and this sets the brightness of each LED.
*/
#include <Arduino.h>
#include "Charliplexing.h" //initializes the LoL Sheild library
// Convenient 2D point structure
@@ -1,5 +1,5 @@
#include <Arduino.h>
#include <Charliplexing.h>
#include <avr/pgmspace.h>
//**************************************************************//
// Name : Pong for Arduino / Charlieplexing //
@@ -34,6 +34,9 @@ int8_t x,y,dx,dy;
int8_t sh1y,sh2y,s1,s2;
void drawscores();
void checkscores();
/* ---------------------------------------------------------------------------*/
/* Arduino setup func
*/
@@ -22,10 +22,14 @@
Boston, MA 02111-1307, USA.
*/
#include <Arduino.h>
#include "Charliplexing.h"
#include "Figure.h"
#include "LoLShield_Tetris.h"
void processEndPiece();
void nextPiece();
/** The current level. */
int level;
@@ -329,7 +333,7 @@ void processEndPiece() {
memset(playGrid, '\0', GRID_WIDTH*sizeof(boolean));
// Update the indexes of the other lines to remove.
for (uint8_t k=i; k<numFull; k++)
for (uint8_t k=i; k<numFull; k++)
fullLines[k]++;
}
@@ -28,7 +28,7 @@
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <avr/pgmspace.h> //AVR library for writing to ROM
#include <Arduino.h>
#include <Charliplexing.h> //Imports the library, which needs to be
//Initialized in setup.
@@ -129,6 +129,8 @@ PROGMEM const uint16_t BitMap[][9] = {
{18000}
};
void DisplayBitMap(uint8_t grayscale);
void setup() {
LedSign::Init(GRAYSCALE); //Initializes the screen
}
@@ -22,6 +22,7 @@
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <Arduino.h>
#include "Charliplexing.h"
// Screen "refresh"
@@ -31,7 +31,7 @@
//These libraries need to be included for both the LoL Shield
//and DS1307 breakout.
#include "Charliplexing.h"
#include "WProgram.h"
#include <Arduino.h>
#include <Wire.h>
#include "RTClib.h"
RTC_DS1307 RTC;