Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

sense_emu support and parse imported files differently #5

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

winkleink
Copy link

@winkleink winkleink commented Apr 9, 2018

Two changes

Original worked with physical SenseHat, but would not work with the Emulator or if no SenseHat is present. Modified to create version that works with sense_emu as fall back.

Modified parsing of SenseHat/Sense_Emu import file code to permit adding lines above/below the data for the 8x8 image permitting the exported code to be extended and still permit the data for the 8x8 to be imported.

Modified version of 8x8grid-sense.py to work with sense_emu, so not requiring a SenseHat to be attached to Pi.
If no SenseHat or UnicornHat detected default to Sense Emulator instead of exiting.
With modifications now defaults to SenseHat Emulator if no SenseHat or UnicronHat is detected.
Means can be used without a physical Hat.
Previous import expected data to start and end at specific lines. Now file animation8x8.py is parsed with the only expectation that a line with date starts with '[['  so, there can be spacing between the lines or if extra code is added above or below it does not break the import.
Modified files to use 4 spaces for indent
Improved parsing of animation8x8 for SenseHat. Same as the Sense Emulator code.
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant