Code Monkey home page Code Monkey logo

twang's Introduction

TWANG

A Arduino-based, 1D, LED loving, dungeon crawler. inspired by Line Wobbler by Robin B

Video playlist

A playlist that shows the development of TWANG and the game in both a desktop and house-sized form can be found here: https://www.youtube.com/watch?v=9yf_VINmbTE&list=PL1_Z89_x_Dff-XhOxlx6sQ38wJqe1X2M0

Required libraries:

Hardware used:

  • Arduino MEGA/NANO
  • 3 LEDs for life indicator
  • APA102-C LED light strip. The more the better, maximum of 1000. Tested with 2x 144/meter and 12x 60/meter strips. The FastLED lib works with the less expensive WS2812 LEDs, i've not tried them but should be fine.
  • 5v power supply, assume around 40mW per LED to calculate size
  • MPU6050 accelerometer
  • Spring doorstop, I used these: http://smile.amazon.com/gp/product/B00J4Y5BU2

Enclosure

Files to print your own enclosure can be found here: http://www.thingiverse.com/thing:1116899

Overview

TWANG was developed quickly to make my Halloween lights interactive, the code is fairly well commmented but could be improved. The following is a quick overview of the code to help you understand and tweak the game to your needs.

The game is played on a 1000 unit line, the position of enemies, the player, lava etc range from 0 to 1000 and the LEDs that represent them are derived using the getLED() function. You don't need to worry about this but it's good to know for things like the width of the attack and player max move speed. Regardles of the number of LEDs, everything takes place in this 1000 unit wide line.

ATMEGA4809 The TWANG4809 sketch is intended for use with the Arduino Nano Every and the Uno Wifi REV2 both of which use the Atmega 4809 processor. At the time of writing, these boards do not have out of the box support for FastLED or ToneAC. This sketch removes the ToneAC functionality. For FastLED to function, install this library instead of the one listed in Arduino IDE.

//LED SETUP Defines the quantity of LEDs as well as the data and clock pins used. I've tested several APA102-C strips and the color order sometimes changes from BGR to GBR or GRB, if the player is not blue, the exit green and the enemies red, this is the bit you want to change. Brightness should range from 50 to 255, use a lower number if playing at night or wanting to use a smaller power supply. "DIRECTION" can be set to 0 or 1 to flip the game orientation. In setup() there is a "FastLED.addLeds()" line, in there you could change it to another brand of LED strip like the cheaper WS2812.

The game also has 3 regular LEDs for life indicators (the player gets 3 lives which reset each time they level up). The pins for these LEDs are stored in lifeLEDs[] and are updated in the updateLives() function

//JOYSTICK SETUP All parameters are commented in the code, you can set it to work in both forward/backward as well as side-to-side mode by changing JOYSTICK_ORIENTATION. Adjust the ATTACK_THRESHOLD if the "Twanging" is overly sensitive and the JOYSTICK_DEADZONE if the player slowly drifts when there is no input (because it's hard to get the MPU6050 dead level).

//WOBBLE ATTACK Sets the width, duration (ms) of the attack.

//POOLS These are the object pools for enemies, particles, lava, conveyors etc. You can modify the quantity of any of them if your levels use more or if you want to save some memory, just remember to update the respective counts to avoid errors.

//USE_GRAVITY 0/1 to set if particles created by the player getting killed should fall towards the start point, the BEND_POINT variable can be set to mark the point at which the strip of LEDs goes from been horizontal to vertical. The game is 1000 units wide (regardless of number of LED's) so 500 would be the mid point. If this is confusing just set USE_GRAVITY to 0.

Modifying / Creating levels

Find the loadLevel() function, in there you can see a switch statment with the 10 levels I created. They all call different functions and variables to setup the level. Each one is described below:

playerPosition; Where the player starts on the 0 to 1000 line. If not set it defaults to 0. I set it to 200 in the first level so the player can see movement even if the first action they take is to push the joystick left

spawnEnemy(position, direction, speed, wobble);

  • position: 0 to 1000
  • direction: 0/1, initial direction of travel
  • speed: >=0, speed of the enemy, remember the game is 1000 wide and runs at 60fps. I recommend between 1 and 4
  • wobble: 0=regular moving enemy, 1=sine wave enemy, in this case speed sets the width of the wave

spawnPool[poolNumber].Spawn(position, rate, speed, direction);

  • A spawn pool is a point which spawns enemies forever
  • position: 0 to 1000
  • rate: milliseconds between spawns, 1000 = 1 second
  • speed: speed of the enemis it spawns
  • direction: 0=towards start, 1=away from start

spawnLava(startPoint, endPoint, ontime, offtime, offset);

  • startPoint: 0 to 1000
  • endPoint: 0 to 1000, combined with startPoint this sets the location and size of the lava
  • ontime: How lomg (ms) the lava is ON for
  • offset: How long (ms) after the level starts before the lava turns on, use this to create patterns with multiple lavas

spawnConveyor(startPoint, endPoint, direction);

  • startPoint, endPoint: Same as lava
  • direction: the direction of travel 0/1

spawnBoss()

  • There are no parramaters for a boss, they always spawn in the same place and have 3 lives. Tweak the values of Boss.h to modify

Feel free to edit, comment on the YouTube video (link at top) if you have any questions.

twang's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

twang's Issues

conveyor belts not lighting up

Hi team,

I have this set up and am finding that the Conveyor belts do their function but don't light up. I'm going to do some investigating to see if I can figure it out. Anybody have the same issue?

Warmly,
Sam

no matching function for call to 'CFastLED::addLeds<WS2812, 3, 4, BGR>(CRGB [144], int)'

Hello good day.
I am working on a TWANG, with my son, but compiling the arduino software gives me this error.

no matching function for call to 'CFastLED::addLeds<WS2812, 3, 4, BGR>(CRGB [144], int)'

It happens since I change these lines:

// Fast LED
FastLED.addLeds<APA102, DATA_PIN, CLOCK_PIN, LED_COLOR_ORDER>(leds, NUM_LEDS);
FastLED.setBrightness(BRIGHTNESS);
FastLED.setDither(1);

For this other line.

// Fast LED
FastLED.addLeds<WS2812, DATA_PIN, CLOCK_PIN, LED_COLOR_ORDER>(leds, NUM_LEDS);
FastLED.setBrightness(BRIGHTNESS);
FastLED.setDither(1);

Could you help me understand the problem?

Sourcecode of 1D Pong

