Source code for Sense HAT Mono .NET library
This library is designed to be used for interaction with the Sense HAT in .NET languages. The code is mostly compatible with the python-sense-hat library.
Testing has only been done with Raspbian. The default version of mono in Raspbian's package repositories may not be compatible with the library. We recommend following the instructions found here to install a compatible version. The mono-devel package must be installed for building. Installation of the msbuild package is also strongly recommended but it may not be required.
The following dependencies are automatically retrieved by the installation script.
- Clone/Download the repository
- Navigate to the LowLevelWrappers directory
- Run install.sh as root
- Navigate to the SenseHat directory
- Run build.sh
- Update Linux shared object caches
$ git clone https://github.com/li20034/mono-sense-hat
$ cd mono-sense-hat/LowLevelWrappers
$ sudo ./install.sh
$ cd ../SenseHat
$ ./build.sh
$ sudo ldconfig
Note: Keep the folder of the cloned repository around (for uninstallation and faster updates)
- Navigate to the directory of the cloned repository that you previously kept
- Run uninstall.sh as root
- Remove the sense hat package if needed
$ cd mono-sense-hat/LowLevelWrappers
$ sudo ./uninstall.sh
$ sudo apt-get purge sense-hat && sudo apt-get autoremove && sudo apt-get clean # optional
$ cd ../..
$ rm -rf mono-sense-hat
The .dll file that is generated by build.sh can be added as a reference in .NET projects. Full documentation of the library is not available at this time, however the source code is thoroughly commented.
Written by Zonggao Li and Carson Hall as part of a school project. Special thanks to the other members of the LittleMen (Muntaqim Rahman, Kelvin Zhu and Wayne Zhu) for their assistance in debugging, testing and suggesting changes. Also, special thanks to our computer science teacher Ms. Emami for providing us with support and guidance.
We are very open to contributions to help us add new features, bug fixes or for creating/updating proper documentation for the project. Testing on other platforms would also be wonderful. Noteable missing features include gamma adjustment and the ability to draw text on the LED display (gamma adj needs libsense to be updated first).