Go to advanced search

by scotty101
Fri Oct 19, 2018 8:28 am
Forum: Advanced users
Topic: connect an 5V sensor in microusb port instead of gpio pins?
Replies: 1
Views: 48

Re: connect an 5V sensor in microusb port instead of gpio pins?

No. The sensor is not a USB device and the USB ports cannot act like GPIO pins. If you are dead set on connecting it to the USB port, you'll need a separate device to convert the signal from the sensor to something that the USB ports can understand. You could do this with a small Arduino clone or a ...
by scotty101
Thu Oct 18, 2018 4:03 pm
Forum: Assistive technology and accessibility
Topic: Communication device -- Help with touch sensor mpr121 Please!
Replies: 3
Views: 71

Re: Communication device -- Help with touch sensor mpr121 Please!

I've spent many hours trying different things... Trouble is, I'm a complete novice to writing code, I will keep looking at examples and trying to modify/merge things together to get something close. Thanks for sharing the info! Once you have something close, share it and the error messages that you...
by scotty101
Thu Oct 18, 2018 4:01 pm
Forum: Python
Topic: SEND DATA TO A SERVER AND POST IN DATABASE
Replies: 1
Views: 17

Re: SEND DATA TO A SERVER AND POST IN DATABASE

When you write code you have to consider what can go wrong. In this case you are sending data to via TCP to a server that isn't listening yet. You have to "catch" this error and do something. Usual schemes might be to re-try every few seconds until the message goes through and perhaps have a maximum...
by scotty101
Thu Oct 18, 2018 2:51 pm
Forum: Advanced users
Topic: Near Space Experiment using a Raspberry Pi 3
Replies: 2
Views: 77

Re: Near Space Experiment using a Raspberry Pi 3

Perhaps you can share your script(s) so that someone can help you join the two together.

Remember to use [code][/code] tags when you post your code.
by scotty101
Thu Oct 18, 2018 1:33 pm
Forum: Other projects
Topic: RF Transmitter
Replies: 2
Views: 110

Re: RF Transmitter

What range to you want the signal to cover?

There are various "add-ons" for the Pi to send RF signals. Some that operate in the 433MHz band for example
You may also want to investigation "LoRa" which is a RF protocol that works over relatively long range.
by scotty101
Thu Oct 18, 2018 1:30 pm
Forum: Assistive technology and accessibility
Topic: Communication device -- Help with touch sensor mpr121 Please!
Replies: 3
Views: 71

Re: Communication device -- Help with touch sensor mpr121 Please!

Have you read the Adafruit tutorial for the touch sensor https://learn.adafruit.com/mpr121-capacitive-touch-sensor-on-raspberry-pi-and-beaglebone-black/usage There is a section of code roughly half way down that page that give an example of how to read from the different buttons. I'd create a functi...
by scotty101
Thu Oct 18, 2018 10:06 am
Forum: Beginners
Topic: How to make a non-blocking delay on Tkinter?
Replies: 8
Views: 150

Re: How to make a non-blocking delay on Tkinter?

How have you confirmed that it doesn't get called? Try putting a print("Thread Running") at the start of the function. Also, you are aware that the function will only run once right? If you want it to keep running in the background, the thread should contain a while loop and potentially a time.sleep...
by scotty101
Thu Oct 18, 2018 10:03 am
Forum: Troubleshooting
Topic: RPI camera don't work with zBar
Replies: 3
Views: 98

Re: RPI camera don't work

Does this old topic help?
viewtopic.php?t=68247
or this one
viewtopic.php?t=204954
by scotty101
Wed Oct 17, 2018 12:39 pm
Forum: Beginners
Topic: How to make a non-blocking delay on Tkinter?
Replies: 8
Views: 150

Re: How to make a non-blocking delay on Tkinter?

I'd consider putting your GPIO button read calls in a separate function to the one that updates the display. Display function is called every "centi-second" but the GPIO function is called less frequently to debounce the button. The two communicate though a variable which is used to start/stop the t...
by scotty101
Wed Oct 17, 2018 12:19 pm
Forum: Beginners
Topic: How to make a non-blocking delay on Tkinter?
Replies: 8
Views: 150

Re: How to make a non-blocking delay on Tkinter?

Two methods. 1. Split up your code in to smaller functions which are called with the .after method. I'd use a function which acts as a state machine, it remembers what state it was in last time, performs the next action, sets which state it should move in to next and calls the .after method with an ...
by scotty101
Wed Oct 17, 2018 9:56 am
Forum: Python
Topic: Driving multiple stepper motors with Python
Replies: 12
Views: 290

Re: Driving multiple stepper motors with Python

What was wrong with the class method I share with you a while back? I appreciate what you've done to split the code across two modules but that isn't an effective way of doing this and serves no useful purpose. You have essentially the same code in two places rather than a common function that takes...
by scotty101
Wed Oct 17, 2018 9:10 am
Forum: General discussion
Topic: 8 channel CCTV with Pi 3 B
Replies: 8
Views: 190

Re: 8 channel CCTV with Pi 3 B

What type of cameras do you have? I suspect for 8 cameras, this would only be possible if they were network connected cameras (WiFi, ethernet).
I doubt the Pi could cope with reading the video signal from 8 USB or composite output cameras (requiring a USB device)
by scotty101
Wed Oct 17, 2018 8:58 am
Forum: Python
Topic: Variable passed to class
Replies: 9
Views: 207

Re: Variable passed to class

