# Automation:bit and touch

**URL:** <https://forums.pimoroni.com/t/automation-bit-and-touch/10899>\
**Category:** BBC Micro:Bit\
**Created:** [July 8, 2019, 11:50am UTC](https://forums.pimoroni.com/t/automation-bit-and-touch/10899 "2019-07-08T11:50:03Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![nickine9](https://avatars.discourse-cdn.com/v4/letter/n/779978/32.png) [@nickine9](https://forums.pimoroni.com/u/nickine9)\
**Post date:** [July 8, 2019, 11:50am UTC](https://forums.pimoroni.com/t/automation-bit-and-touch/10899/1 "2019-07-08T11:50:03Z")

</div>

I have an automation:bit which works well for turning things on and off but now I want to add a simple touch control. in the past I have used a routine which averages analog reads to set an untouched threshold for a pin and then a similar process to get a touched value which is hope fully different. However as part of the averaging process I reset the pin to high after each read. In makecode I can do this by doing a digital write following the analogue read on the same pin but it looks as though this is not possible with the automation:bit as digital and analogue seem to be separated. can anyone suggest a way I can do this? ideally in makecode?

thanks in advance

---

<div class="post-metadata">

**Author:** ![alphanumeric](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/alphanumeric/32/2729_2.png) [@alphanumeric](https://forums.pimoroni.com/u/alphanumeric)\
**Post date:** [July 8, 2019, 1:55pm UTC](https://forums.pimoroni.com/t/automation-bit-and-touch/10899/2 "2019-07-08T13:55:46Z")

</div>

This should get you access to a regular pin to do it the way you used to.  
It may not be very elegant etc, but should work with what you have now.

> **[Pinbetween – Pimoroni](https://shop.pimoroni.com/products/pinbetween)**
>
> Pinbetween gives you access to all of the micro:bit's pins at the same time as using an edge-connector add-on, and it's completely solderless!

---

<div class="post-metadata">

**Author:** ![nickine9](https://avatars.discourse-cdn.com/v4/letter/n/779978/32.png) [@nickine9](https://forums.pimoroni.com/u/nickine9)\
**Post date:** [July 8, 2019, 1:57pm UTC](https://forums.pimoroni.com/t/automation-bit-and-touch/10899/3 "2019-07-08T13:57:49Z")

</div>

interesting many thanks. its not ideal but interesting

---

<div class="post-metadata">

**Author:** ![alphanumeric](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/alphanumeric/32/2729_2.png) [@alphanumeric](https://forums.pimoroni.com/u/alphanumeric)\
**Post date:** [July 8, 2019, 2:57pm UTC](https://forums.pimoroni.com/t/automation-bit-and-touch/10899/4 "2019-07-08T14:57:16Z")

</div>

I was thinking those exact thoughts when I posted it.

I have a couple of Micro Bits, I don’t have an automation bit though. Just some breakouts that plug into a solderless bread board.

Another option is to use the cricket for the Micro bit.  
Capacitive touch support built in and almost everything the automation bit has. I think all its missing is the relay.

> **[Adafruit CRICKIT for micro:bit – Pimoroni](https://shop.pimoroni.com/products/adafruit-crickit-for-micro-bit)**
>
> Sometimes we wonder if robotics engineers ever watch movies. If they did, they'd know that making robots into slaves always ends up in a robot rebellion. Why even go down that path? At Adafruit, they believe in making robots our friends!

---

<div class="post-metadata">

**Author:** ![nickine9](https://avatars.discourse-cdn.com/v4/letter/n/779978/32.png) [@nickine9](https://forums.pimoroni.com/u/nickine9)\
**Post date:** [July 9, 2019, 9:47am UTC](https://forums.pimoroni.com/t/automation-bit-and-touch/10899/5 "2019-07-09T09:47:20Z")

</div>

thanks again for the reply, i have looked at the crikit before and will probably get one whether or not i use it for this project. I actually got the touch function working without any extra hardware although i have no idea how or why!

---

<div class="post-metadata">

**Author:** ![alphanumeric](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/alphanumeric/32/2729_2.png) [@alphanumeric](https://forums.pimoroni.com/u/alphanumeric)\
**Post date:** [July 9, 2019, 10:45am UTC](https://forums.pimoroni.com/t/automation-bit-and-touch/10899/6 "2019-07-09T10:45:11Z")

</div>

I have the Pi version of the Crickit. Haven’t done much with it so far. Trying to remeber why I bought lol.  
Now that it is working I’d make a backup image of that card. ;)
