Control Buzzer on Me Orion


#1

Hi!

I’d like to control buzzer in mBlock, but I cannot find the block of buzzer.

Would you please add the new block for buzzer, or teach me how to use blocks to do this:

#define buzzerOn() pinMode(SCL,OUTPUT),digitalWrite(SCL, HIGH)

Cheers!

Hunter Chiou


#2

Hi @TouchClassroom,

You could try to open the Arduino IDE in Mblock to add the code.


#3

Yes, I know how to add it in Arduino IDE,
if you can modify mBlock for adding new block to control the buzzer, my kid can drag block directly.

^^


#4

Hi @TouchClassroom,

As for the Baseboard, we got some bug on the design of PCB. The buzzer can’t be controlled in mBlock. However, we have already updated the Baseboard to mCore, which is specifically designed to mBlock. We would put this project on Kickstarter later in Feb.


#5

Can we just use pinMode(SCL,OUTPUT),digitalWrite(SCL, HIGH)?


#6

I think it could work. We have an example in Arduino IDE,

#include <Makeblock.h>
#include <SoftwareSerial.h>
#include <Wire.h>

void setup() 
{
}

void loop()
{
  buzzerOn();
  delay(1000);
  buzzerOff();
  delay(1000);
}

And in Makeblock.h, the buzzerOn and buzzerOff is defined like this,

// buzzer
#define buzzerOn()  DDRE |= 0x04,PORTE |= B00000100
#define buzzerOff() DDRE |= 0x04,PORTE &= B11111011
#else
#define buzzerOn()  pinMode(SCL,OUTPUT),digitalWrite(SCL, HIGH)
#define buzzerOff() pinMode(SCL,OUTPUT),digitalWrite(SCL, LOW)

#7

Hi @TouchClassroom,

We have updated the mBlock, please download the package.

ftp://vip:makeblock@23.244.68.111/


#8

Thank you and welcome to check my tutorial of mBlock and Starter Kit.


mBlock 與 MakeBlock Starter Kit 入門課本
http://touchclassroom.blogspot.tw/2015/01/mblock-makeblock-starter-kit.html


#9

Hi! Johnny:

I had updated mBlock to version 2.1.4.0226.

There is a new photo show “turn off your buzzer”, is that means anyone do not use buzzer, right?

I know I can control buzzer by “buzzerOn()” or “pinMode(SCL,OUTPUT),digitalWrite(SCL, HIGH)”, but there still no block for buzzer.


#10

Hi @TouchClassroom,

I have asked our engineer, the buzzer can’t work in mBlock until. I’m very sorry for that. You need to control it in Arduino IDE.


#11

Hi,
On MeOrion board, the buzzer is connected to the SCL line of the I2C bus.
When the buzzer switch is on, the bluetooth is no more able to connect. Seems that connecting the buzzer trouble the board.
To reproduce the issue:

  • program the orion_factory fw
  • switch off the buzzer and check that you can connect the bluetooth by using for example the Makeblock app on smartphone
  • next, switch on the buzzer and check that the bluetooth connect, then disconnect in loop