{"id":326,"date":"2014-08-28T13:58:44","date_gmt":"2014-08-28T18:58:44","guid":{"rendered":"http:\/\/slackworld.org\/blog\/?p=326"},"modified":"2016-08-18T01:45:15","modified_gmt":"2016-08-18T06:45:15","slug":"brb-brb","status":"publish","type":"post","link":"http:\/\/slackworld.org\/blog\/archives\/326","title":{"rendered":"BRB BRB"},"content":{"rendered":"<p>My company requires us to lock our computers anytime we step away.\u00a0 This is easy enough to do in Windows by pressing Win+L, but that isn&#8217;t the slack way.\u00a0 In addition sometimes you have already stood up, taken your hands away from the keyboard when you remember you need to lock the computer.\u00a0 So I decided to implement the BRB BRB (Be Right Back Big Red Button).\u00a0 This gives me a nice large button to\u00a0push\u00a0that locks my computer.\u00a0 It has the side benefit of just being fun to mash on.<\/p>\n<p><!--more--><\/p>\n<p>Following is a quick run down of the parts and software.\u00a0 This is not a step by step build, though I may do one in the future as this is a simple and rewarding projects for someone of any skill level.<\/p>\n<h2>Parts<\/h2>\n<p>This is really a simple project you need the following (with estimated costs):<\/p>\n<ul>\n<li><a title=\"http:\/\/www.amazon.com\/dp\/B008ZY8G5O\" href=\"http:\/\/www.amazon.com\/dp\/B008ZY8G5O\" target=\"_blank\">E-stop button<\/a> $9<\/li>\n<li><a title=\"https:\/\/www.pjrc.com\/store\/teensy.html\" href=\"https:\/\/www.pjrc.com\/store\/teensy.html\" target=\"_blank\">Teensy 2.0<\/a> $16<\/li>\n<li><a title=\"https:\/\/www.pjrc.com\/store\/cable_usb_mini_b.html\" href=\"https:\/\/www.pjrc.com\/store\/cable_usb_mini_b.html\" target=\"_blank\">USB mini B cable<\/a> $4<\/li>\n<li>Wire (4&#8243;) $0<\/li>\n<\/ul>\n<p><a href=\"http:\/\/slackworld.org\/blog\/wp-content\/uploads\/2014\/08\/IMG_20140717_1846301.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-thumbnail wp-image-343\" src=\"http:\/\/slackworld.org\/blog\/wp-content\/uploads\/2014\/08\/IMG_20140717_1846301-150x150.jpg\" alt=\"IMG_20140717_184630\" width=\"150\" height=\"150\" \/><\/a><\/p>\n<h2>Assembly<\/h2>\n<p>Assembly is pretty easy.\u00a0\u00a0You need 2 short (about 2&#8243;) pieces of wire.\u00a0 Strip and tin each end and hook one to the Teensy GND connection, and the other to the Teensy B0 connection.\u00a0 Almost any pin could be used, but B0 had the convenience of being right next to the GND connection.<\/p>\n<p>The E-stop button I used was normally closed (NC), but the software will work with a normally open (NO) switch with an easy change.\u00a0 There are only two contacts on the switch so\u00a0connect one of the two wires to each contact.\u00a0 It doesn&#8217;t matter which is which.\u00a0 If you have both NO, and NC contacts just pick which set you want and make sure the\u00a0software is configured appropriately.<\/p>\n<p>Also, most E-stop buttons latches in the &#8220;stop&#8221; position when pressed.\u00a0 The one I purchased was no exception.\u00a0 It required a slight turn to get it to release.\u00a0 This was not the behavior I wanted, so I disassembled the button mechanics and was able to easily disable the latch mechanism in a\u00a0way it could easily be reversed.\u00a0 The specific procedure required will depend on the specific E-stop that you have.<\/p>\n<p>I drilled a small\u00a0notch at the top of the black bottom piece to allow the USB cable to escape.<\/p>\n<p>I then attached the USB cable, gently fit the component in and closed up the case.<\/p>\n<p><a href=\"http:\/\/slackworld.org\/blog\/wp-content\/uploads\/2014\/08\/IMG_20140717_1908161.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-thumbnail wp-image-344\" src=\"http:\/\/slackworld.org\/blog\/wp-content\/uploads\/2014\/08\/IMG_20140717_1908161-150x150.jpg\" alt=\"IMG_20140717_190816\" width=\"150\" height=\"150\" \/><\/a><\/p>\n<h2>Software<\/h2>\n<p>I used the <a title=\"http:\/\/arduino.cc\/en\/main\/software\" href=\"http:\/\/arduino.cc\/en\/main\/software\" target=\"_blank\">Arduino environment<\/a> and the <a title=\"https:\/\/www.pjrc.com\/teensy\/teensyduino.html\" href=\"https:\/\/www.pjrc.com\/teensy\/teensyduino.html\" target=\"_blank\">Teensyduino<\/a> libraries to program the Teensy.\u00a0\u00a0\u00a0 The same code could be used with minor modification if you want to use an <a title=\"http:\/\/arduino.cc\/en\/Main\/ArduinoBoardMicro\" href=\"http:\/\/arduino.cc\/en\/Main\/ArduinoBoardMicro\" target=\"_blank\">Arduino\u00a0Micro<\/a> instead of the Teensy.\u00a0 The <a title=\"http:\/\/www.adafruit.com\/product\/1501\" href=\"http:\/\/www.adafruit.com\/product\/1501\" target=\"_blank\">Adafruit Trinket <\/a>may be an even better choice for this project for both size and cost.<\/p>\n<p>Code: <a href=\"https:\/\/github.com\/slackmasterstan\/BRBTeensy\" target=\"_blank\">https:\/\/github.com\/slackmasterstan\/BRBTeensy<\/a><\/p>\n<p><a href=\"http:\/\/slackworld.org\/blog\/wp-content\/uploads\/2014\/08\/IMG_20140717_1911221.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-thumbnail wp-image-345\" src=\"http:\/\/slackworld.org\/blog\/wp-content\/uploads\/2014\/08\/IMG_20140717_1911221-150x150.jpg\" alt=\"IMG_20140717_191122\" width=\"150\" height=\"150\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>My company requires us to lock our computers anytime we step away.\u00a0 This is easy enough to do in Windows by pressing Win+L, but that isn&#8217;t the slack way.\u00a0 In addition sometimes you have already stood up, taken your hands &hellip;<\/p>\n<p class=\"read-more\"><a href=\"http:\/\/slackworld.org\/blog\/archives\/326\">Read more &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":345,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[15],"tags":[28,38],"class_list":["post-326","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-electronics","tag-arduino","tag-teensy"],"_links":{"self":[{"href":"http:\/\/slackworld.org\/blog\/wp-json\/wp\/v2\/posts\/326","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/slackworld.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/slackworld.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/slackworld.org\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/slackworld.org\/blog\/wp-json\/wp\/v2\/comments?post=326"}],"version-history":[{"count":5,"href":"http:\/\/slackworld.org\/blog\/wp-json\/wp\/v2\/posts\/326\/revisions"}],"predecessor-version":[{"id":378,"href":"http:\/\/slackworld.org\/blog\/wp-json\/wp\/v2\/posts\/326\/revisions\/378"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/slackworld.org\/blog\/wp-json\/wp\/v2\/media\/345"}],"wp:attachment":[{"href":"http:\/\/slackworld.org\/blog\/wp-json\/wp\/v2\/media?parent=326"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/slackworld.org\/blog\/wp-json\/wp\/v2\/categories?post=326"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/slackworld.org\/blog\/wp-json\/wp\/v2\/tags?post=326"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}