Go to advanced search

by scotty101
Tue May 14, 2013 10:19 pm
Forum: Other projects
Topic: Controlling pool equipment with smart phone
Replies: 25
Views: 14642

Re: Controlling pool equipment with smart phone

The relays will work fine at 110v 16A.
by scotty101
Tue May 14, 2013 8:21 pm
Forum: Python
Topic: GPS position fix LED ?
Replies: 4
Views: 1800

Re: GPS position fix LED ?

Learn to walk before you can run. Look for some python tutorials and learn how to code. You will find it much more rewarding, raspberry pi is about education.

The following line holds the key to your code
#Retrieve current position
gpspos = GPS.getActualPosition()
by scotty101
Mon May 13, 2013 9:46 pm
Forum: Gaming
Topic: Reading joysticks inputs
Replies: 5
Views: 23274

Re: Reading joysticks inputs

Pygame should allow you to access the joystick.

http://www.pygame.org/docs/ref/joystick.html
by scotty101
Mon May 13, 2013 9:44 pm
Forum: Python
Topic: Tkinter's main loop
Replies: 2
Views: 1905

Re: Tkinter's main loop

Tkinter has a method called after which you can use to schedule a function to run periodically.

Have a look on the following link
http://stackoverflow.com/questions/2400 ... in-tkinter
by scotty101
Mon May 13, 2013 9:41 pm
Forum: Python
Topic: GPS position fix LED ?
Replies: 4
Views: 1800

Re: GPS position fix LED ?

No, you aren't passing the gps_status function with any data.
by scotty101
Fri May 10, 2013 6:54 pm
Forum: Automation, sensing and robotics
Topic: Automated JSON keyword checker
Replies: 7
Views: 2308

Re: Automated JSON keyword checker

