Answers.Body: <p>For the first switch I bent the legs of the button and splayed them out just a little bit.</p>
  <p><a href="https://i.sstatic.net/wTREx.jpg" rel="noreferrer"><img src="https://i.sstatic.net/wTREx.jpg" alt="enter image description here" /></a></p>
  <p>Next I stripped off the caps of two Dupont connectors, ran them through the headlight bricks and connected the button upside down.</p>
  <p><a href="https://i.sstatic.net/IcYMW.jpg" rel="noreferrer"><img src="https://i.sstatic.net/IcYMW.jpg" alt="enter image description here" /></a></p>
  <p>An axle will trigger the button. Either one with a stud on one end (and a 1x1 tile) or a regular one with a half bush.</p>
  <p><a href="https://i.sstatic.net/H99Fs.jpg" rel="noreferrer"><img src="https://i.sstatic.net/H99Fs.jpg" alt="enter image description here" /></a></p>
  <p>A 2x2 brick on top serves as a button.</p>
  <p><a href="https://i.sstatic.net/D2rN3.jpg" rel="noreferrer"><img src="https://i.sstatic.net/D2rN3.jpg" alt="enter image description here" /></a></p>
  <p>The second switch is a hacked light brick. They're very inexpensive on bricklink.</p>
  <p><a href="https://i.sstatic.net/1v46S.jpg" rel="noreferrer"><img src="https://i.sstatic.net/1v46S.jpg" alt="enter image description here" /></a></p>
  <p>I took out the batteries and the LED (they're not soldered as they're meant to come apart) and replaced the one on the right with a metal contact.</p>
  <p>For that I took a paper fastener, cut off one of its legs and bent it in an e shape.</p>
  <p><a href="https://i.sstatic.net/kWqpK.jpg" rel="noreferrer"><img src="https://i.sstatic.net/kWqpK.jpg" alt="enter image description here" /></a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-09-14T14:06:46.577Z
Answers.Text: Solution with hacked light brick is just great combination of non-destructive use of LEGO with 3rd party elements.
Answers.UserDisplayName: Alex
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-09-15T09:09:35.533Z
Answers.Text: This is amazing! Thanks
Answers.UserDisplayName: bogen
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-09-14T09:19:29.110Z
Answers.LastActivityDate: 2020-09-14T09:19:29.110Z
Answers.UserDisplayName: Uli
Answers.Body: <p>Could you use one of the Lego touch sensors:</p>
  <ul>
  <li><a href="https://www.bricklink.com/v2/catalog/catalogitem.page?P=879" rel="nofollow noreferrer">Electric, Sensor, Touch</a></li>
  <li><a href="https://www.bricklink.com/v2/catalog/catalogitem.page?P=879c02&amp;idColor=15" rel="nofollow noreferrer">Trans-Light Blue Electric, Sensor, Touch with Red Contact</a></li>
  <li><a href="https://www.bricklink.com/v2/catalog/catalogitem.page?P=879c03&amp;idColor=15" rel="nofollow noreferrer">Trans-Light Blue Electric, Sensor, Touch with White Contact</a></li>
  <li><a href="https://www.bricklink.com/v2/catalog/catalogitem.page?P=879c04&amp;idColor=15" rel="nofollow noreferrer">Trans-Light Blue Electric, Sensor, Touch with Yellow Contact</a></li>
  <li><a href="https://www.bricklink.com/v2/catalog/catalogitem.page?P=x1167cx1&amp;idColor=11" rel="nofollow noreferrer">Black Electric, Sensor, Touch 4.5V</a></li>
  <li><a href="https://www.bricklink.com/v2/catalog/catalogitem.page?P=2974c01&amp;idColor=3" rel="nofollow noreferrer">Yellow Electric, Sensor, Touch with Non-Removable Lead</a></li>
  </ul>
  <p>Here's a proof of concept modified 2x2 brick with a B3F tactile switch:
  <a href="https://i.sstatic.net/mx8jl.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/mx8jl.jpg" alt="Assembled" /></a>
  <a href="https://i.sstatic.net/DQ4Iw.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/DQ4Iw.jpg" alt="Parts view 1" /></a>
  <a href="https://i.sstatic.net/DtD48.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/DtD48.jpg" alt="Parts view 2" /></a>
  <a href="https://i.sstatic.net/gIQat.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/gIQat.jpg" alt="Partial assembly" /></a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-09-08T01:05:32.970Z
