Repository for practical exercices where students load PICO-8 cartridges to Unity from an EEPROM.
The Wire documentation only shows read() to get data from the I²C stream. However, Wire inherits from Stream, so it gets access to all the same functions, like readBytes(), which can read more than one character. Replace the innermost loop of the cartridge load by readBytes instead of calling read() in a loop. |
||
|---|---|---|
| Arduino | ||
| Assets | ||
| Library | ||
| Packages | ||
| ProjectSettings | ||
| UIElementsSchema | ||
| .gitignore | ||
| CartCom.sln | ||
| LICENSE | ||
| README.md | ||
CartCom
This is a Unity project that loads a PICO-8 cartridge from a physical EEPROM, via an Arduino. This has been tested with Unity 6000.0.63f1.
It allows connecting to a serial port from the interface, saving or loading a cartridge via the serial port and starting
the PICO-8 console with it.
Thus, it is necessary to provide the path to a PICO-8 executable in the inspector to be able to play the games !
The goal here is for students to fill in the blanks regarding the communication between the Arduino and the EEPROM, and the Arduino and Unity.
The corresponding Arduino code is in :
- Arduino/SendCart, for reading from the EEPROM and sending cartridges to Unity,
- Arduino/ReceiveCart, for receiving cartridges from Unity and writing to the EEPROM.