Protonerd / FX-SaberOS

System code for Arduino based Lightsaber replicas for DIYino family boards
Creative Commons Zero v1.0 Universal
92 stars 42 forks source link

No audio, button doesn't work, LED strip lights up red #98

Closed Rememberthecreed closed 4 years ago

Rememberthecreed commented 4 years ago

I have a video on the FX-SaberOS facebook page showing my setup. After following SirRawThunderMan's tutorial on both editing the code and loading sound fonts on a micro SD, I loaded the card into the board, and powered it on. No boot sound, the tactile switch I'm using for the main switch isn't working, and the Neopixel Strip lights up all red. I pulled the recharge port off and plugged the battery into the board, and same issue. On video I got a "Diyino Jukebox" sound to come out of the speaker, but no lightsaber boot sound. Short of the base code, I only edited the Config_HW.h and Config_SW.h files (as it was in SirRawThunderMan's video). Maybe the goof up is there. All other config and .h files, I left as stock.

Config_HW.h `/*

if not defined CONFIG_HWH

define CONFIG_HWH

/* Board definitions

define DIYINO_PRIME // including home-brew

//#define DIYINO_STARDUST_V2 //#define DIYINO_STARDUST_V3

/* BOARD PINOUT DEFINITIONS **/

/*

// If your saber has only a single button to interact with the electronics, uncomment the next line // in case you have 2 buttons (referred to as main and aux buttons) leave this line commented out

define SINGLEBUTTON

ifdef DIYINO_PRIME

define MAIN_BUTTON 12

ifndef SINGLEBUTTON

#define AUX_BUTTON   4

endif

else if defined DIYINO_STARDUST_V2 or defined DIYINO_STARDUST_V3

define MAIN_BUTTON 12

ifndef SINGLEBUTTON

#define AUX_BUTTON   11 // 2

endif

endif

/*

/****/ /*

/*

if I2CDEV_IMPLEMENTATION == I2CDEV_ARDUINO_WIRE

include

endif

if defined LEDSTRINGS or defined STAR_LED

#define NUMPIXELS 0

endif

ifdef PIXELBLADE

// How many leds in one strip?
#define NUMPIXELS 115  // can go up to 120, could lead to memory overflow if further increased, causing instability
// For led chips like NEOPIXELs, which have a data line, ground, and power, you just
// need to define DATA_PIN.
#define DATA_PIN       13 // D13

endif

ifdef ADF_PIXIE_BLADE

#define NUMPIXELS 1
#define PIXIEPIN  13 // Pin number for SoftwareSerial output

endif

ifdef CROSSGUARDSABER

// define how many pixels are used for the crossguard and how many for the main blade
#define CROSSGUARD_LENGTH 10 // cross guard stripe length
#define MAINBLADE_LENGTH 50 // main blade stripe length
#define CROSSGUARD_OFFSET 0
#define MAINBLADE_OFFSET 10
#define STAGGERED_IGNITION_DELAY 1000

endif

ifdef DIYINO_PRIME

#define LS1       3
#define LS2       5
#define LS3       6
#define LS4       9
#define LS5       10
#define LS6       11

else if defined DIYINO_STARDUST_V2 or defined DIYINO_STARDUST_V3

#define LS1       5
#define LS2       6
#define LS3      9

endif

/*

/*

define BATTERY_CHECK // comment to disable

ifdef BATTERY_CHECK

ifdef DIYINO_PRIME

#define BATTERY_READPIN 17 //A3 - read battery level

endif

if defined DIYINO_STARDUST_V2 or defined DIYINO_STARDUST_V3

#define BATTERY_READPIN 15

endif

endif

/!!!!!IMPORTANT IMPORTANT IMPORTANT IMPORTANT IMPORTANT!!!

/*

endif / CONFIG_HWH /`

Config_SW.h (I don't remember if I edited this part of the code at all, but it was in the youtube video, so I for sure was going through it) `/*

include "Config_HW.h"

if not defined CONFIG_SWH

define CONFIG_SWH

/ INCLUDE_COMPILE_INFO will print the compile date and file location to the serial monitor at boot. This is useful for keeping track of custom builds or which version has been installed. It is important to note that this will take up some memory in proportion the the length of the file location/name / //#define INCLUDE_COMPILE_INFO

/*

if defined LEDSTRINGS

define CONFIG_VERSION "L01"

endif

if defined STAR_LED

define CONFIG_VERSION "L02"

static const uint8_t rgbFactor = 255;

endif

if defined PIXELBLADE

define CONFIG_VERSION "L03"

static const uint8_t rgbFactor = 255;

endif

if defined ADF_PIXIE_BLADE

define CONFIG_VERSION "L05"

static const uint8_t rgbFactor = 255;

endif

/*

ifdef ADF_PIXIE_BLADE

define OLD_DPFPLAYER_LIB

include "Adafruit_Pixie.h"

include

endif

/**END of blade type hardware settings **/

/*

/*

/* FX DURATIONS AND SUPRESS TIMES

/*

/*

/*

/** END of FX Settings **/

/ MAX_BRIGHTNESS

/* DEEP_SLEEP

/* COLOR CHANGE OPTIONS

define ANIBLADE

/*

/ Battery meter settings / const long InternalReferenceVoltage = 1062; // Adjust this value to your board's specific internal BG voltage // To calculate BATTERY_FACTOR use a multimeter: actual voltage / reported voltage * current BATTERY_FACTOR // BATTERY_FACTOR will be about about 6.4-6.5 for "homebrew" builds

define BATTERY_FACTOR 6.43 // Callibration value to compensate for component variation

define LOW_BATTERY 3.3 // low voltage for battery, a 5v Arduino or DIYino requires 3.3v

define FULL_BATTERY 4.15 // full voltage for battery, nominally 4.2 for a 3.7v battery

//cRGB C1; //Low meter color //cRGB C2; //middle meter color //cRGB C3; //high meter color

/*

//#define PIXEL_ACCENT

ifndef PIXEL_ACCENT

define HARD_ACCENT

endif

ifdef PIXEL_ACCENT

define NUM_ACCENT_PIXELS 1

define PIXEL_ACCENT_DATA 14 //A0

define PIXEL_ACCENT_BRIGHTNESS 255

// #define ACCENT_SWAP_RG //define if Red and Green are swapped from the color order of your blade (for example if one is 5mm bulb and other is 5050 SMD)

endif

/*

if defined LS_DEBUG

//#define LS_BUTTON_DEBUG //#define LS_MOTION_DEBUG //#define LS_MOTION_HEAVY_DEBUG //#define LS_RELAUNCH_DEBUG //#define LS_DEBUG_SLEEP

endif

if defined LS_MOTION_DEBUG

//#define LS_SWING_DEBUG //#define LS_SWING_HEAVY_DEBUG //#define LS_CLASH_DEBUG //#define LS_CLASH_HEAVY_DEBUG

endif`

Protonerd commented 4 years ago

My first guess is that your switch is broken. Can you check this?

Rememberthecreed commented 4 years ago

I did. It was part of the issue, the other was that I didn’t bridge all three rgb leads. I’ve got it working, thank you.

Protonerd commented 4 years ago

Great, glad it works again!!!