GameWithPixels / DiceFirmware

Pixels dice firmware code.
MIT License
15 stars 1 forks source link

Magnets causing sleep mode #91

Closed Jmwhite45 closed 8 months ago

Jmwhite45 commented 8 months ago

Issue: Currently, pixel dice are incompatible with dice towers and trays that use magnets inside. This includes Elderwood Academy's Dice tower and tray and probably Wyrmwood's Dice Tower (although I haven't tested). Whenever dice come into contact with a magnet, they immediately go to sleep and disconnect, Even if it's just for a moment, like rolling through a tower.

Solution: Modify the firmware so that the dice do not go to sleep unless they have been in contact with a magnet for 5-10 seconds. This balances the use of magnets for putting the dice to sleep, with the use of magnets in dice trays and towers.

obasille commented 8 months ago

Hi! Thanks for raising this issue.

The die powers off when nearby a magnet (or any other object producing a magnetic field). This is a hardware feature, the magnetic sensor of the electronic board cuts the power line going to the micro-controller.

This serves two purposes:

  1. Shutdown the die when in the charger (there is a magnet in the lid) so it doesn't deplete the battery when the charger is not plugged
  2. Ensure that the die can always be rebooted if for some reason the software is unresponsive

However it should be possible to modify the electronic board to wait for a certain delay before cutting off the power, which would resolve your issue. This is something we will evaluate the next time we update the dice electronic board.