hi,
I would like to know what the IR Transmitter is for.
I would also like to know how to program the IR Transmitter.
Thank you
Arhan
hi,
I would like to know what the IR Transmitter is for.
I would also like to know how to program the IR Transmitter.
Thank you
Arhan
That is also my curiosity. It seems not just to drag some blocks from the communication extension to make it works. Thanks for any experiences.
my uncle and i were wondering the same thing what would it be used for well back to the idea bored!
Hi aRandomGuyOnAlaptop,
The IR transmitter is for the IR remote controller coming from the mBot’s package.
You can program for the IR remote controller through the mBlock software.
I dont think you answered the initial question. MBlock supports only IR RX on the MBot. While there is RX supported via the remote IR controller, TX port from the MBot is not yet supported. This is a great pity as there is not way to get two way coms to MBot now with the current software either in the Arduino library examples or in MBlock. Compared to alternative systems like much the cheaper Australian Edison this is a major disadvantage. Edison has two way coms so you can communicate between robots and to the server in both directions. While Edison only has this in IR coms it enables some interesting applications. Looking forward to two way coms on MBot to make two MBots dance in harmony.
I have been hacking the on board IR TX with Seeed Studio Grove IR Receiver and Wiolink. To my surprise I was able to send messages from mBot using the ‘send mBot’s Message X’ command where X is the message you wish to send from mBot. The Grove-Wiolink acted as an IR blaster to decode mBot’s messages as it gave the following:
if X=1 then the Grove/Wiolink received a code of ff008c73
If X=2 then the code was ff004cb3
X=3 the code was ff00cc33
etc
Each time the IR packet is terminate with a end of message code: ff0050af
This is interesting as it allows mBot to communicate with other things using IR coms. There is nothing documented on the send mBot’s Message X’ command and the codes. I suspect that the NEC IR protocol is being used and I need to know more about parameters of this such as the lengths of start high signal, start low signal, short signal & the long signal to define the code conversion algorithm. However even without this Grove-WioLink provides a unique and consistent decoded message.
Today I had some success with emulating the manual IR Remote controller using Seeed Studio’s Wiolink with a Grove IR Emitter and WEB API. Initially I set up Wiolink to accept the IR codes from the IR Remote using a Grove IR Receiver. This decoded follows:
A on the IR Remote becomes 00ffa25d on Wiolink
B =>00ff629d
C=>00ffe21d
etc - all keys have been decoded. This allows you to communicate with mBot via Wiolink instead of using the manual IR Remote controller. You can now use programs like node-red on Raspberry pi or a PC to communicate with mBot using WEB APIs. Only problem is coms latency - between 1 and 4 secs so you can not use this for urgent commands.
I’m working on some sample Arduino programs for the IR Receiver and Transmitter. As @tec_support mentions, the receiver is set up mostly to receive transmissions from the IR Remote that accompanies the mBot. However, I am successfully sending messages between mBots using the sendString and getString methods from the library.
File: IR_Send_Test.ino
1 #include <Arduino.h>
2 #include <Wire.h>
3 #include <SoftwareSerial.h>
4
5 #include <MeMCore.h>
6
7 MeIR ir;
8
9 #include <MeMCore.h>
10
11 void setup() {
12 Serial.begin(9600);
13 ir.begin();
14 }
15
16 void loop() {
17 ir.sendString("Winning");
18 Serial.println("Sending IR String: Winning" );
19 }
File: IR_Receive_Test.ino
1 #include <Arduino.h>
2 #include <Wire.h>
3 #include <SoftwareSerial.h>
4
5 #include <MeMCore.h>
6
7 MeIR ir_receiver;
8
9 #include <MeMCore.h>
10
11 void setup() {
12 Serial.begin(9600);
13 ir_receiver.begin();
14 }
15
16 void loop() {
17 Serial.println("IR Code: " + ir_receiver.getString());
18 }
Enjoy!
Chuck