Hi all - I am using Android’s Automate app (llamalabs)
to communicate with my Mbot by IR.
Automate lets you set up “flows” on your cell phone (using block programming). I’ve set up a flow that uses the cell phone (LG4) orientation sensor so that when the phone is pointing north it sends an IR signal. The Mbot picks this up (The signal turns out to be the same as the “4” on the IR Remote that came with Mbot) and then “knows” when it is headed north. The problem is I have to have “raw codes” to put in the Automate “Transmit IR” block. The IR code that corresponds to “4” on the IR remote is as follows:
8950, 4400, 550, 550, 600, 500, 600, 1650, 550, 550, 600, 500, 600, 550, 600, 500, 600, 550, 550, 1650, 600, 1600, 600, 550, 550, 1650, 600, 1600, 600, 1600, 600, 1650, 600, 1600, 600, 500, 600, 550, 600, 500, 600, 1600, 600, 550, 600, 500, 600, 550, 600, 500, 600, 1600, 600, 1650, 600, 1600, 600, 500, 600, 1650, 550, 1650, 600, 1600, 600, 1600, 600
This code was in an app on the Automate community, so I just got lucky to find it - but I can’t find any other raw codes to use in my project. I understand Makeblock uses NEC protocol and I’ve done searches but so far haven’t found anything that works.
Any suggestions or help appreciated!
I should mention I am also working on this project using a flow that flashes the LED on the LG4 to communicate with the Mbot - (I tape or otherwise attach) the cell phone to the top of the Mbot and when an event (say that the phone is pointed north) is triggered - the phone flashes the LED and this is then read by the Mbot ambient light sensor (built in)… You could use multiple flashes to communicate other directions - but this has proven to be pretty slow as there is a minimal time that it takes to turn the FLASH LED on and off. That’s why I want to use the IR signals.
One final use I’ve made of this idea is to stick a LumaLight on top of the Mbot. The LumaLight is a PIR night light that comes in a little disc form. It fits perfectly on top of the Mbot and when triggered, you can read the onboard light sensor values to trigger some behavior in the Mbot - for example, when I get up at night and step out into the hallway, the LumaLight triggers, the Mbot reads the light level and then travels down the hal way in front of me -l lighting my way!