fbpx
Magicblocks Lesson 08: Use the Buzzer
Magicblocks Project

Use the Buzzer on the Magicbit [Magicblocks]

Use the buzzer on the Magicbit using Magicblocks

Components Required

Story

Hello and Welcome, This tutorial will teach you to use the buzzer on the Magicbit using Magicblocks.

There are 1 main method of achieving this goal;

By using Inject Block.

First, log into your Magicblocks account,

Magicblocks is easy visual programming software for the program of your Magicbit. Anyone can program their microcontroller by using magicblocks.io and there is no need for 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

Set up the Buzzer Block

1. Drag & Drop the Buzzer block from the Magicbit nodes section to the flow.

2. Double-click on the Buzzer block and select your unique Device ID from the drop – down menu.

 

3. Frequency determines the frequency of the buzzer.

 

4. Duration determines the duration of the buzzer output.

 

Set up the Inject Block

(This Node is used to activate the buzzer repeatedly between an interval)

1. Drag & Drop the Inject Block from the input nodes section on the left of the screen to the flow.

2. Make sure the payload type is timestamp and repeat is set to the interval.

3. Next set an interval, this will determine the delay between buzzer outputs.

 

[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 have been already set up.

  • First copy this code to your clipboard;
[{"id":"d42a3723.bfa948","type":"BUZZ","z":"6f1c147f.6339dc","name":"","epId":"","frequency":1000,"duration":1000,"x":670,"y":1060,"wires":[]},{"id":"70337f65.8b6f1","type":"inject","z":"6f1c147f.6339dc","name":"","topic":"","payload":"","payloadType":"date","repeat":"3","crontab":"","once":false,"onceDelay":0.1,"x":490,"y":1060,"wires":[["d42a3723.bfa948"]]}]
  • 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 Buzzer node properties.

Finally, Deploying the Blocks

  • Connect all the blocks.
  • Click on the Deploy button on the top right-hand corner of the screen.
  • it will activate according to the frequency, duration, and delay given.
  • You can change the frequencies and get a different frequency output from the buzzer.

Troubleshooting

  • Check whether your Magicbit is connected to the internet.
  • Check whether the Device ID is correct on the buzzer node properties.

YouTube video by clicking here:

YouTube Video

Related Posts
Leave a Reply