A React Renderer for SSD1306 OLED chip on Raspberry Pi.
A React Renderer for SSD1306 OLED chip on Raspberry Pi.
A React Renderer for SSD1306 OLED chip on Raspberry Pi
For those who doesn't have the device, a canvas-based web emulator is also included!
This project demonstrates how to:
Checkout the Tutorial, or my Chinese blog post for details.
This project is originally designed to work on Raspberry Pi, but a web emulator is also available and works out of the box. Notice that no matter you run it on web or native, the whole React-related codebase is exactly the same.
You can try out the reconciler example, even if you don't have a Raspberry Pi. In this way only Node.js and ParcelJS are required:
cd react-ssd1306/app
parcel src/index.htmlThen just open https://localhost:1234 to see the emulator.
Connect the chip, make sure you have QuickJS and Node.js installed on your Raspberry Pi, with I2C interface enabled. Few extra packages are also required:
sudo apt-get install i2c-tools libi2c-devNode.js is only required for JS module bundling and package management here.
Init the project:
cd react-ssd1306/app
npm install && cd ..
npm run build # build JS and C modules
npm start # start the compiled binarySimply edit ./app/index.js as main entrance:
…MIT
No open issues yet, or sync has not completed.