I'm not sure what you are trying to do so perhaps you can explain it again. Here is an example of a python class (and simple usage) that may help you figure out what you want to do or the correct syntax. class MyClass: def __init__(self, param1, param2, param3): self.param1 = param1 self.param2 = pa...
by scotty101
Wed Oct 17, 2018 8:52 am
Forum: Python
Topic: Driving multiple stepper motors with Python
Replies: 12
Views: 290

Re: Driving multiple stepper motors with Python

Can you share your entire code file? Odds are that you've got your GPIO pin mapping incorrect.
by scotty101
Wed Oct 17, 2018 8:46 am
Forum: Beginners
Topic: RTC module of raspberry pi 3
Replies: 1
Views: 58

Re: RTC module of raspberry pi 3

The raspberry pi does not have a Real Time Clock. You need to add an external one.

The time kept by the Pi is managed in software only.
by scotty101
Tue Oct 16, 2018 8:55 am
Forum: Beginners
Topic: Pi ZeroW room thermometer [solved]
Replies: 17
Views: 499

Re: Pi ZeroW room thermometer

https://www.tutorialspoint.com/python3/number_round.htm Rounding function "Humidity =" + round(humidity,1) + "%" You could do that. Or you could format the string to only show 1 decimal place for which there are more pythonic methods. Likewise their are better ways of formatting strings rather than...
by scotty101
Tue Oct 16, 2018 8:45 am
Forum: Python
Topic: what does b'0' mean?how to convert it to "0"???
Replies: 2
Views: 120

Re: what does b'0' mean?how to convert it to "0"???

b'1' or b'0' is something of class bytes which means that is is a container holding one or more bytes of data. This differs from a string like '1' or '0' because there are many ways of decoding bytes in to a string (ASCII, utf-8, etc ) In order to convert it to a string you need to decode it. byteDa...
by scotty101
Mon Oct 15, 2018 2:10 pm
Forum: General discussion
Topic: How to read vibrate sensor data using wiringPI
Replies: 4
Views: 104

Re: How to read vibrate sensor data using wiringPI

Neither of those sensor are ideal for working with the Raspberry Pi as they are 5v devices. The Pi's GPIO pins cannot accept higher voltages than 3.3v. With both of these devices you are also likely to require an Analogue to Digital Converter as they have analogue outputs. The MCP3008 seems to be th...
by scotty101
Mon Oct 15, 2018 1:33 pm
Forum: Automation, sensing and robotics
Topic: Overall equipment efficiency monitoring
Replies: 5
Views: 622

Re: Overall equipment efficiency monitoring

Hi Sir. Im new to rasp pi and im planning on working on a project about production monitoring. Can I ask yout help regarding this matter. It would be great. Thanks In order to get help, you need to ask clear and concise questions. Production Monitoring is too broad a topic to ask for help on. Every...
by scotty101
Mon Oct 15, 2018 1:27 pm
Forum: Beginners
Topic: Binding Escape key in Tkinter GUI.
Replies: 5
Views: 130

Re: Binding Escape key in Tkinter GUI.

Have you tried clicking on the window that appears to ensure that it has "focus"?

You could try the following line of code to force focus before the mainloop line

Code: Select all

root.focus_set()
by scotty101
Mon Oct 15, 2018 1:25 pm
Forum: General discussion
Topic: How to read vibrate sensor data using wiringPI
Replies: 4
Views: 104

Re: How to read vibrate sensor data using wiringPI

Can you provide more specific information (e.g. links/product names) about the sensors you are using? Searching for the names you've provided doesn't give a single conclusive result.
by scotty101
Mon Oct 15, 2018 10:39 am
Forum: Beginners
Topic: Pi ZeroW room thermometer [solved]
Replies: 17
Views: 499

Re: Pi ZeroW room thermometer

In your code you have an infinite loop "while True", This will keep running until you stop your code. The two lines of code that actually display the image on the screen aren't in this loop so they never get executed and nothing is ever displayed on the screen. Try changing your code the following (...
by scotty101
Mon Oct 15, 2018 8:51 am
Forum: Beginners
Topic: Binding Escape key in Tkinter GUI.
Replies: 5
Views: 130

Re: Binding Escape key in Tkinter GUI.

Your code raised the following error for me Exception in Tkinter callback Traceback (most recent call last): File "C:\....\lib\tkinter\__init__.py", line 1702, in __call__ return self.func(*args) TypeError: exit() takes 0 positional arguments but 1 was given If you bind an event, it will pass event ...
by scotty101
Mon Oct 15, 2018 8:47 am
Forum: Beginners
Topic: The Pi and its GPIO Pins
Replies: 8
Views: 301

Re: The Pi and its GPIO Pins

I'm trying to build and code my own home monitoring system, Digital IO sensors (door etc) Temperature, humidity, a few things like that, possibly some sort of power monitoring, I was just curious to know if it was possible to have more than the standard 40 pins for the sake of making things a littl...
by scotty101
Fri Oct 12, 2018 8:29 am
Forum: Beginners
Topic: The Pi and its GPIO Pins
Replies: 8
Views: 301

Re: The Pi and its GPIO Pins

LTolledo wrote:
Thu Oct 11, 2018 9:25 pm
Maybe this (or similar to this) is what you have in mind....
I don't think that is what the OP wants. That just clones the GPIO pins. OP mentioned specifically that he wanted more GPIO pins not copies of the existing pins.

Go to advanced search