Sudoku app for M5Paper
-
Source available here: https://github.com/murraypaul/M5Sudoku
M5Sudoku
Sudoku application for M5Paper
Can generate uniquely solveable Sudoku puzzles, targetting a given number of clues, to act as a difficulty setting.
At any point, can validate that the puzzle is still solvable.
Can mark squares as either a known value, or a set of possible values.
Can save and reload current state to EEPROM.
Will automatically shutdown and save state after 5 minutes of inactivity.
Notes:
- Selecting a square in the large grid will display it in the small grid on the right
- The selected square is highlighted in the large grid
- You can use the small grid to either set a single known value for the square, or select multiple possible values
- It may not be possible to generate a uniquely solveable puzzle of the given numbers of clues in the time requested
- In this situation, the puzzle with the lowest number of clues that still gives a unqiue solution will be returned
- The fewer target clues you ask for, the longer it will take to generate the puzzle
- The 'Validate' button will confirm that the puzzle is still uniquely solveable
- The 'Clue' button will fill in one randon unsolved square
- Over time the screen may get a bit muddy, due to the fast refresh option used on the EPD screen
- The 'Validate' button will also do a full screen slow refresh, which will clean up the display
-
Hello @murraypaul
this is very cool. Nicely done.
When I compile it in PlatformIO I get a couple of errors. I've fixed them and made a pull-request for you to consider.
Thanks a lot!
Felix -
@felmue I'll try to get PlatformIO set up and take a look, thanks,
-
@felmue I've updated the code, it should now compile with no warnings in PlatformIO.
-
Hello @murraypaul
Thank you!
Felix -
@murraypaul ,
Great, thanks for sharing. -
I've been trying to get this to compile/install using the Arduino IDE and i'm not getting anywhere... Once installed, the M5Paper just continuously reboots, flashing the screen on and off.
Watching the serial monitor I see this repeated on each reboot... Any suggestions?
Rebooting...
M5EPD initializing...OK
Guru Meditation Error: Core 1 panic'ed (LoadProhibited). Exception was unhandled.
Core 1 register dump:
PC : 0x400d7c9f PS : 0x00060330 A0 : 0x800d48ea A1 : 0x3ffb1f10
A2 : 0x3ffc19a0 A3 : 0x00000000 A4 : 0xffffffff A5 : 0x3ffc1a78
A6 : 0x0001fa40 A7 : 0x00000000 A8 : 0x00000000 A9 : 0x3ffb1ee0
A10 : 0x00000000 A11 : 0x00000000 A12 : 0x00000000 A13 : 0x000003c0
A14 : 0x0000021c A15 : 0x3f407a74 SAR : 0x00000011 EXCCAUSE: 0x0000001c
EXCVADDR: 0x00000000 LBEG : 0x400014fd LEND : 0x4000150d LCOUNT : 0xffffffffBacktrace: 0x400d7c9f:0x3ffb1f10 0x400d48e7:0x3ffb1f40 0x400d5d7e:0x3ffb1f90 0x400e174b:0x3ffb1fb0 0x40088dbd:0x3ffb1fd0