Closed Rememberthecreed closed 4 years ago
My first guess is that your switch is broken. Can you check this?
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.
Great, glad it works again!!!
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
endif
else if defined DIYINO_STARDUST_V2 or defined DIYINO_STARDUST_V3
define MAIN_BUTTON 12
ifndef SINGLEBUTTON
endif
endif
/*
define PIXELBLADE
//#define ADF_PIXIE_BLADE
/****/ /*
define SINGLEBLADE // i.e. Graflex
//#define SABERSTAFF // i.e. Darth Maul saber with dual blades //#define CROSSGUARDSABER // i.e. Kylo Ren saber
/*
ifdef DIYINO_PRIME
define MP3_PSWITCH 15 // A1
define FTDI_PSWITCH 16 // A2
else if defined DIYINO_STARDUST_V2 or defined DIYINO_STARDUST_V3
define MP3_PSWITCH 17 // A3
define FTDI_PSWITCH 16 // A2
endif
/*
along the length of the blade. Currently supported number of segments: 6 (like Hasbro high-end and Plecter boards among others) */
ifdef DIYINO_PRIME
define LED_RED 3
define LED_GREEN 5
define LED_BLUE 6
else if defined DIYINO_STARDUST_V2 or defined DIYINO_STARDUST_V3
define LED_RED 5
define LED_GREEN 6
define LED_BLUE 9
endif
if I2CDEV_IMPLEMENTATION == I2CDEV_ARDUINO_WIRE
include
endif
if defined LEDSTRINGS or defined STAR_LED
endif
ifdef PIXELBLADE
endif
ifdef ADF_PIXIE_BLADE
endif
ifdef CROSSGUARDSABER
endif
ifdef DIYINO_PRIME
else if defined DIYINO_STARDUST_V2 or defined DIYINO_STARDUST_V3
endif
/*
/*
define HARD_ACCENT
ifdef DIYINO_PRIME
ifdef HARD_ACCENT
define ACCENT_LED 14 //A0
endif
else if defined DIYINO_STARDUST_V2 or defined DIYINO_STARDUST_V3
ifdef HARD_ACCENT
define ACCENT_LED 14 //A0 is an auxiliary pin on Stardust v2
endif
endif
/*
define DFPLAYER_RX 8
define DFPLAYER_TX 7
define SPK1 20 //A6
define SPK2 21 //A7
define BATTERY_CHECK // comment to disable
ifdef BATTERY_CHECK
ifdef DIYINO_PRIME
endif
if defined DIYINO_STARDUST_V2 or defined DIYINO_STARDUST_V3
endif
endif
/!!!!!IMPORTANT IMPORTANT IMPORTANT IMPORTANT IMPORTANT!!!
define BLADE_Y
//#define BLADE_Z /****/
/*
define MPUCALOFFSETEEPROM
ifdef MPUCALOFFSETEEPROM
define MEMORYBASEMPUCALIBOFFSET 200 // 96 -> increased to 200 due to storing RGB PWM values in EEPROM takes a lot of space (3 x 1byte x 3 color types x nr of sound fonts i.e. for 5 sound fonts 45 bytes
endif
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
/*
define MEMORYBASE 32
define VOL 31
define SOUNDFONT 3
define SWING_THRESHOLD 1000
define CLASH_THRESHOLD 10 // 10 was the original value in LSOS, Jason's value changed it to 6, but it resulted in false clash trigges at more forceful swings
/****/
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 **/
/*
/*
define CLASH_DET_MPU_INT
//#define CLASH_DET_MPU_POLL
/* FX DURATIONS AND SUPRESS TIMES
of their respective suppress pareameters
*/
define SWING_SUPPRESS 300
define CLASH_SUPRESS 400 // do not modify below 400, otherwise interlocking clash sounds can occur
define BLASTERBLOCK_SUPRESS 500
/*
define HUM_RELAUNCH 2000
/*
define CLASH_FX_DURATION 250
define BLASTER_FX_DURATION 150
define SWING_FX_DURATION 400
// select if swing shall be triggered by change in blade orientation and rotation; otherwise swing is simply determined by blade acceleration
define SWING_QUATERNION
/*
define CLICK 200 //5 // ms you need to press a button to be a click
define PRESS_ACTION 600 //200 // ms you need to press a button to be a long press, in action mode
define PRESS_CONFIG 600 //400 // ms you need to press a button to be a long press, in config mode
/****/
/** END of FX Settings **/
/ MAX_BRIGHTNESS
define MAX_BRIGHTNESS 230
define FLICKERDEPTH 100
/* DEEP_SLEEP
define DEEP_SLEEP
if defined DEEP_SLEEP
define SLEEPYTIME (1000UL 60 2) //2 mins, after which the board will automatically go to sleep mode (to be implemented)
include <avr/sleep.h>
include <avr/power.h>
endif // DEEP_SLEEP
/* COLOR CHANGE OPTIONS
ifndef GRAVITY_COLOR
define COLOR_PROFILE
endif
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
/*
define LS_LOOPLENGHT
define LS_SERIAL //enable serial communication using Wire library
if defined LS_SERIAL
//#define LS_FSM
define LS_INFO
//#define LS_DEBUG
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`