Sending Commands to Codey Rocky


#1

Hi,

New here. Just ordered a Codey Rocky. I have 2 questions.

1.How do I send commands or messages to Codey Rocky? I’ve seen screenshots of a code that says "when I receive (message1), " take a specific action. Where is it receiving messages from/how do I send it these messages?

And a follow up question.
2. Is it possible to set up a code that when codey rocky receives a message saying “FWD,” he drives forward for one second, then stops? And same for a message that says “BCK” and he moves backwards for 1 second and then stops? I’m hoping to be able to trigger these actions with specific messages such as FWD and BCK. But I don’t know where I would be “sending” these messages from, or if I can set something up so viewers during a live broadcast on Facebook could enter commands into the comments section, and that could trigger a message to codey rocky to make him either move forward or backwards.

Any help or info would be MUCH appreciated!
Cheers


#2

Hi Ted! Welcome to the Codey community.
So the messaging happens between the computer your programming and Codey (via Bluetooth, if I remember).

Yes, you could program it to go fwd/back via messages. I haven’t done that specifically myself, but I don’t see why not. Reply back if you have any trouble.

BTW, Codey doesn’t support Python directly. You’d be coding this using Scratch (drag and drop blocks), but it’s actually kinda fun (I’m a long time programmer ;v).

UPDATE: You can even program him to go until he senses an edge. However, the sensor is in the front (turned down toward surface, when used this way) or object (sensor pointed forward, not both) and if he approaches an edge on a sharp angle, he can sense too late. You can alleviate this somewhat by pointing the sensor a bit more ahead (vs straight down) so that he detect the edge before getting as close.

Karl


#3

Thanks Karl!

That’s some great info! Glad to hear it should work out. I appreciate the extra info too. Great idea about the edge sensor too! And yes, Scrach does look kinda fun! Can’t wait to try it out.

I’ve read a bit about cloud messages (not sure what it means) and possibly needing an account to send messages to Codey. Is that correct? Or could I have Codey automatically sifting through the comments of my live broadcast and taking commands/input values directly and immediately from there without input from me?

Update:
I guess I just don’t understand how or where messages get sent through to Codey. Nor if it’s possible to have real-time comments on a video be what triggers codey rocky to move.


#4

Ha, you got me there. I’d have to look again - I think I have seen something about either wifi or cloud messaging, now that you mention it. They do change and upgrade things. All good as it means the platform is still active!
I will have to explore that more myself.

Not sure what your asking re real-time comments and video. You can definitely program him as if hes multi threaded (do more than one thing at a time), but he doesn’t have a camera. I’ve wondered if you could by adding the camera from MakeBlock Neuron Inventor Kit - but haven’t tried that (I don’t have the Neuron kit). Codey does have external connectors.


#5

Just did a quick check… Yes there is cloud messaging - they talk about using HaloCode for it, not Codey (another piece of hardware), but it’s like available for Codey - not sure. The messages would still originate from the computer you program from tho. At least that’s my understanding.

Maybe give me an overview of what you’re trying to do and I may have a better idea? Unless you’d rather not share it. ;v)


#6

One thing I didn’t really understand is that the desktop app works all on it’s own - no robot needed. You can use it to program Scratch games and stuff using sprites. You can also add hardware (there a section to do that) and when you do, you get more Scratch commands to use. Plus the ability to connect either Live or Upload-and-run to the robot.

So often you will have a different program on the desktop than what is uploaded to the robot. Hence you can trigger a message when a sprite is clicked. That would send the message to the cloud and then to Codey to act on.

If that all makes sense. Download the desktop and start playing with it. That way when Codey arrives, you’ll have a head start. There are some same games etc to load and look thru to get a good idea of how things work.

:slight_smile:


#7

Ha, I’ll add a bit more…

I was also confused initially, as I saw programs like facial and voice recognition etc - for Codey - but no camera?! So what these are, are programming the desktop to use your computers camera to do the the recognition and send commands to Codey based on that - or just drawing sprites etc. Not even really using Codey at all.


#8

Thanks again! Thats perfect. I’m going to download it now and get a head start.

Here is Ideally what would happen if what I’m thinking is possible…

Let’s say, for example, I started a Live video on Facebook from my laptop camera. I am now live on Facebook. (No codey involved yet.)

You see my video streaming live on Facebook and you click to watch the video. Once watching the live-stream, you comment on the video by saying either “FWD” or “BCK,” as I will have asked viewers to do.

Codey Rocky then gets that message. It is essentially constantly reading through the comments of my current live broadcast, and anytime it reads the phrase “FWD,” it moves forward for one second and stops. Same for “BCK” and backwards. The viewer can see how their comment affected codey rocky in real-time by watching him move forward or backward as they commanded.

Is it possible?


#9

Ah!! Well… it might be, but you’d have to add something like Zapier or IFTTT to read the FB comments and then act on that - maybe thru a connection to the Makeblock desktop. These are services that you may need to pay for as well.

(FB) - - - - - (IFTTT) - - - - -(Makeblock IDE/Desktop) - - - - (cloud) - - - - - (Codey)

Looks like IFTTT is out -> Codey Rocky IFTTT there is this, but may have been promotional only? https://www.youtube.com/watch?v=YE-F871yc2s
Interesting the Neuron kit mentions IFTTT https://www.amazon.ca/Makeblock-MBP1030001-MakeBlock-Neuron-Inventor/dp/B077GVPDNV - scoll down or search for it. So if components in that kit can be attached to Codey then maybe? :thinking:

I’m not getting any hits on Zapier and Makeblock :frowning:

The only other possible way would be if you could screen-read your computer’s FB page for text, via the Makeblock IDE. I haven’t seen anything like that and I doubt it’s possible without writing your own extension and having a LOT of know-how. :wink:

All this said, there are lots of smart people on in this community, so maybe someone else can chime it!


#10

Well said! Interesting options to look into off the start. I was wondering about Zapier myself. Too bad it doesn’t look like it’s integrated. Screen reading could be a good route to look into as well. Interested to see if it works!