Go to advanced search

by snowbord
Tue Apr 30, 2019 9:38 pm
Forum: Advanced users
Topic: HELP with relay and "spikes"
Replies: 15
Views: 3393

Re: HELP with relay and "spikes"

Just a heads up that a 10uF cap across the COM / NO terminals of the relay board fixed this otherwise epic problem for me. 100nF didn't, 2x100nF didn't, neither did 1uF. I too am using a 12V (2A) solenoid.
by snowbord
Sat Apr 27, 2019 1:36 pm
Forum: Python
Topic: Tornado coroutine combined with GPIO callback
Replies: 3
Views: 468

Re: Tornado coroutine combined with GPIO callback

OK I seem to be having some success. When you want to call the async function, e.g. which contains the sio.emit() call, use this:

loop.add_callback(asyncFunction, params)
from what I understand, this equates to await when called from a sync portion of code.
by snowbord
Sat Apr 27, 2019 12:47 pm
Forum: Python
Topic: Tornado coroutine combined with GPIO callback
Replies: 3
Views: 468

Re: Tornado coroutine combined with GPIO callback

Similar issues here: https://github.com/miguelgrinberg/Flask-SocketIO/issues/409 Notice the statement: "How does this work exactly? The most used pattern is to run a blocking function that reads the GPIO state in another thread and invokes the callback when appropriate. That would not work with geve...
by snowbord
Fri Apr 26, 2019 8:41 pm
Forum: Python
Topic: Tornado coroutine combined with GPIO callback
Replies: 3
Views: 468

Re: Tornado coroutine combined with GPIO callback

I'm in the same boat. Have you found a solution? ::Edit:: maybe the async version of the pigpio library will help? https://beenje.github.io/blog/posts/experimenting-with-asyncio-on-a-raspberry-pi/ demo code: https://github.com/PierreRust/apigpio/blob/master/samples/gpio_notification.py Finally, I am...
by snowbord
Tue Apr 16, 2019 9:45 pm
Forum: Advanced users
Topic: MCP230xx library for RPi: "Old" Adafruit vs CircuitPython
Replies: 2
Views: 369

Re: MCP230xx library for RPi: "Old" Adafruit vs CircuitPython

I wanted to chime in that I am too am exploring ways of driving the MCP230xx. How are the old Adafruit libraries holding up for you? Do they do interrupts? I noticed that this library, part of CircuitPython seems to tidy up I2C communication nicely, which the stock SMBus library has some issues with...
by snowbord
Fri Mar 22, 2019 5:10 pm
Forum: Automation, sensing and robotics
Topic: switching wall light on/off causes GPIO interrupt
Replies: 11
Views: 2742

Re: switching wall light on/off causes GPIO interrupt

A schmitt trigger won't help if it has cmos (sensitive) inputs, a 100nF capacitor on the input to GND + an 1K series input resistor might, but if the disturbance enters through the PSU, then this wont help either, and you must block the electromagnetic pulse at the power input! I have created a suc...
by snowbord
Fri Mar 22, 2019 12:13 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: How to wire a Raspberry Pi to a Sainsmart 5v Relay Board
Replies: 83
Views: 235958

Re: How to wire a Raspberry Pi to a Sainsmart 5v Relay Board

Wow thanks for the quick response and for clarifying! Another observation and please do correct me if I am wrong - this circuit seems a perfect match to drive a LED, especially one with a built-in resistor, for example those 'ring LED' push buttons: https://www.adafruit.com/product/481 The only chan...
by snowbord
Fri Mar 22, 2019 11:56 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: How to wire a Raspberry Pi to a Sainsmart 5v Relay Board
Replies: 83
Views: 235958

Re: How to wire a Raspberry Pi to a Sainsmart 5v Relay Board

Great post. I am going to be implementing this. One observation and more of a question really... we know that lines that are not pulled up/down can be susceptible to EMI. The 'From GPIO pin' has been pulled down, which is great, but what about the line to the Relay board? As the relay triggers when ...
by snowbord
Thu Mar 21, 2019 2:35 pm
Forum: Beginners
Topic: Illuminated push button
Replies: 43
Views: 3440

Re: Illuminated push button

I'm following this thread with interest, as I have a similar conundrum. I however have taken a liking to these switches: https://www.aliexpress.com/item/16mm-Metal-brass-Push-Button-Switch-flat-round-illumination-ring-Latching-1NO-1NC-Car-press-button/32676526568.html Now it gets interesting, as we ...
by snowbord
Wed Mar 20, 2019 12:45 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Does i2c need pullups (resistors, not diapers!)
Replies: 25
Views: 11454

Re: Does i2c need pullups (resistors, not diapers!)

While you don't necessarily need 10k pullups, if you expect to have cable length of any distance, each chip should have it's own pullups. Want to have 10 ft or more of cable? Use CAT6 network cable and assign the signals as follows: I have driven the I2C bus to I2C Plus speeds without issue provide...
by snowbord
Sun Feb 17, 2019 12:00 am
Forum: Automation, sensing and robotics
Topic: Multiple switch debouncing
Replies: 5
Views: 4860

Re: Multiple switch debouncing

Did you finish the project? I am looking to do exactly the same - many 5V x8 Sainsmart type relays, together with switch inputs on Schmitt Triggers.
by snowbord
Thu Dec 20, 2018 8:05 pm
Forum: HATs and other add-ons
Topic: Waveshare 10 inch display touch driver
Replies: 4
Views: 3180

Re: Waveshare 10 inch display touch driver

With a lot of difficulty I managed to track some of these down on Aliexpress. The price seems good for what it is. How difficult are they to get running with the Pi and how have they fared over the years? I will need to be purchasing half a dozen and if they work OK, they seem like a good choice. He...

Go to advanced search