Can I make a CPX wait for another one before continuing?

Microsoft's MakeCode platform for easy blocks-style programming

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
Jesse_01
 
Posts: 1
Joined: Fri Dec 02, 2022 12:05 pm

Can I make a CPX wait for another one before continuing?

Post by Jesse_01 »

Greetings.

I'm Jesse, I'm a student at the university and I'm making a True or False quiz game as a project, using MakeCode and two CPXs. There's a point in the programs where I need both CPXs to run a function synchronized, so I'm trying to set commands to make one wait for the other. I've tried a couple of methods, but I can't get it to work properly. Could anyone tell me what I could try, how I could make it possible or at least what funcitons / commands I could try using? If possible, via infrared signals.

Thank you so much in advance.

User avatar
mikeysklar
 
Posts: 13936
Joined: Mon Aug 01, 2016 8:10 pm

Re: Can I make a CPX wait for another one before continuing?

Post by mikeysklar »

Have you established communication between the two CPX modules? If so, what are you using?

We don't have a guide specific to what you are asking, but you could use the TTL UART RX/TX pins between two CPX's to send data between them. That would allow you to send numbers/characters between the two devices.

https://learn.adafruit.com/circuit-play ... onnections

User avatar
johnpark
 
Posts: 985
Joined: Wed Mar 25, 2009 2:15 pm

Re: Can I make a CPX wait for another one before continuing?

Post by johnpark »

Would something like this do what you need? It just calls the same function on send as is does on receive.
Screen Shot 2022-12-05 at 9.37.42 PM.jpg
Screen Shot 2022-12-05 at 9.37.42 PM.jpg (214.27 KiB) Viewed 1012 times

Locked
Please be positive and constructive with your questions and comments.

Return to “MakeCode”