I would like to access Sphero while charging with the node.js SDK.
This functionality is included in Official Android and iOS SDK (SO), but not in any of unofficial SDK (based on my knowledge and research).
Is there any way to do it ? It would open a lot a possibility for visual utilization.
You can use the Sphero bluetooth API to write the appropriate command yourself into the node.js SDK.
The bluetooth API is at: https://github.com/orbotix/DeveloperResources
The command you would send is the SetOptionFlags command (35h). You send the id byte of that command, followed by the payload, which is a bitmask. Set the first bit.
I will warn you, though, that this isn't supported behavior. The battery can completely die over a long enough time in the charger.
There is an option flag that can be turned on that will cause Sphero to stay powered on in the charger, you could add it to your SDK like ColdSnickersBar suggests or your could use the Sphero app on iOS or Android.
You can accomplish this in the iOS and Android version of the Sphero app on the Advanced Settings screen. To access the advanced settings quickly tripple tap the Sphero in the middle of the normal settings screen, it can be hard to trigger, it might take several tries. Once you access it turn the "Sleep in Charger" switch to off.
Leaving the ball on in the charger might have a negative impact on your battery life.
Discussion courtesy of: Jon C
This recipe can be found in it's original form on Stack Over Flow.