Go to advanced search

by nios2
Wed May 30, 2018 6:52 am
Forum: Beginners
Topic: Pi to open sliding gate
Replies: 3
Views: 371

Re: Pi to open sliding gate

As above and also I note that you do not have a common gnd between the pi and the relay board.
by nios2
Mon May 14, 2018 8:46 am
Forum: Python
Topic: Is it possible to use an interrupt to detect a key press
Replies: 15
Views: 1401

Re: Is it possible to use an interrupt to detect a key press

I think not. You need to call a function (like input()) to read the keyboard.
by nios2
Mon May 14, 2018 5:21 am
Forum: Python
Topic: controlling a garage door using voice
Replies: 3
Views: 685

Re: controlling a garage door using voice

Voice detection and analysis is very complex and might be best done using a dedicated module. I have used the following:-

https://www.mikroe.com/speakup-2-click

You train it to recognise your own voice (up to 100 commands) and to activate pins on detection (high, low, pwm etc).
by nios2
Mon May 14, 2018 5:13 am
Forum: Python
Topic: Multiple UART devices
Replies: 2
Views: 334

Re: Multiple UART devices

If you have a spare USB port you could use a low cost (Ebay) USB to UART converter to provide a second UART.
by nios2
Wed May 09, 2018 8:11 am
Forum: Beginners
Topic: Having a 2 pin toggle switch power LEDs when in 'on' position and play an mp3 file when in 'off' position
Replies: 1
Views: 201

Re: Having a 2 pin toggle switch power LEDs when in 'on' position and play an mp3 file when in 'off' position

You need an if statement in your loop to test your switch. If input = high do one job else do the other.
by nios2
Wed May 09, 2018 8:07 am
Forum: Beginners
Topic: gpio high for only some seconds
Replies: 7
Views: 702

Re: gpio high for only some seconds

Threading is worth considering, it is not as complex as many people assume. I found this template very useful.


viewtopic.php?f=32&t=212039&p=1312113#p1308084
by nios2
Mon May 07, 2018 6:35 am
Forum: Advanced users
Topic: Using R Pi 3B as WLAN module for laptop through crossover cable
Replies: 4
Views: 492

Re: Using R Pi 3B as WLAN module for laptop through crossover cable

Agree with Dougie,

I got a USB wifi module from Ebay for $2.
by nios2
Sun May 06, 2018 7:30 am
Forum: General discussion
Topic: SenseHat Magnetometer wrong, Compass is facing South and East only
Replies: 1
Views: 282

Re: SenseHat Magnetometer wrong, Compass is facing South and East only

To rule out a hardware issue I would test it in the sense HAT emulator within Raspbian (located behind the programs button).

I ran your program in the web based trinket sense HAT emulator and it works OK.
by nios2
Sun May 06, 2018 6:50 am
Forum: General discussion
Topic: Raspberry pi interfacing with ADS1100
Replies: 1
Views: 192

Re: Raspberry pi interfacing with ADS1100

By iterations do you mean sampling/conversion rate? If yes...looks like you need to read the data sheet section on the control register (addr 0x0c).

Pages 9/10 of datasheet http://www.ti.com/lit/ds/symlink/ads1100.pdf
by nios2
Sun May 06, 2018 6:27 am
Forum: General discussion
Topic: Haoshi H101 pH electrode
Replies: 1
Views: 420

Re: Haoshi H101 pH electrode

You will need some analogue gain/offset interfacing circuitry before the ADC. This might help:-

https://www.sparkyswidgets.com/portfoli ... interface/
by nios2
Sun May 06, 2018 6:18 am
Forum: General discussion
Topic: PIR Sensor
Replies: 5
Views: 470

Re: PIR Sensor

It does not help in that some sites show the pin view from the Dome (upper) surface and others from the component (lower) surface with the pins aligned to the left.
by nios2
Sun May 06, 2018 5:51 am
Forum: Python
Topic: How ist the best approach for task sharing in Py?
Replies: 10
Views: 607

Re: How ist the best approach for task sharing in Py?

Thanks hippy.

I used your template and got 3 threads running and communicating with each other via global variables.

Thread 1) Read sensors into variables
Thread 2) Check sensor values and send email
Thread 3) Run simple HTTP web server displaying

Made life very easy.
by nios2
Sun May 06, 2018 5:09 am
Forum: General discussion
Topic: AIRMAR D800 Distance sensor
Replies: 1
Views: 181

Re: AIRMAR D800 Distance sensor

This article describes how to do it with an Arduino (should be a reasonable starting point at least for the electrical interfacing). The sensor operates from the 12v electrical system on a boat. https://kingtidesailing.blogspot.co.uk/2015/09/how-to-connect-any-nmea-0183-device-to.html The NMEA proto...
by nios2
Sun May 06, 2018 4:28 am
Forum: Python
Topic: Shift register & 4x7 display Through Python3
Replies: 1
Views: 218