Hey, sorry for abusing the "Issues" function.
Is the Sourcecode for the 1D Pong (seen at 34c3) online? I really want to build my own.

Thank you for your work

Sascha

redifinition errors

Hey friends,

Upon downloading and trying an initial compile, I get a bunch of redefinition errors, and I imagine I must be making some mistake in setup? I'm curious if others know what's going on.

See errors below. :)

of Arduino: 1.8.16 (Mac OS X), Board: "Arduino Mega or Mega 2560, ATmega2560 (Mega 2560)"

In file included from /Users/BlapBlap/Documents/GitHub/TWANG/TWANG.ino:2:0:
/Users/BlapBlap/Documents/Arduino/libraries/FastLED-master/FastLED.h:14:21: note: #pragma message: FastLED version 3.002.001

pragma message "FastLED version 3.002.001"
1
^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /Users/BlapBlap/Documents/GitHub/TWANG/TWANG4809.ino:7:0:
iSin.h:3:7: error: redefinition of 'class iSin'
class iSin
^~~~
In file included from /Users/BlapBlap/Documents/GitHub/TWANG/TWANG.ino:7:0:
/Users/BlapBlap/Documents/GitHub/TWANG/iSin.h:3:7: note: previous definition of 'class iSin'
class iSin
^~~~
In file included from /Users/BlapBlap/Documents/GitHub/TWANG/TWANG4809.ino:7:0:
iSin.h:21:5: error: redefinition of 'int iSin::convert(long int)'
int iSin::convert(long x)
^~~~
In file included from /Users/BlapBlap/Documents/GitHub/TWANG/TWANG.ino:7:0:
/Users/BlapBlap/Documents/GitHub/TWANG/iSin.h:21:5: note: 'int iSin::convert(long int)' previously defined here
int iSin::convert(long x)
^~~~
In file included from /Users/BlapBlap/Documents/GitHub/TWANG/TWANG4809.ino:11:0:
Enemy.h:3:7: error: redefinition of 'class Enemy'
class Enemy
^~~~~
In file included from /Users/BlapBlap/Documents/GitHub/TWANG/TWANG.ino:11:0:
/Users/BlapBlap/Documents/GitHub/TWANG/Enemy.h:3:7: note: previous definition of 'class Enemy'
class Enemy
^~~~~
In file included from /Users/BlapBlap/Documents/GitHub/TWANG/TWANG4809.ino:11:0:
Enemy.h:20:6: error: redefinition of 'void Enemy::Spawn(int, int, int, int)'
void Enemy::Spawn(int pos, int dir, int sp, int wobble){
^~~~~
In file included from /Users/BlapBlap/Documents/GitHub/TWANG/TWANG.ino:11:0:
/Users/BlapBlap/Documents/GitHub/TWANG/Enemy.h:20:6: note: 'void Enemy::Spawn(int, int, int, int)' previously defined here
void Enemy::Spawn(int pos, int dir, int sp, int wobble){
^~~~~
In file included from /Users/BlapBlap/Documents/GitHub/TWANG/TWANG4809.ino:11:0:
Enemy.h:29:6: error: redefinition of 'void Enemy::Tick()'
void Enemy::Tick(){
^~~~~
In file included from /Users/BlapBlap/Documents/GitHub/TWANG/TWANG.ino:11:0:
/Users/BlapBlap/Documents/GitHub/TWANG/Enemy.h:29:6: note: 'void Enemy::Tick()' previously defined here
void Enemy::Tick(){
^~~~~
In file included from /Users/BlapBlap/Documents/GitHub/TWANG/TWANG4809.ino:11:0:
Enemy.h:49:6: error: redefinition of 'bool Enemy::Alive()'
bool Enemy::Alive(){
^~~~~
In file included from /Users/BlapBlap/Documents/GitHub/TWANG/TWANG.ino:11:0:
/Users/BlapBlap/Documents/GitHub/TWANG/Enemy.h:49:6: note: 'bool Enemy::Alive()' previously defined here
bool Enemy::Alive(){
^~~~~
In file included from /Users/BlapBlap/Documents/GitHub/TWANG/TWANG4809.ino:11:0:
Enemy.h:53:6: error: redefinition of 'void Enemy::Kill()'
void Enemy::Kill(){
^~~~~
In file included from /Users/BlapBlap/Documents/GitHub/TWANG/TWANG.ino:11:0:
/Users/BlapBlap/Documents/GitHub/TWANG/Enemy.h:53:6: note: 'void Enemy::Kill()' previously defined here
void Enemy::Kill(){
^~~~~
In file included from /Users/BlapBlap/Documents/GitHub/TWANG/TWANG4809.ino:12:0:
Particle.h:4:7: error: redefinition of 'class Particle'
class Particle
^~~~~~~~
In file included from /Users/BlapBlap/Documents/GitHub/TWANG/TWANG.ino:12:0:
/Users/BlapBlap/Documents/GitHub/TWANG/Particle.h:4:7: note: previous definition of 'class Particle'
class Particle
^~~~~~~~
In file included from /Users/BlapBlap/Documents/GitHub/TWANG/TWANG4809.ino:12:0:
Particle.h:19:6: error: redefinition of 'void Particle::Spawn(int)'
void Particle::Spawn(int pos){
^~~~~~~~
In file included from /Users/BlapBlap/Documents/GitHub/TWANG/TWANG.ino:12:0:
/Users/BlapBlap/Documents/GitHub/TWANG/Particle.h:19:6: note: 'void Particle::Spawn(int)' previously defined here
void Particle::Spawn(int pos){
^~~~~~~~
TWANG:31:30: error: expected ',' or '...' before numeric constant
#define USE_GRAVITY 1 // 0/1 use gravity (LED strip going up wall)
^
/Users/BlapBlap/Documents/GitHub/TWANG/Particle.h:27:25: note: in expansion of macro 'USE_GRAVITY'
void Particle::Tick(int USE_GRAVITY){
^~~~~~~~~~~
In file included from /Users/BlapBlap/Documents/GitHub/TWANG/TWANG4809.ino:12:0:
Particle.h:27:6: error: redefinition of 'void Particle::Tick(int)'
void Particle::Tick(int USE_GRAVITY){
^~~~~~~~
In file included from /Users/BlapBlap/Documents/GitHub/TWANG/TWANG.ino:12:0:
/Users/BlapBlap/Documents/GitHub/TWANG/Particle.h:27:6: note: 'void Particle::Tick(int)' previously defined here
void Particle::Tick(int USE_GRAVITY){
^~~~~~~~
In file included from /Users/BlapBlap/Documents/GitHub/TWANG/TWANG4809.ino:12:0:
Particle.h:53:6: error: redefinition of 'bool Particle::Alive()'
bool Particle::Alive(){
^~~~~~~~
In file included from /Users/BlapBlap/Documents/GitHub/TWANG/TWANG.ino:12:0:
/Users/BlapBlap/Documents/GitHub/TWANG/Particle.h:53:6: note: 'bool Particle::Alive()' previously defined here
bool Particle::Alive(){
^~~~~~~~
In file included from /Users/BlapBlap/Documents/GitHub/TWANG/TWANG4809.ino:12:0:
Particle.h:57:6: error: redefinition of 'void Particle::Kill()'
void Particle::Kill(){
^~~~~~~~
In file included from /Users/BlapBlap/Documents/GitHub/TWANG/TWANG.ino:12:0:
/Users/BlapBlap/Documents/GitHub/TWANG/Particle.h:57:6: note: 'void Particle::Kill()' previously defined here
void Particle::Kill(){
^~~~~~~~
In file included from /Users/BlapBlap/Documents/GitHub/TWANG/TWANG4809.ino:13:0:
Spawner.h:3:7: error: redefinition of 'class Spawner'
class Spawner
^~~~~~~
In file included from /Users/BlapBlap/Documents/GitHub/TWANG/TWANG.ino:13:0:
/Users/BlapBlap/Documents/GitHub/TWANG/Spawner.h:3:7: note: previous definition of 'class Spawner'
class Spawner
^~~~~~~
In file included from /Users/BlapBlap/Documents/GitHub/TWANG/TWANG4809.ino:13:0:
Spawner.h:19:6: error: redefinition of 'void Spawner::Spawn(int, int, int, int, long int)'
void Spawner::Spawn(int pos, int rate, int sp, int dir, long activate){
^~~~~~~
In file included from /Users/BlapBlap/Documents/GitHub/TWANG/TWANG.ino:13:0:
/Users/BlapBlap/Documents/GitHub/TWANG/Spawner.h:19:6: note: 'void Spawner::Spawn(int, int, int, int, long int)' previously defined here
void Spawner::Spawn(int pos, int rate, int sp, int dir, long activate){
^~~~~~~
In file included from /Users/BlapBlap/Documents/GitHub/TWANG/TWANG4809.ino:13:0:
Spawner.h:28:6: error: redefinition of 'void Spawner::Kill()'
void Spawner::Kill(){
^~~~~~~
In file included from /Users/BlapBlap/Documents/GitHub/TWANG/TWANG.ino:13:0:
/Users/BlapBlap/Documents/GitHub/TWANG/Spawner.h:28:6: note: 'void Spawner::Kill()' previously defined here
void Spawner::Kill(){
^~~~~~~
In file included from /Users/BlapBlap/Documents/GitHub/TWANG/TWANG4809.ino:13:0:
Spawner.h:33:5: error: redefinition of 'int Spawner::Alive()'
int Spawner::Alive(){
^~~~~~~
In file included from /Users/BlapBlap/Documents/GitHub/TWANG/TWANG.ino:13:0:
/Users/BlapBlap/Documents/GitHub/TWANG/Spawner.h:33:5: note: 'int Spawner::Alive()' previously defined here
int Spawner::Alive(){
^~~~~~~
In file included from /Users/BlapBlap/Documents/GitHub/TWANG/TWANG4809.ino:14:0:
Lava.h:3:7: error: redefinition of 'class Lava'
class Lava
^~~~
In file included from /Users/BlapBlap/Documents/GitHub/TWANG/TWANG.ino:14:0:
/Users/BlapBlap/Documents/GitHub/TWANG/Lava.h:3:7: note: previous definition of 'class Lava'
class Lava
^~~~
In file included from /Users/BlapBlap/Documents/GitHub/TWANG/TWANG4809.ino:14:0:
Lava.h:20:6: error: redefinition of 'void Lava::Spawn(int, int, int, int, int, char*)'
void Lava::Spawn(int left, int right, int ontime, int offtime, int offset, char* state){
^~~~
In file included from /Users/BlapBlap/Documents/GitHub/TWANG/TWANG.ino:14:0:
/Users/BlapBlap/Documents/GitHub/TWANG/Lava.h:20:6: note: 'void Lava::Spawn(int, int, int, int, int, char*)' previously defined here
void Lava::Spawn(int left, int right, int ontime, int offtime, int offset, char* state){
^~~~
In file included from /Users/BlapBlap/Documents/GitHub/TWANG/TWANG4809.ino:14:0:
Lava.h:31:6: error: redefinition of 'void Lava::Kill()'
void Lava::Kill(){
^~~~
In file included from /Users/BlapBlap/Documents/GitHub/TWANG/TWANG.ino:14:0:
/Users/BlapBlap/Documents/GitHub/TWANG/Lava.h:31:6: note: 'void Lava::Kill()' previously defined here
void Lava::Kill(){
^~~~
In file included from /Users/BlapBlap/Documents/GitHub/TWANG/TWANG4809.ino:14:0:
Lava.h:35:5: error: redefinition of 'int Lava::Alive()'
int Lava::Alive(){
^~~~
In file included from /Users/BlapBlap/Documents/GitHub/TWANG/TWANG.ino:14:0:
/Users/BlapBlap/Documents/GitHub/TWANG/Lava.h:35:5: note: 'int Lava::Alive()' previously defined here
int Lava::Alive(){
^~~~
In file included from /Users/BlapBlap/Documents/GitHub/TWANG/TWANG4809.ino:15:0:
Boss.h:3:7: error: redefinition of 'class Boss'
class Boss
^~~~
In file included from /Users/BlapBlap/Documents/GitHub/TWANG/TWANG.ino:15:0:
/Users/BlapBlap/Documents/GitHub/TWANG/Boss.h:3:7: note: previous definition of 'class Boss'
class Boss
^~~~
In file included from /Users/BlapBlap/Documents/GitHub/TWANG/TWANG4809.ino:15:0:
Boss.h:17:6: error: redefinition of 'void Boss::Spawn()'
void Boss::Spawn(){
^~~~
In file included from /Users/BlapBlap/Documents/GitHub/TWANG/TWANG.ino:15:0:
/Users/BlapBlap/Documents/GitHub/TWANG/Boss.h:17:6: note: 'void Boss::Spawn()' previously defined here
void Boss::Spawn(){
^~~~
In file included from /Users/BlapBlap/Documents/GitHub/TWANG/TWANG4809.ino:15:0:
Boss.h:23:6: error: redefinition of 'void Boss::Hit()'
void Boss::Hit(){
^~~~
In file included from /Users/BlapBlap/Documents/GitHub/TWANG/TWANG.ino:15:0:
/Users/BlapBlap/Documents/GitHub/TWANG/Boss.h:23:6: note: 'void Boss::Hit()' previously defined here
void Boss::Hit(){
^~~~
In file included from /Users/BlapBlap/Documents/GitHub/TWANG/TWANG4809.ino:15:0:
Boss.h:36:6: error: redefinition of 'bool Boss::Alive()'
bool Boss::Alive(){
^~~~
In file included from /Users/BlapBlap/Documents/GitHub/TWANG/TWANG.ino:15:0:
/Users/BlapBlap/Documents/GitHub/TWANG/Boss.h:36:6: note: 'bool Boss::Alive()' previously defined here
bool Boss::Alive(){
^~~~
In file included from /Users/BlapBlap/Documents/GitHub/TWANG/TWANG4809.ino:15:0:
Boss.h:40:6: error: redefinition of 'void Boss::Kill()'
void Boss::Kill(){
^~~~
In file included from /Users/BlapBlap/Documents/GitHub/TWANG/TWANG.ino:15:0:
/Users/BlapBlap/Documents/GitHub/TWANG/Boss.h:40:6: note: 'void Boss::Kill()' previously defined here
void Boss::Kill(){
^~~~
In file included from /Users/BlapBlap/Documents/GitHub/TWANG/TWANG4809.ino:16:0:
Conveyor.h:3:7: error: redefinition of 'class Conveyor'
class Conveyor
^~~~~~~~
In file included from /Users/BlapBlap/Documents/GitHub/TWANG/TWANG.ino:16:0:
/Users/BlapBlap/Documents/GitHub/TWANG/Conveyor.h:3:7: note: previous definition of 'class Conveyor'
class Conveyor
^~~~~~~~
In file included from /Users/BlapBlap/Documents/GitHub/TWANG/TWANG4809.ino:16:0:
Conveyor.h:14:6: error: redefinition of 'void Conveyor::Spawn(int, int, int)'
void Conveyor::Spawn(int startPoint, int endPoint, int dir){
^~~~~~~~
In file included from /Users/BlapBlap/Documents/GitHub/TWANG/TWANG.ino:16:0:
/Users/BlapBlap/Documents/GitHub/TWANG/Conveyor.h:14:6: note: 'void Conveyor::Spawn(int, int, int)' previously defined here
void Conveyor::Spawn(int startPoint, int endPoint, int dir){
^~~~~~~~
In file included from /Users/BlapBlap/Documents/GitHub/TWANG/TWANG4809.ino:16:0:
Conveyor.h:21:6: error: redefinition of 'void Conveyor::Kill()'
void Conveyor::Kill(){
^~~~~~~~
In file included from /Users/BlapBlap/Documents/GitHub/TWANG/TWANG.ino:16:0:
/Users/BlapBlap/Documents/GitHub/TWANG/Conveyor.h:21:6: note: 'void Conveyor::Kill()' previously defined here
void Conveyor::Kill(){
^~~~~~~~
TWANG4809:19:9: error: redefinition of 'MPU6050 accelgyro'
MPU6050 accelgyro;
^~~~~~~~~
/Users/BlapBlap/Documents/GitHub/TWANG/TWANG.ino:19:9: note: 'MPU6050 accelgyro' previously declared here
MPU6050 accelgyro;
^~~~~~~~~
TWANG4809:20:9: error: redefinition of 'int16_t ax'
int16_t ax, ay, az;
^~
/Users/BlapBlap/Documents/GitHub/TWANG/TWANG.ino:20:9: note: 'int16_t ax' previously declared here
int16_t ax, ay, az;
^~
TWANG4809:20:13: error: redefinition of 'int16_t ay'
int16_t ax, ay, az;
^~
/Users/BlapBlap/Documents/GitHub/TWANG/TWANG.ino:20:13: note: 'int16_t ay' previously declared here
int16_t ax, ay, az;
^~
TWANG4809:20:17: error: redefinition of 'int16_t az'
int16_t ax, ay, az;
^~
/Users/BlapBlap/Documents/GitHub/TWANG/TWANG.ino:20:17: note: 'int16_t az' previously declared here
int16_t ax, ay, az;
^~
TWANG4809:21:9: error: redefinition of 'int16_t gx'
int16_t gx, gy, gz;
^~
/Users/BlapBlap/Documents/GitHub/TWANG/TWANG.ino:21:9: note: 'int16_t gx' previously declared here
int16_t gx, gy, gz;
^~
TWANG4809:21:13: error: redefinition of 'int16_t gy'
int16_t gx, gy, gz;
^~
/Users/BlapBlap/Documents/GitHub/TWANG/TWANG.ino:21:13: note: 'int16_t gy' previously declared here
int16_t gx, gy, gz;
^~
TWANG4809:21:17: error: redefinition of 'int16_t gz'
int16_t gx, gy, gz;
^~
/Users/BlapBlap/Documents/GitHub/TWANG/TWANG.ino:21:17: note: 'int16_t gz' previously declared here
int16_t gx, gy, gz;
^~
TWANG4809:36:6: error: redefinition of 'long int previousMillis'
long previousMillis = 0; // Time of the last redraw
^~~~~~~~~~~~~~
/Users/BlapBlap/Documents/GitHub/TWANG/TWANG.ino:36:6: note: 'long int previousMillis' previously defined here
long previousMillis = 0; // Time of the last redraw
^~~~~~~~~~~~~~
TWANG4809:37:5: error: redefinition of 'int levelNumber'
int levelNumber = 0;
^~~~~~~~~~~
/Users/BlapBlap/Documents/GitHub/TWANG/TWANG.ino:37:5: note: 'int levelNumber' previously defined here
int levelNumber = 0;
^~~~~~~~~~~
TWANG4809:38:6: error: redefinition of 'long int lastInputTime'
long lastInputTime = 0;
^~~~~~~~~~~~~
/Users/BlapBlap/Documents/GitHub/TWANG/TWANG.ino:38:6: note: 'long int lastInputTime' previously defined here
long lastInputTime = 0;
^~~~~~~~~~~~~
TWANG4809:42:6: error: redefinition of 'iSin isin'
iSin isin = iSin();
^~~~
/Users/BlapBlap/Documents/GitHub/TWANG/TWANG.ino:42:6: note: 'iSin isin' previously defined here
iSin isin = iSin();
^~~~
TWANG4809:49:5: error: redefinition of 'int joystickTilt'
int joystickTilt = 0; // Stores the angle of the joystick
^~~~~~~~~~~~
/Users/BlapBlap/Documents/GitHub/TWANG/TWANG.ino:49:5: note: 'int joystickTilt' previously defined here
int joystickTilt = 0; // Stores the angle of the joystick
^~~~~~~~~~~~
TWANG4809:50:5: error: redefinition of 'int joystickWobble'
int joystickWobble = 0; // Stores the max amount of acceleration (wobble)
^~~~~~~~~~~~~~
/Users/BlapBlap/Documents/GitHub/TWANG/TWANG.ino:50:5: note: 'int joystickWobble' previously defined here
int joystickWobble = 0; // Stores the max amount of acceleration (wobble)
^~~~~~~~~~~~~~
TWANG4809:55:6: error: redefinition of 'long int attackMillis'
long attackMillis = 0; // Time the attack started
^~~~~~~~~~~~
/Users/BlapBlap/Documents/GitHub/TWANG/TWANG.ino:55:6: note: 'long int attackMillis' previously defined here
long attackMillis = 0; // Time the attack started
^~~~~~~~~~~~
TWANG4809:56:6: error: redefinition of 'bool attacking'
bool attacking = 0; // Is the attack in progress?
^~~~~~~~~
/Users/BlapBlap/Documents/GitHub/TWANG/TWANG.ino:56:6: note: 'bool attacking' previously defined here
bool attacking = 0; // Is the attack in progress?
^~~~~~~~~
TWANG4809:61:7: error: redefinition of 'char* stage'
char* stage; // what stage the game is at (PLAY/DEAD/WIN/GAMEOVER)
^~~~~
/Users/BlapBlap/Documents/GitHub/TWANG/TWANG.ino:61:7: note: 'char* stage' previously declared here
char* stage; // what stage the game is at (PLAY/DEAD/WIN/GAMEOVER)
^~~~~
TWANG4809:62:6: error: redefinition of 'long int stageStartTime'
long stageStartTime; // Stores the time the stage changed for stages that are time based
^~~~~~~~~~~~~~
/Users/BlapBlap/Documents/GitHub/TWANG/TWANG.ino:62:6: note: 'long int stageStartTime' previously declared here
long stageStartTime; // Stores the time the stage changed for stages that are time based
^~~~~~~~~~~~~~
TWANG4809:63:5: error: redefinition of 'int playerPosition'
int playerPosition; // Stores the player position
^~~~~~~~~~~~~~
/Users/BlapBlap/Documents/GitHub/TWANG/TWANG.ino:63:5: note: 'int playerPosition' previously declared here
int playerPosition; // Stores the player position
^~~~~~~~~~~~~~
TWANG4809:64:5: error: redefinition of 'int playerPositionModifier'
int playerPositionModifier; // +/- adjustment to player position
^~~~~~~~~~~~~~~~~~~~~~
/Users/BlapBlap/Documents/GitHub/TWANG/TWANG.ino:64:5: note: 'int playerPositionModifier' previously declared here
int playerPositionModifier; // +/- adjustment to player position
^~~~~~~~~~~~~~~~~~~~~~
TWANG4809:65:6: error: redefinition of 'bool playerAlive'
bool playerAlive;
^~~~~~~~~~~
/Users/BlapBlap/Documents/GitHub/TWANG/TWANG.ino:65:6: note: 'bool playerAlive' previously declared here
bool playerAlive;
^~~~~~~~~~~
TWANG4809:66:6: error: redefinition of 'long int killTime'
long killTime;
^~~~~~~~
/Users/BlapBlap/Documents/GitHub/TWANG/TWANG.ino:66:6: note: 'long int killTime' previously declared here
long killTime;
^~~~~~~~
TWANG4809:67:5: error: redefinition of 'int lives'
int lives = 3;
^~~~~
/Users/BlapBlap/Documents/GitHub/TWANG/TWANG.ino:67:5: note: 'int lives' previously defined here
int lives = 3;
^~~~~
TWANG4809:70:15: error: redefinition of 'int lifeLEDs [3]'
int lifeLEDs[3] = {52, 50, 40};
^
/Users/BlapBlap/Documents/GitHub/TWANG/TWANG.ino:70:5: note: 'int lifeLEDs [3]' previously defined here
int lifeLEDs[3] = {52, 50, 40};
^~~~~~~~
TWANG4809:71:19: error: redefinition of 'Enemy enemyPool [10]'
Enemy enemyPool[10] = {
^
/Users/BlapBlap/Documents/GitHub/TWANG/TWANG.ino:71:7: note: 'Enemy enemyPool [10]' previously defined here
Enemy enemyPool[10] = {
^~~~~~~~~
TWANG4809:74:11: error: redefinition of 'const int enemyCount'
int const enemyCount = 10;
^~~~~~~~~~
/Users/BlapBlap/Documents/GitHub/TWANG/TWANG.ino:74:11: note: 'const int enemyCount' previously defined here
int const enemyCount = 10;
^~~~~~~~~~
TWANG4809:75:25: error: redefinition of 'Particle particlePool [40]'
Particle particlePool[40] = {
^
/Users/BlapBlap/Documents/GitHub/TWANG/TWANG.ino:75:10: note: 'Particle particlePool [40]' previously defined here
Particle particlePool[40] = {
^~~~~~~~~~~~
TWANG4809:78:11: error: redefinition of 'const int particleCount'
int const particleCount = 40;
^~~~~~~~~~~~~
/Users/BlapBlap/Documents/GitHub/TWANG/TWANG.ino:78:11: note: 'const int particleCount' previously defined here
int const particleCount = 40;
^~~~~~~~~~~~~
TWANG4809:79:20: error: redefinition of 'Spawner spawnPool [2]'
Spawner spawnPool[2] = {
^
/Users/BlapBlap/Documents/GitHub/TWANG/TWANG.ino:79:9: note: 'Spawner spawnPool [2]' previously defined here
Spawner spawnPool[2] = {
^~~~~~~~~
TWANG4809:82:11: error: redefinition of 'const int spawnCount'
int const spawnCount = 2;
^~~~~~~~~~
/Users/BlapBlap/Documents/GitHub/TWANG/TWANG.ino:82:11: note: 'const int spawnCount' previously defined here
int const spawnCount = 2;
^~~~~~~~~~
TWANG4809:83:16: error: redefinition of 'Lava lavaPool [4]'
Lava lavaPool[4] = {
^
/Users/BlapBlap/Documents/GitHub/TWANG/TWANG.ino:83:6: note: 'Lava lavaPool [4]' previously defined here
Lava lavaPool[4] = {
^~~~~~~~
TWANG4809:86:11: error: redefinition of 'const int lavaCount'
int const lavaCount = 4;
^~~~~~~~~
/Users/BlapBlap/Documents/GitHub/TWANG/TWANG.ino:86:11: note: 'const int lavaCount' previously defined here
int const lavaCount = 4;
^~~~~~~~~
TWANG4809:87:24: error: redefinition of 'Conveyor conveyorPool [2]'
Conveyor conveyorPool[2] = {
^
/Users/BlapBlap/Documents/GitHub/TWANG/TWANG.ino:87:10: note: 'Conveyor conveyorPool [2]' previously defined here
Conveyor conveyorPool[2] = {
^~~~~~~~~~~~
TWANG4809:90:11: error: redefinition of 'const int conveyorCount'
int const conveyorCount = 2;
^~~~~~~~~~~~~
/Users/BlapBlap/Documents/GitHub/TWANG/TWANG.ino:90:11: note: 'const int conveyorCount' previously defined here
int const conveyorCount = 2;
^~~~~~~~~~~~~
TWANG4809:91:6: error: redefinition of 'Boss boss'
Boss boss = Boss();
^~~~
/Users/BlapBlap/Documents/GitHub/TWANG/TWANG.ino:91:6: note: 'Boss boss' previously defined here
Boss boss = Boss();
^~~~
TWANG4809:93:19: error: redefinition of 'CRGB leds [475]'
CRGB leds[NUM_LEDS];
^
/Users/BlapBlap/Documents/GitHub/TWANG/TWANG.ino:93:6: note: 'CRGB leds [475]' previously declared here
CRGB leds[NUM_LEDS];
^~~~
TWANG4809:94:15: error: redefinition of 'RunningMedian MPUAngleSamples'
RunningMedian MPUAngleSamples = RunningMedian(5);
^~~~~~~~~~~~~~~
/Users/BlapBlap/Documents/GitHub/TWANG/TWANG.ino:94:15: note: 'RunningMedian MPUAngleSamples' previously declared here
RunningMedian MPUAngleSamples = RunningMedian(5);
^~~~~~~~~~~~~~~
TWANG4809:95:15: error: redefinition of 'RunningMedian MPUWobbleSamples'
RunningMedian MPUWobbleSamples = RunningMedian(5);
^~~~~~~~~~~~~~~~
/Users/BlapBlap/Documents/GitHub/TWANG/TWANG.ino:95:15: note: 'RunningMedian MPUWobbleSamples' previously declared here
RunningMedian MPUWobbleSamples = RunningMedian(5);
^~~~~~~~~~~~~~~~
/Users/BlapBlap/Documents/GitHub/TWANG/TWANG4809.ino: In function 'void setup()':
TWANG4809:97:6: error: redefinition of 'void setup()'
void setup() {
^~~~~
/Users/BlapBlap/Documents/GitHub/TWANG/TWANG.ino:97:6: note: 'void setup()' previously defined here
void setup() {
^~~~~
/Users/BlapBlap/Documents/GitHub/TWANG/TWANG4809.ino: In function 'void loop()':
TWANG4809:124:6: error: redefinition of 'void loop()'
void loop() {
^~~~
/Users/BlapBlap/Documents/GitHub/TWANG/TWANG.ino:121:6: note: 'void loop()' previously defined here
void loop() {
^~~~
/Users/BlapBlap/Documents/GitHub/TWANG/TWANG4809.ino: In function 'void loadLevel()':
TWANG4809:264:6: error: redefinition of 'void loadLevel()'
void loadLevel(){
^~~~~~~~~
/Users/BlapBlap/Documents/GitHub/TWANG/TWANG.ino:261:6: note: 'void loadLevel()' previously defined here
void loadLevel(){
^~~~~~~~~
/Users/BlapBlap/Documents/GitHub/TWANG/TWANG4809.ino: In function 'void spawnBoss()':
TWANG4809:334:6: error: redefinition of 'void spawnBoss()'
void spawnBoss(){
^~~~~~~~~
/Users/BlapBlap/Documents/GitHub/TWANG/TWANG.ino:331:6: note: 'void spawnBoss()' previously defined here
void spawnBoss(){
^~~~~~~~~
/Users/BlapBlap/Documents/GitHub/TWANG/TWANG4809.ino: In function 'void moveBoss()':
TWANG4809:339:6: error: redefinition of 'void moveBoss()'
void moveBoss(){
^~~~~~~~
/Users/BlapBlap/Documents/GitHub/TWANG/TWANG.ino:336:6: note: 'void moveBoss()' previously defined here
void moveBoss(){
^~~~~~~~
/Users/BlapBlap/Documents/GitHub/TWANG/TWANG4809.ino: In function 'void spawnEnemy(int, int, int, int)':
TWANG4809:347:6: error: redefinition of 'void spawnEnemy(int, int, int, int)'
void spawnEnemy(int pos, int dir, int sp, int wobble){
^~~~~~~~~~
/Users/BlapBlap/Documents/GitHub/TWANG/TWANG.ino:344:6: note: 'void spawnEnemy(int, int, int, int)' previously defined here
void spawnEnemy(int pos, int dir, int sp, int wobble){
^~~~~~~~~~
/Users/BlapBlap/Documents/GitHub/TWANG/TWANG4809.ino: In function 'void spawnLava(int, int, int, int, int, char*)':
TWANG4809:357:6: error: redefinition of 'void spawnLava(int, int, int, int, int, char*)'
void spawnLava(int left, int right, int ontime, int offtime, int offset, char* state){
^~~~~~~~~
/Users/BlapBlap/Documents/GitHub/TWANG/TWANG.ino:354:6: note: 'void spawnLava(int, int, int, int, int, char*)' previously defined here
void spawnLava(int left, int right, int ontime, int offtime, int offset, char* state){
^~~~~~~~~
/Users/BlapBlap/Documents/GitHub/TWANG/TWANG4809.ino: In function 'void spawnConveyor(int, int, int)':
TWANG4809:366:6: error: redefinition of 'void spawnConveyor(int, int, int)'
void spawnConveyor(int startPoint, int endPoint, int dir){
^~~~~~~~~~~~~
/Users/BlapBlap/Documents/GitHub/TWANG/TWANG.ino:363:6: note: 'void spawnConveyor(int, int, int)' previously defined here
void spawnConveyor(int startPoint, int endPoint, int dir){
^~~~~~~~~~~~~
/Users/BlapBlap/Documents/GitHub/TWANG/TWANG4809.ino: In function 'void cleanupLevel()':
TWANG4809:375:6: error: redefinition of 'void cleanupLevel()'
void cleanupLevel(){
^~~~~~~~~~~~
/Users/BlapBlap/Documents/GitHub/TWANG/TWANG.ino:372:6: note: 'void cleanupLevel()' previously defined here
void cleanupLevel(){
^~~~~~~~~~~~
/Users/BlapBlap/Documents/GitHub/TWANG/TWANG4809.ino: In function 'void levelComplete()':
TWANG4809:394:6: error: redefinition of 'void levelComplete()'
void levelComplete(){
^~~~~~~~~~~~~
/Users/BlapBlap/Documents/GitHub/TWANG/TWANG.ino:391:6: note: 'void levelComplete()' previously defined here
void levelComplete(){
^~~~~~~~~~~~~
/Users/BlapBlap/Documents/GitHub/TWANG/TWANG4809.ino: In function 'void nextLevel()':
TWANG4809:402:6: error: redefinition of 'void nextLevel()'
void nextLevel(){
^~~~~~~~~
/Users/BlapBlap/Documents/GitHub/TWANG/TWANG.ino:399:6: note: 'void nextLevel()' previously defined here
void nextLevel(){
^~~~~~~~~
/Users/BlapBlap/Documents/GitHub/TWANG/TWANG4809.ino: In function 'void gameOver()':
TWANG4809:408:6: error: redefinition of 'void gameOver()'
void gameOver(){
^~~~~~~~
/Users/BlapBlap/Documents/GitHub/TWANG/TWANG.ino:405:6: note: 'void gameOver()' previously defined here
void gameOver(){
^~~~~~~~
/Users/BlapBlap/Documents/GitHub/TWANG/TWANG4809.ino: In function 'void die()':
TWANG4809:413:6: error: redefinition of 'void die()'
void die(){
^~~
/Users/BlapBlap/Documents/GitHub/TWANG/TWANG.ino:410:6: note: 'void die()' previously defined here
void die(){
^~~
/Users/BlapBlap/Documents/GitHub/TWANG/TWANG4809.ino: In function 'void tickEnemies()':
TWANG4809:432:6: error: redefinition of 'void tickEnemies()'
void tickEnemies(){
^~~~~~~~~~~
/Users/BlapBlap/Documents/GitHub/TWANG/TWANG.ino:429:6: note: 'void tickEnemies()' previously defined here
void tickEnemies(){
^~~~~~~~~~~
/Users/BlapBlap/Documents/GitHub/TWANG/TWANG4809.ino: In function 'void tickBoss()':
TWANG4809:463:6: error: redefinition of 'void tickBoss()'
void tickBoss(){
^~~~~~~~
/Users/BlapBlap/Documents/GitHub/TWANG/TWANG.ino:460:6: note: 'void tickBoss()' previously defined here
void tickBoss(){
^~~~~~~~
/Users/BlapBlap/Documents/GitHub/TWANG/TWANG4809.ino: In function 'void drawPlayer()':
TWANG4809:494:6: error: redefinition of 'void drawPlayer()'
void drawPlayer(){
^~~~~~~~~~
/Users/BlapBlap/Documents/GitHub/TWANG/TWANG.ino:491:6: note: 'void drawPlayer()' previously defined here
void drawPlayer(){
^~~~~~~~~~
/Users/BlapBlap/Documents/GitHub/TWANG/TWANG4809.ino: In function 'void drawExit()':
TWANG4809:498:6: error: redefinition of 'void drawExit()'
void drawExit(){
^~~~~~~~
/Users/BlapBlap/Documents/GitHub/TWANG/TWANG.ino:495:6: note: 'void drawExit()' previously defined here
void drawExit(){
^~~~~~~~
/Users/BlapBlap/Documents/GitHub/TWANG/TWANG4809.ino: In function 'void tickSpawners()':
TWANG4809:504:6: error: redefinition of 'void tickSpawners()'
void tickSpawners(){
^~~~~~~~~~~~
/Users/BlapBlap/Documents/GitHub/TWANG/TWANG.ino:501:6: note: 'void tickSpawners()' previously defined here
void tickSpawners(){
^~~~~~~~~~~~
/Users/BlapBlap/Documents/GitHub/TWANG/TWANG4809.ino: In function 'void tickLava()':
TWANG4809:516:6: error: redefinition of 'void tickLava()'
void tickLava(){
^~~~~~~~
/Users/BlapBlap/Documents/GitHub/TWANG/TWANG.ino:513:6: note: 'void tickLava()' previously defined here
void tickLava(){
^~~~~~~~
/Users/BlapBlap/Documents/GitHub/TWANG/TWANG4809.ino: In function 'bool tickParticles()':
TWANG4809:548:6: error: redefinition of 'bool tickParticles()'
bool tickParticles(){
^~~~~~~~~~~~~
/Users/BlapBlap/Documents/GitHub/TWANG/TWANG.ino:545:6: note: 'bool tickParticles()' previously defined here
bool tickParticles(){
^~~~~~~~~~~~~
/Users/BlapBlap/Documents/GitHub/TWANG/TWANG4809.ino: In function 'void tickConveyors()':
TWANG4809:560:6: error: redefinition of 'void tickConveyors()'
void tickConveyors(){
^~~~~~~~~~~~~
/Users/BlapBlap/Documents/GitHub/TWANG/TWANG.ino:557:6: note: 'void tickConveyors()' previously defined here
void tickConveyors(){
^~~~~~~~~~~~~
/Users/BlapBlap/Documents/GitHub/TWANG/TWANG4809.ino: In function 'void drawAttack()':
TWANG4809:589:6: error: redefinition of 'void drawAttack()'
void drawAttack(){
^~~~~~~~~~
/Users/BlapBlap/Documents/GitHub/TWANG/TWANG.ino:586:6: note: 'void drawAttack()' previously defined here
void drawAttack(){
^~~~~~~~~~
/Users/BlapBlap/Documents/GitHub/TWANG/TWANG4809.ino: In function 'int getLED(int)':
TWANG4809:606:5: error: redefinition of 'int getLED(int)'
int getLED(int pos){
^~~~~~
/Users/BlapBlap/Documents/GitHub/TWANG/TWANG.ino:603:5: note: 'int getLED(int)' previously defined here
int getLED(int pos){
^~~~~~
/Users/BlapBlap/Documents/GitHub/TWANG/TWANG4809.ino: In function 'bool inLava(int)':
TWANG4809:611:6: error: redefinition of 'bool inLava(int)'
bool inLava(int pos){
^~~~~~
/Users/BlapBlap/Documents/GitHub/TWANG/TWANG.ino:608:6: note: 'bool inLava(int)' previously defined here
bool inLava(int pos){
^~~~~~
/Users/BlapBlap/Documents/GitHub/TWANG/TWANG4809.ino: In function 'void updateLives()':
TWANG4809:624:6: error: redefinition of 'void updateLives()'
void updateLives(){
^~~~~~~~~~~
/Users/BlapBlap/Documents/GitHub/TWANG/TWANG.ino:621:6: note: 'void updateLives()' previously defined here
void updateLives(){
^~~~~~~~~~~
/Users/BlapBlap/Documents/GitHub/TWANG/TWANG4809.ino: In function 'void screenSaverTick()':
TWANG4809:635:6: error: redefinition of 'void screenSaverTick()'
void screenSaverTick(){
^~~~~~~~~~~~~~~
/Users/BlapBlap/Documents/GitHub/TWANG/TWANG.ino:632:6: note: 'void screenSaverTick()' previously defined here
void screenSaverTick(){
^~~~~~~~~~~~~~~
/Users/BlapBlap/Documents/GitHub/TWANG/TWANG4809.ino: In function 'void getInput()':
TWANG4809:667:6: error: redefinition of 'void getInput()'
void getInput(){
^~~~~~~~
/Users/BlapBlap/Documents/GitHub/TWANG/TWANG.ino:664:6: note: 'void getInput()' previously defined here
void getInput(){
^~~~~~~~
exit status 1
redefinition of 'class iSin'

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

!
Some of your messages have not been sent
You can select all or individual messages to retry or delete
Delete allRetry all
w

Code issue with Esp-32

C:\Users\haput-sa\Downloads\TWANG-master\TWANG4809\TWANG4809.ino:70:36: error: 'someLong' was not declared in this scope
int result = max(static_cast(someLong), someInt);
^~~~~~~~
C:\Users\haput-sa\Downloads\TWANG-master\TWANG4809\TWANG4809.ino:70:47: error: 'someInt' was not declared in this scope
int result = max(static_cast(someLong), someInt);
^~~~~~~
C:\Users\haput-sa\Downloads\TWANG-master\TWANG4809\TWANG4809.ino:70:14: error: 'max' was not declared in this scope
int result = max(static_cast(someLong), someInt);
^~~
C:\Users\haput-sa\Downloads\TWANG-master\TWANG4809\TWANG4809.ino:70:14: note: suggested alternative: 'ax'
int result = max(static_cast(someLong), someInt);
^~~
ax
C:\Users\haput-sa\Downloads\TWANG-master\TWANG4809\TWANG4809.ino:74:5: error: redefinition of 'int result'
int result = max(someLong, someInt);
^~~~~~
C:\Users\haput-sa\Downloads\TWANG-master\TWANG4809\TWANG4809.ino:70:5: note: 'int result' previously defined here
int result = max(static_cast(someLong), someInt);
^~~~~~
C:\Users\haput-sa\Downloads\TWANG-master\TWANG4809\TWANG4809.ino:74:14: error: 'max' was not declared in this scope
int result = max(someLong, someInt);
^~~
C:\Users\haput-sa\Downloads\TWANG-master\TWANG4809\TWANG4809.ino:74:14: note: suggested alternative: 'ax'
int result = max(someLong, someInt);
^~~
ax
C:\Users\haput-sa\Downloads\TWANG-master\TWANG4809\TWANG4809.ino: In function 'void loop()':
C:\Users\haput-sa\Downloads\TWANG-master\TWANG4809\TWANG4809.ino:213:25: error: 'max' was not declared in this scope
int n = max(map(((mm-stageStartTime)), 0, 500, NUM_LEDS, 0), 0);
^~~
C:\Users\haput-sa\Downloads\TWANG-master\TWANG4809\TWANG4809.ino:213:25: note: suggested alternative: 'ax'
int n = max(map(((mm-stageStartTime)), 0, 500, NUM_LEDS, 0), 0);
^~~
ax
C:\Users\haput-sa\Downloads\TWANG-master\TWANG4809\TWANG4809.ino:220:25: error: 'max' was not declared in this scope
int n = max(map(((mm-stageStartTime)), 500, 1000, NUM_LEDS, 0), 0);
^~~
C:\Users\haput-sa\Downloads\TWANG-master\TWANG4809\TWANG4809.ino:220:25: note: suggested alternative: 'ax'
int n = max(map(((mm-stageStartTime)), 500, 1000, NUM_LEDS, 0), 0);
^~~
ax
C:\Users\haput-sa\Downloads\TWANG-master\TWANG4809\TWANG4809.ino:235:26: error: 'max' was not declared in this scope
int n = max(static_cast(map((mm - stageStartTime), 0, 500, NUM_LEDS, 0)), 0);
^~~
C:\Users\haput-sa\Downloads\TWANG-master\TWANG4809\TWANG4809.ino:235:26: note: suggested alternative: 'ax'
int n = max(static_cast(map((mm - stageStartTime), 0, 500, NUM_LEDS, 0)), 0);
^~~
ax
C:\Users\haput-sa\Downloads\TWANG-master\TWANG4809\TWANG4809.ino:246:26: error: 'max' was not declared in this scope
int n = max(static_cast(map((mm - stageStartTime), 0, 500, NUM_LEDS, 0)), 0);
^~~
C:\Users\haput-sa\Downloads\TWANG-master\TWANG4809\TWANG4809.ino:246:26: note: suggested alternative: 'ax'
int n = max(static_cast(map((mm - stageStartTime), 0, 500, NUM_LEDS, 0)), 0);
^~~
ax

exit status 1

Compilation error: 'someLong' was not declared in this scope

LEDs wont move

Hey,
I got this working. I hear the sound, also when I move the joystick.
The first 10(?) LEDs are on but there is no movement. I use WS2812B LEDs. Any suggestions?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.