Just knocked up this example to compare the difference in temperature from an online weather feed. It stores the entire JSON feed to a file so that it can compare the data next time. import urllib import json previous_weather_file = "weather_log.txt" previous_weather = "" try: log = open(previous_we...
by scotty101
Fri May 10, 2013 6:10 pm
Forum: Automation, sensing and robotics
Topic: Automated JSON keyword checker
Replies: 7
Views: 2308

Re: Automated JSON keyword checker

Sure there is import json last_read = json.loads('{"t":2,"y":3}') current_read = json.loads('{"t":2,"y":3}') if current_read == last_read: print "Both are the same" else: print "Difference detected" Does that help? Or are you looking to compare a specific key in the JSON? EDIT: I just re-read your p...
by scotty101
Fri May 10, 2013 5:53 pm
Forum: Automation, sensing and robotics
Topic: Automated JSON keyword checker
Replies: 7
Views: 2308

Re: Automated JSON keyword checker

What's wrong with python's build it JSON encoder and decoder?

http://docs.python.org/2/library/json.html
by scotty101
Thu May 09, 2013 1:19 pm
Forum: Python
Topic: Problem with serial port
Replies: 11
Views: 12128

Re: Problem with serial port

Glad to be of service. I've used the Python Serial code a lot!
by scotty101
Thu May 09, 2013 8:12 am
Forum: Python
Topic: Problem with serial port
Replies: 11
Views: 12128

Re: Problem with serial port

Might be that there isn't any data in the buffer at that point in time. Try the following ser = serial.Serial('/dev/ttyUSB0', 9600) While 1: if (ser.inWaiting()>0): serdata = ser.readline() serdata = os.linesep.join([s for s in serdata.splitlines() if s]) It'll check to see if there is any data wait...
by scotty101
Thu May 09, 2013 8:02 am
Forum: Graphics, sound and multimedia
Topic: Custom dials/gauges
Replies: 4
Views: 2004

Re: Custom dials/gauges

Carby wrote:i take it there is a way for me to take a specific read out of the ecu and put it into the dial?
I haven't done it myself but there are plenty of projects online which do the same thing, if you do some reseach you will be able to find out how to do it.
by scotty101
Wed May 08, 2013 12:28 pm
Forum: Graphics, sound and multimedia
Topic: Custom dials/gauges
Replies: 4
Views: 2004

Re: Custom dials/gauges

You can buy OBD adaptors on Amazon or ebay for less that £20. Once of those will allow you to access data from the ECU either through bluetooth or serial.

As for custom dials, you could use PyGame to draw your own dials or many GUI toolkits like QT have a very good set of dials available already.
by scotty101
Wed May 08, 2013 12:22 pm
Forum: Python
Topic: serial.Serial command Syntax error
Replies: 3
Views: 723

Re: serial.Serial command Syntax error

The following works on my Pi.

Code: Select all

import serial
serialFromArduino = serial.Serial("/dev/ttyACM0",9600)

by scotty101
Wed May 08, 2013 11:30 am
Forum: General discussion
Topic: Adding a co-processor?
Replies: 9
Views: 7020

Re: Adding a co-processor?

You could interface the two processors together using SPI and perhaps use another few GPIO pins to signal interrupts.
by scotty101
Wed May 08, 2013 11:27 am
Forum: General discussion
Topic: Python Script to read one pin
Replies: 2
Views: 857

Re: Python Script to read one pin

Change your code to this import time import os import RPi.GPIO as GPIO import eeml GPIO.setmode(GPIO.BCM) DEBUG = 1 LOGGER = 1 GPIO.setup(0, GPIO.IN) input = GPIO.input(0) while True: input = GPIO.input(0) if DEBUG: if input: print('3.3') else: print('0') time.sleep(1)
by scotty101
Wed May 08, 2013 11:20 am
Forum: Other projects
Topic: 2 wire mic over GPIO
Replies: 1
Views: 7036

Re: 2 wire mic over GPIO

A microphone is an Analogue device. The GPIO pins on the RPi are Digital. You need a method of converting from Analog to Digital. An ADC performs this task. If you just want to have audio input from a microphone I would suggest a USB Sound Card or USB Microphone. Pick one from the verified periphera...
by scotty101
Tue May 07, 2013 2:50 pm
Forum: Troubleshooting
Topic: Desperate help needed for my PI
Replies: 1
Views: 427

Re: Desperate help needed for my PI

What do you actually need help with?

Are you trying to figure out how to get the task bar back?
by scotty101
Tue May 07, 2013 1:16 pm
Forum: Other projects
Topic: Controlling pool equipment with smart phone
Replies: 25
Views: 14642

Re: Controlling pool equipment with smart phone

Sounds like you've figured it all out. Only thing you might want to consider is the range of Wi-Fi, you may not get a reliable connection over 100m. Of course with anything that is driving mains voltage, ensure that you keep all conductors well covered and protected from water and fingers. There are...
by scotty101
Tue May 07, 2013 12:20 pm
Forum: Other projects
Topic: Raspberry Pi Touch Screen Overlay
Replies: 3
Views: 3669

Re: Raspberry Pi Touch Screen Overlay

I think you'd be better off using something like the Arduino Leonardo for this. It has built in ADCs for reading the input from the touchscreen and can emulate a usb device like a keyboard or mouse and theoretically a touch screen device too. I doubt that its going to be possible for you to create t...
by scotty101
Sat May 04, 2013 4:10 pm
Forum: Staffroom, classroom and projects
Topic: Mathematical Model for Raspberry Pi
Replies: 3
Views: 2364

Re: Mathematical Model for Raspberry Pi

What kind of industrial controller are you making?

The model should probably based on the control theory used to create the controller.

i.e. Is it a closed loop feedback system? PID? Fuzzy Logic? Neural Network?
by scotty101
Sat May 04, 2013 12:46 pm
Forum: General discussion
Topic: GUI Programming for Raspbian
Replies: 6
Views: 29664

Re: GUI Programming for Raspbian

I have mainly used Tkinter in Python for creating GUIs.

I've found it a great place to start and simple to get going with. There are also lots of example on the internet and Effbot Tkinterbook is a great resource for figuring things out.
by scotty101
Thu May 02, 2013 8:01 pm
Forum: Staffroom, classroom and projects
Topic: GPIO: Pull down or pull up?
Replies: 4
Views: 15811

Re: GPIO: Pull down or pull up?

Makes little difference which you use... I'd suggest pull up.
by scotty101
Thu May 02, 2013 3:25 pm
Forum: General discussion
Topic: How to make a captive portal
Replies: 2
Views: 905

Re: How to make a captive portal

If you are using apache as the webserver then you could use Apache User Authentication to prompt the user for a password.

http://www.apacheweek.com/features/userauth
by scotty101
Thu May 02, 2013 3:18 pm
Forum: Python
Topic: Digital Photo Frame - USB
Replies: 1
Views: 906

Re: Digital Photo Frame - USB

Can the photo frame be mounted as a USB drive?

If so, it might be as simple as copying the image to that location.

Go to advanced search