Re: Shift register & 4x7 display Through Python3

Your shift reg saves just a couple of pins. You could just drive the 7-segs directly from the GPIO given you have some spare.
by nios2
Sun May 06, 2018 3:57 am
Forum: Automation, sensing and robotics
Topic: GPIO control from a web page
Replies: 1
Views: 440

Re: GPIO control from a web page

I just hope that all the lazy students on here who copy your code and submit it as their own appreciate your effort.
by nios2
Sun May 06, 2018 3:45 am
Forum: Automation, sensing and robotics
Topic: Novice needs help with Relative Humidity Sensors
Replies: 7
Views: 834

Re: Novice needs help with Relative Humidity Sensors

Looks like your Qns 1 and 2 have been answered. To send to a website you need to setup your pi as a client and have it send a string of information that the server can interpret. I found this tutorial helpful (in python but the same can be found in C/C++) https://www.tutorialspoint.com/python3/pytho...
by nios2
Sun May 06, 2018 3:29 am
Forum: Automation, sensing and robotics
Topic: 433Mhz - RFSniffer Multiple devices problem
Replies: 2
Views: 507

Re: 433Mhz - RFSniffer Multiple devices problem

As per a previous reply, your radios are talking over each other when 2 or more sensors are activated. More expensive/sophisticated radios use CDMA ( collision detect, multiple access). They check if the channel is busy before sending and hold off for a short random time interval if the channel is b...
by nios2
Sun May 06, 2018 3:17 am
Forum: Automation, sensing and robotics
Topic: Simple communication between RPi and PLC
Replies: 4
Views: 1986

Re: Simple communication between RPi and PLC

1st step is to ensure that the voltage from the PLC to the Pi is within the GPIO range. What type of functionality is available on the S7 digital outputs? A crude method might be to use your GPIO in a primitive bit banging SPI (Serial Peripheral Interface) mode. Your PLC acts as the master by provid...
by nios2
Mon Apr 30, 2018 9:06 am
Forum: Beginners
Topic: Acclerometer, Processing and Python
Replies: 6
Views: 514

Re: Acclerometer, Processing and Python

There does not appear to be a question in your post.
by nios2
Sun Apr 29, 2018 4:52 am
Forum: Python
Topic: Voice Sensor detect wave file in python
Replies: 1
Views: 418

Re: Voice Sensor detect wave file in python

It would help if you could describe what the program is supposed to do and the exact nature of the problem.
by nios2
Mon Apr 23, 2018 10:22 am
Forum: General discussion
Topic: Industrial Reliability for 24/7 Use
Replies: 34
Views: 4175

Re: Industrial Reliability for 24/7 Use

Industrial quality solutions also extend into issues such as fail-safe and fault tolerant behaviour. If your program crashed for any reason could your plant be placed into an unsafe condition etc? I would also be concerned about the view of any insurance company that may become involved if something...
by nios2
Mon Apr 23, 2018 9:59 am
Forum: Automation, sensing and robotics
Topic: home videosurvillance system
Replies: 2
Views: 285

Re: home videosurvillance system

Could you wifi your IP cameras directly to your ISP router/modem and port forward each one (using its MAC address linked to a LAN number) with a unique port number then just access each one via your DNS but adding its port number? Your router bandwidth will only be used if it detects and incoming re...
by nios2
Mon Apr 23, 2018 9:36 am
Forum: Beginners
Topic: RaspBerry Pi as an RF repeater?
Replies: 5
Views: 499

Re: RaspBerry Pi as an RF repeater?

Zigbee (mesh radio) has the answer to this. More complex than the simple 433Mhz ASK type modules but reliable and conforming to a standard.
by nios2
Mon Apr 23, 2018 9:22 am
Forum: Beginners
Topic: GPIO's
Replies: 4
Views: 419

Re: GPIO's

In terms of switching speed I think that all of the GPIOs have around the same same response time. If you blinked an LED for 1-2 ms I doubt that the human eye would sense such a short duration. When you say that one end of the LED is open, do you mean floating. i.e. not connected to either high or l...
by nios2
Mon Apr 23, 2018 7:06 am
Forum: Advanced users
Topic: how to control gpio & relay in raspberry pi 3 using website
Replies: 6
Views: 1231

Re: how to control gpio & relay in raspberry pi 3 using website

I have done this myself but probably using the long way around approach but it was an interesting and satisfying learning experience. I used basic Python as much as possible to be able to understand what was going on. I was prepared to experiment to increase my understanding. I proceeded as follows:...

Go to advanced search