Comments (2)
Hi,
Yes, you are right. Adding a 0.1uF capacitance can really make the circuit more robust.
However, the circuit and code has no problem here, and after our tests, even the captureTime is set to 10 seconds, the project still work properly (set captureTime = 10000).
Because releasing the button also requires debouncing. You need waits the same amount of time(captureTime) from releasing to pressing again.
The code running result prompts whether the key is pressed or released, and only when released state is prompted, the key can be pressed again.
In addition, you can try shorting R2, and the test results will be better.
R2 is used to avoid that GPIO output too large current and the IO port is burned when the button is pressed. In this circuit, GPIO18 is input mode, so there is no need for using R2.
Thank you.
from freenove_ultimate_starter_kit_for_raspberry_pi.
I think you are right. I was actually aware that LOW -> HIGH transition is also debounced, and I have to wait until it comes back to HIGH before pressing the button again. But I forgot to mention about the elephant in the room - I am not running the power source from 9v battery, but from AC/DC wall adaptor, which outputs 9v. I guess it's much noisier than the battery and that makes the critical difference.
So, it looks like I solved the issue that I've created for myself :) Thank you for your prompt follow up and clear explanations! I am closing this issue as it's not a real problem with the circuit.
from freenove_ultimate_starter_kit_for_raspberry_pi.
Related Issues (20)
- MPU6050 displaying errors on both codes
- Softlight.py : error file not found line 13 HOT 1
- led is on when executing on python HOT 2
- Unfinished cleanup in chapter 8 python script? HOT 1
- C code, Project 20.1 I2C LCD1602, time is displayed incorrectly
- Ultrasonic circuit overvolts GPIO HOT 3
- Instructions for installing Python Libs. HOT 1
- Issue with command line HOT 2
- The amazon store title said there were 434 pages of detailed instructions, is this the correct one? HOT 2
- Chapter 23 Infrared sensor should be connected to 5V and not 3.3V HOT 1
- temputure controlled led HOT 2
- ColorfulLED.py HOT 1
- I2CLCD turn backlight off HOT 2
- Java code for the starter kit ? HOT 5
- Combining Project 13.1 and 20.1 to have the motor speed displayed on I2C LCD
- [Solution] sudo: make: command not found HOT 2
- no username HOT 3
- 'MbedI2C' does not name a type HOT 2
- Incorrect import in 3.1.1 HOT 1
- WiringPI outdated/no longer supported HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from freenove_ultimate_starter_kit_for_raspberry_pi.