Display Text on OLED Through Internet
by magicbit in Circuits > Microcontrollers
404 Views, 4 Favorites, 0 Comments
Display Text on OLED Through Internet
Hello and Welcome, This short tutorial will teach you to display text on a Magicbit using Magicblocks.
There are 2 main methods of achieving this goal;
- By using Inject Block.
- By using Dashboard.
First of all log into to your Magicblocks account,
Magicblocks is an easy visual programming software for program your magicbit. Anyone can program their micro controller by using magicblocks.io and there is no need of programming knowledge. You can sign up for free.
Start and Open the Playground.
Next make sure your Magicbit is connected to the internet and plugged-in and also linked to your account through Device Manager.
All Done? then scroll down to Method 1
List of Items Required
- Magicbit: Magicbit is an integrated development platform based on ESP32 for learning, prototyping, coding, electronics, robotics, IoT and solution designing.
Setting Up the Inject Block [Method 1]
- Drag & drop the Inject block from the input nodes section on the left of the screen to the Flow.
- Double-click on the block and select the type of payload from the drop-down menu to a text input (string).
- Next type in the text you need to display on the Magicbit.
Setting Up the Display Block [Method 1]
- Drag & drop the Display block from the Magicbit nodes section on the left of the screen to the flow.
- Double-click on the display block and type or paste your unique Device id from the Device Manager Tab on your Magicblocks account. [ This will link the display block with your Magicbit display ]
[Optional] Import Already Setup Nodes
If you had trouble setting up nodes, you can use the import feature in Magicblocks to get the nodes which has been already setup.
- First copy this code to your clipboard;
[{"id":"26470285.48c0ee","type":"inject","z":"b4f698b2.ff2c68","name":"","topic":"","payload":"","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":190,"y":160,"wires":[["c65db261.7362e"]]},{"id":"c65db261.7362e","type":"OLED","z":"b4f698b2.ff2c68","name":"","epId":"","x":420,"y":220,"wires":[]}]
- Click on the options menu on the top right-hand corner of the screen.
- Next hover your cursor over the Import sub-menu.
- Then click on Clipboard and paste the code on your clipboard to the text field
- Select current flow or new flow and click on Import.
IMPORTANT
Make sure you type your device id on the display node properties and type the text you need inside the inject node.
Finally Deploying the Blocks [Method 1]
- Connect the inject block with the display node.
- Click on Deploy button on the top right-hand corner of the screen.
- After deploying click on the box left-side of the inject block to activate it and this will display the text typed into the inject block.
Troubleshooting
- Check whether it shows connected below the display block if not recheck the device id which you typed into the display block.
- Check whether your Magicbit is connected to the internet.
Setting Up the Text Input Block [Method 2]
- Drag & drop the Text input block from the dashboard nodes section to the Flow.
- Double-click on the text input node and set up a basic dashboard ui [user- interface] from the drop-down menu and a name for your field.
- Select the Mode as text input from the drop-down menu.
Setting Up the Display Block [Method 2]
- Drag & drop the Display block from the Magicbit nodes section on the left of the screen to the flow.
- Double-click on the display block and type or paste your unique Device id from the Device Manager Tab on your Magicblocks account. [ This will link the display block with your Magicbit display ]
[Optional] Import Already Setup Nodes
If you had trouble setting up nodes, you can use the import feature in Magicblocks to get the nodes which has been already setup.
- First copy this code to your clipboard;
[{"id":"458b634b.ddbbbc","type":"ui_text_input","z":"b4f698b2.ff2c68","name":"","label":"Input Text","group":"64afd566.2c4e9c","order":0,"width":0,"height":0,"passthru":true,"mode":"text","delay":300,"topic":"","x":180,"y":300,"wires":[["34f7cb6f.0dbfa4"]]},{"id":"34f7cb6f.0dbfa4","type":"OLED","z":"b4f698b2.ff2c68","name":"","epId":"","x":420,"y":360,"wires":[]},{"id":"64afd566.2c4e9c","type":"ui_group","z":"","name":"Magicbit","tab":"38cf9f9c.dc3b6","disp":true,"width":"6","collapse":false},{"id":"38cf9f9c.dc3b6","type":"ui_tab","z":"","name":"New","icon":"dashboard"}]
- Click on the options menu on the top right-hand corner of the screen.
- Next hover your cursor over the Import sub-menu.
- Then click on Clipboard and paste the code on your clipboard to the text field
- Select current flow or new flow and click on Import.
IMPORTANT
Make sure you type your device id on the display node properties.
Finally Deploying the Blocks & Using the Dashboard UI to Access It [Method 2]
- Connect the text input block with the display node.
- Click on Deploy button on the top right-hand corner of the screen.
- After deploying go to the dashboard ui by clicking the link to dashboard URL on the top right-hand corner of the screen.
- On the Dashboard you can type your text in the field you created using the text input block and this will display that text on your Magicbit.
- Copy the your Dashboard URL and this can be accessed via the internet to display text onto your Magicbit Display from anywhere in the World.
Troubleshooting
- Check whether it shows connected below the display block if not recheck the device id which you typed into the display block.
- Check whether your Magicbit is connected to the internet.
- Check whether you are typing the text in the correctly linked text field and also in the correct dashboard which you created
If you need help or couldn't understand a step be sure to check out our youtube video by clicking here: Youtube Video