Answers.LastActivityDate: 2020-09-09T02:18:35.760Z
Answers.LastEditDate: 2020-09-09T02:18:35.760Z
Answers.UserDisplayName: Dan1138
Body: <p><a href="https://i.sstatic.net/nEeDO.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/nEeDO.jpg" alt="enter image description here" /></a></p>
  <p>I have two different buttons (<a href="https://www.newark.com/omron-electronic-components/b3f-1000/switch-tactile-spst-no-50ma-though/dp/36K7138?COM=ref_hackster" rel="nofollow noreferrer">B3F-1000</a> and <a href="https://www.westfloridacomponents.com/SW166APN06/LEC9A2T0SC+3A+250VAC+0.5A+125VAC+Micro+Lever+Switch+C+%26+K+Components.html" rel="nofollow noreferrer">3a250vac switch</a>) which I want to integrate into a LEGO &quot;machine&quot; which I'm powering with an Arduino. Since the rest is integrated into LEGO plates, I also want to do the same for the buttons, which means they need to be covered in LEGO, but still fit with the rest, which means no glue.</p>
  <p>Looking for suggestions on how to attach LEGO parts in a way so the user pushes a LEGO part and it is registered by the button. It's a very tiny range of motion, so it doesn't need to move much in the process, and it's not a toggle button, which means every press will feel the same.</p>
  <p>Picture with two common parts for scale.</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-09-03T01:29:38.643Z
