Repository for practical exercices where students load PICO-8 cartridges to Unity from an EEPROM.
Teo-CD
fab5d22364
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 | ||
Packages | ||
ProjectSettings | ||
UIElementsSchema | ||
.gitignore | ||
Assembly-CSharp.csproj | ||
CartCom.sln | ||
LICENSE | ||
README.md |
CartCom
This is a Unity project that communicates with an Arduino board to transfer PICO-8 cartridges between the computer and an EEPROM.
It allows connecting to a serial port from the interface, load and write to a cartridge and start a PICO-8 console.
Thus, it is necessary to provide the path to a PICO-8 executable in the inspector for the full functionality.
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.
It has been tested on Unity 2022.3.9f1.