Coding Blocks for Touch Sensors

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
allyrwebb
 
Posts: 2
Joined: Fri Nov 12, 2021 12:36 pm

Coding Blocks for Touch Sensors

Post by allyrwebb »

Is there any way to create a coding block that involves input from 2 touch sensors at once? For example, something happens when touch sensors A2 and A3 are activated simultaneously?

User avatar
blnkjns
 
Posts: 963
Joined: Fri Oct 02, 2020 3:33 am

Re: Coding Blocks for Touch Sensors

Post by blnkjns »

Throw two of those blocks in a blue logic AND block.

User avatar
allyrwebb
 
Posts: 2
Joined: Fri Nov 12, 2021 12:36 pm

Re: Coding Blocks for Touch Sensors

Post by allyrwebb »

Ok, thanks so much for the suggestion. I set the block up with "if touch A2 is pressed and touch A3 is pressed, then..." (all the outputs I wanted to see happen), but the whole block is still all greyed out. Any idea why it won't work?
Attachments
Adafruit Screenshot.png
Adafruit Screenshot.png (30 KiB) Viewed 650 times

User avatar
blnkjns
 
Posts: 963
Joined: Fri Oct 02, 2020 3:33 am

Re: Coding Blocks for Touch Sensors

Post by blnkjns »

Because it is out of context? There is no start block. Put it in a loop-forever block for example.

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

Return to “MakeCode”