Raspberry Pi of Goemon

Raspberry Pi3 learning blog

「 月別アーカイブ:2016年10月 」 一覧

img_20161014_071953

AD converter: LED responsive to room brightness

If you use a toggle switch, it’s enough  that you just monitor the HIGH/LOW signal. But what about monitoring brightness/darkness? If you allocate “0” to the night as it’s dark and “1” to the noon as it’s bright, what would you allocate to the morning and evening? Maybe you have no solution because brightness/darkness is not digital value, which can be expressed 0/1, but analogue value. Analogue value is infinitely continuous. For example, there is 0.5 between 0 and 1, there is 0.25 between 0 and 0.5……. But if you want to handle those analogue values with computer, what do …

toggle_switch

How to deal with switch bounce

2016/10/04   -Beginner, Electric work

Today, I will deal with switch bounce. Then I will toggle the switch to control LED (OFF/ON). Now let’s start! Table of contents Switch bounce Bounce time Code Result Reference 1. Switch bounce Switch bounce is a phenomenon that occurs when you use a physical contact switch such as a tact switch. When you push a switch, you may think it gets immediately ON. However, that’s not correct in the micro-scale world. When a switch is toggled, metal contacts of a switch come together and close. During this time, metal contacts are bouncing and that causes noise. This noise is …

img_20161003_023407

Utilize an internal pull-down resister

In the previous post, I checked how a pull-down resister functioned. When it’s there the system worked as expected. However once it’s taken off, then LED became unstable. Actually, Raspberry Pi 3 contains an internal pull-down resister and you can enable it by coding. Today, I’m gonna show you how you can enable an internal resister and how it works. Don’t worry, it’s very simple 🙂

img_20160928_233036

Control LED by tact switch

In a previous post, how to blink LED with Raspberry Pi 3 was introduced (Blink LED on Raspberry Pi 3 ). In this work, I just got an “output” from Raspberry Pi. Today, I will send an “input” to Raspberry Pi by using a tact switch.By sending an input, you can get Raspberry Pi to send an output. With this work, you can turn on/off your LED with a tact switch. Table of contents Tact switch Hardware setup Code Result Reference What you need You may want a nipper to cut the legs of resister if they are long. Name Qty Resistor …