Comments.Text: Are you wanting to place the buttons inside of the bricks, or just be able to stack them with other Lego parts?
Comments.UserDisplayName: Matthew Jensen
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-09-03T06:29:09.493Z
Comments.Text: @MatthewJensen they should just be stacked, as a part of the build, not inside.
Comments.UserDisplayName: bogen
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-09-08T10:32:58.223Z
Comments.Text: Are you willing to drill, glue or otherwise irrevocably alter your bricks? What are the size constraints of the solution? How stable must it be?
Comments.UserDisplayName: zovits
Tags: <technic><building><design><electronics>
Title: How to integrate hardware/embedded button with LEGO?
UserDisplayName: bogen
ThreadText: # How to integrate hardware/embedded button with LEGO?
  
  (Asked by: username_0 on 2020-09-02)
  
  [![enter image description here](https://i.sstatic.net/nEeDO.jpg)](https://i.sstatic.net/nEeDO.jpg)
  
  I have two different buttons ([B3F-1000](https://www.newark.com/omron-electronic-components/b3f-1000/switch-tactile-spst-no-50ma-though/dp/36K7138?COM=ref_hackster) and [3a250vac switch](https://www.westfloridacomponents.com/SW166APN06/LEC9A2T0SC+3A+250VAC+0.5A+125VAC+Micro+Lever+Switch+C+%26+K+Components.html)) which I want to integrate into a LEGO "machine" which I'm powering with an Arduino. Since the rest is integrated into LEGO plates, I also want to do the same for the buttons, which means they need to be covered in LEGO, but still fit with the rest, which means no glue.
  
  Looking for suggestions on how to attach LEGO parts in a way so the user pushes a LEGO part and it is registered by the button. It's a very tiny range of motion, so it doesn't need to move much in the process, and it's not a toggle button, which means every press will feel the same.
  
  Picture with two common parts for scale.
  
  **Tags:** technic, building, design, electronics
  > **Comments:**
  > **username_1**: Are you wanting to place the buttons inside of the bricks, or just be able to stack them with other Lego parts?  
  > **username_0**: @MatthewJensen they should just be stacked, as a part of the build, not inside.  
  > **username_2**: Are you willing to drill, glue or otherwise irrevocably alter your bricks? What are the size constraints of the solution? How stable must it be?  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_3 on 2020-09-14. Score: 7 | Accepted answer
  
  For the first switch I bent the legs of the button and splayed them out just a little bit.
  
  [![enter image description here](https://i.sstatic.net/wTREx.jpg)](https://i.sstatic.net/wTREx.jpg)
  
  Next I stripped off the caps of two Dupont connectors, ran them through the headlight bricks and connected the button upside down.
  
  [![enter image description here](https://i.sstatic.net/IcYMW.jpg)](https://i.sstatic.net/IcYMW.jpg)
  
  An axle will trigger the button. Either one with a stud on one end (and a 1x1 tile) or a regular one with a half bush.
  
  [![enter image description here](https://i.sstatic.net/H99Fs.jpg)](https://i.sstatic.net/H99Fs.jpg)
  
  A 2x2 brick on top serves as a button.
  
  [![enter image description here](https://i.sstatic.net/D2rN3.jpg)](https://i.sstatic.net/D2rN3.jpg)
  
  The second switch is a hacked light brick. They're very inexpensive on bricklink.
  
  [![enter image description here](https://i.sstatic.net/1v46S.jpg)](https://i.sstatic.net/1v46S.jpg)
  
  I took out the batteries and the LED (they're not soldered as they're meant to come apart) and replaced the one on the right with a metal contact.
  
  For that I took a paper fastener, cut off one of its legs and bent it in an e shape.
  
  [![enter image description here](https://i.sstatic.net/kWqpK.jpg)](https://i.sstatic.net/kWqpK.jpg)
  
  > **Comments:**
  > **username_4**: Solution with hacked light brick is just great combination of non-destructive use of LEGO with 3rd party elements.  
  > **username_0**: This is amazing! Thanks  
  
  ---
  
  ### Answer by username_5 on 2020-09-08. Score: 3
  
  Could you use one of the Lego touch sensors:
  
  * [Electric, Sensor, Touch](https://www.bricklink.com/v2/catalog/catalogitem.page?P=879)
  * [Trans-Light Blue Electric, Sensor, Touch with Red Contact](https://www.bricklink.com/v2/catalog/catalogitem.page?P=879c02&idColor=15)
  * [Trans-Light Blue Electric, Sensor, Touch with White Contact](https://www.bricklink.com/v2/catalog/catalogitem.page?P=879c03&idColor=15)
  * [Trans-Light Blue Electric, Sensor, Touch with Yellow Contact](https://www.bricklink.com/v2/catalog/catalogitem.page?P=879c04&idColor=15)
  * [Black Electric, Sensor, Touch 4.5V](https://www.bricklink.com/v2/catalog/catalogitem.page?P=x1167cx1&idColor=11)
  * [Yellow Electric, Sensor, Touch with Non-Removable Lead](https://www.bricklink.com/v2/catalog/catalogitem.page?P=2974c01&idColor=3)
  
  Here's a proof of concept modified 2x2 brick with a B3F tactile switch:
  [![Assembled](https://i.sstatic.net/mx8jl.jpg)](https://i.sstatic.net/mx8jl.jpg)
  [![Parts view 1](https://i.sstatic.net/DQ4Iw.jpg)](https://i.sstatic.net/DQ4Iw.jpg)
  [![Parts view 2](https://i.sstatic.net/DtD48.jpg)](https://i.sstatic.net/DtD48.jpg)
  [![Partial assembly](https://i.sstatic.net/gIQat.jpg)](https://i.sstatic.net/gIQat.jpg)
  
  
  ---
  
  