The “Light Control Module” in the Floatwheel ADV/Pro controls the lights, a buzzer, as well as the power state of the controller. It runs basic firmware, so its behavior is changeable, tony published a copy of the source code.
IMPORTANT: The LCM on the Floatwheel is not optional, as it also controls charging and VESC power!
The following features have already been implemented and are being tested
- Keep VESC powered while charging
- Show duty cycle on the status bar when riding (50 percent and above)
- Control lights via AppUI and external apps
- Power down LED pattern
- Power down VESC via external apps
- Charging done: all LEDs on in bright green (instead of white)
- Show flywheel mode, hand test, or disabled mode on the status bar
** Disabled mode: 2 red LEDs in the center
** Hand test: 4 pulsating LEDs (red…yellow) in the center, 1 blue LED each for ADC1/ADC2
- Preview of light level when toggling via button (or you can listen for the beeps)
** 1 beep: lights off
** 2 beeps: lights medium
** 3 beeps: lights max brightness
- Boot animation preference via external apps
- Lights controlled by float package config on boot
- fading of headlights (on/off/fwd/rev) still not working
Aka Tony’s out-of-the-box version
The Floatwheel is equipped with a status LED bar of 10 addressable RGB LEDs and 2 WHITE / RED LED HEADLIGHTS arranged on the front and rear area of the board.
BOOT: When the start button is pressed for a short time, the headlights turn on and the board carries out a start cycle with a light blue progression of the LED light bar, at the end of the boot cycle it emits a beep and shows the battery charge level. The headlights turn on in the default mode (day mode)
BATTERY LEVEL: the LED light bar shows the battery charge status (I assume taking into account the percentage of the charge level), each notch is equivalent to 10% from left to right. The color is white, the last two LEDs become red when the state of charge is at 20% and 10%. When the board is almost empty the last red LED begins to flash smoothly.
FOOTPAD ACTIVATION: the indication of footpad activation replaces the battery level indication when you press even just one side. If you press the left side the 5 left LEDs light up in blue, in the same way if you press the right side the 5 right LEDs light up again in blue, all LEDs light up if both sides are active.
This behavior applies both when idle and while driving as long as a certain speed threshold is not exceeded, at which point the board returns to showing the battery level.
However, when riding, the battery level is not always indicated and does not seem to have predictive behavior based on speed because it turns on and off quite randomly, This is a malfunction for sure
the LED strips are equipped with white and red LEDs which light up alternately based on the direction of travel. When moving in one direction the LED pointing in that direction is white, on the opposite direction it is red. Changing the direction of travel, the color change is quite sudden
RIDING LIGHT MODES:
- DAY MODE (default - low brightness): in this mode the brightness of the LED light bar is at maximum, so as to be visible despite direct sunlight; the brightness of the headlights is at minimum acting as car’s daylights.
- SUNRISE/SUNSET MODE (middle intensity): can be activated by pressing the power button twice, you can hear 2 beeps. The brightness of the LED light bar is intermediate as are the headlights.
- EVENING/NIGHT MODE (max brightness): can be activated by pressing the power button 2 more times, you can hear 3 beeps. The brightness of the LED light bar is at minimum to avoid blinding the rider, while the headlights are at maximum brightness to ensure maximum visibility.
By pressing the power button 2 more times from mode 3) you can return to mode 1), only one beep will be heard this time.
By switching the modes while idle, in addition to the acoustic signal you will notice the actual change in brightness based on the selected mode, but only for a few seconds, after which it returns to a low brightness level. This is to save battery when you don’t get on the board.
As soon as you press even just one side of the front footpad, the brightness gradually increases until it reaches the intensity of the selected mode, therefore also while riding. As soon as the pressure is removed (you get off the board) all the lights return to low consumption mode.
It is possible to select the different light modes even while driving
It is not possible to turn off the headlights when the board is on, whether idle or while riding.
By holding down the power button, the board and all the lights turn off instantly.
CHARGING: the moment you insert the charging plug, the board goes into charging mode. The headlights are off and the status LED bar will show the battery charging status in the same colours, with a soft and slow flash. In this mode it is not possible to turn on the board even by pressing the power button and therefore it is not possible to connect it to the vesc tool APP.
Developers: feel free to edit/extend this list as needed.
Riders: please add suggestions/requests as a comment to this post, please be as verbose as possible in explaining what it is you want and why you want it / why you think the current behavior doesn’t address your need.
- Delayed switching of forward/backward lights
** DONE, gotta pass 500erpm to switch lights, no more flickering
- Fading lights
- Proxy buzzer for VESC (use the LCM buzzer to act as the buzzer for the VESC Float Package)
** HARD TO DO, WILL NOT HAPPEN
- Lights control via app
** DONE, wait for v2.0 float package, Floaty and FloatControl both will have it
- Board shutdown via app (obviously only when not riding)
- Duty cycle display on status bar
- Ride state/mode awareness
- Buzzer glitch: If you don’t wait for the confirmation beeps when changing between lighting modes, the buzzer will either stop working completely or get stuck on (FIXED, Dec 27th 2023)
- Charge Behavior
** Keep VESC powered on while charging (DONE)
** Keep headlights OFF (DONE?)
** Use LED light bar to show charging status (DONE)
** Turn off VESC and all lights when removing charger (provided rpm == 0)
- Lights-off aka stealth mode (note: this is already possible with FloatControl and soon Floaty)
- We need to be able to turn the lights off
- We want to disable the motor when charging but keep the VESC turned on so people can see battery%(need some help code wise, what’s the best way of disable the motor from uart commands? We didn’t know how to do it from the code side, so we just turned the VESC dcdc converter off)
- We need some cool rainbow boot sequence🤣
- We probably give up the duty cycle displaying on the battery bar cuz it’s already super busy with footsensor battery% display and it’s gonna add more confusion on the bar for new users.
** Dado’s comment: new users should NOT be looking at the status bar while riding hahaha
- Status bar cleanup:
option1: show footpad status at low speed
option2: show battery level at low speed
option3: remain dark at low speed
enable duty display yes/no
option1: show battery level
option2: show idle animation
re-enable buzzer for button press confirmations
use buzzer as float config proxy buzzer
- charging can still sometimes prematurely switch to “full” state (while charger keeps going)
- board sometimes stays on forever
- when headlights are off the lights still occasionally flare up