Go to advanced search

by karl101
Sat Apr 29, 2017 12:49 pm
Forum: Raspbian
Topic: Bluetooth not starting on boot?
Replies: 0
Views: 797

Bluetooth not starting on boot?

Hello I have compiled and installed the latest version of bluez (v5.44) from source code with this configuration: ./configure --enable-experimental --enable-library and can't get the service to start on boot. I try to enable it with: $ sudo systemctl enable bluetooth Created symlink from /etc/system...
by karl101
Wed Sep 14, 2016 7:19 pm
Forum: Python
Topic: Sun up in the sky?
Replies: 11
Views: 2509

Re: Sun up in the sky?

Hello some code I've written, based around that provided by tom.slick (thanks tom!), but using pyephem. Its written for python3 As in tom's code it works out the altitude at a given location and time, and matches the altitude to subsequent days to give a time when the sun is going to be in the same ...
by karl101
Mon Sep 12, 2016 11:25 am
Forum: Python
Topic: Sun up in the sky?
Replies: 11
Views: 2509

Re: Sun up in the sky?

Burngate wrote: Yes - Analemma
https://en.wikipedia.org/wiki/Analemma
Excellent, thank you. Turns out it doesn't really help with my quest, but its good to know.

Karl.
by karl101
Mon Sep 12, 2016 9:00 am
Forum: Python
Topic: Sun up in the sky?
Replies: 11
Views: 2509

Re: Sun up in the sky?

I don't want to photograph the sun, I want to photo the trees doing the traditional autumn thing, going brown and dropping leaves eventually making a timelapse video. The best time at this time of year would be around 3pm, with the sun in the West, with the sun full on the trees but out of the camer...
by karl101
Mon Sep 12, 2016 7:44 am
Forum: Python
Topic: Sun up in the sky?
Replies: 11
Views: 2509

Sun up in the sky?

Hello A question for astronomy types, you know how during the year the sun moves across the sky, appearing earlier in the day and further to the east in the summer than it does during the winter. does this have a name? What I want to do is write a python script to have the Pi take a photo with a web...
by karl101
Sat Aug 16, 2014 12:05 pm
Forum: Raspbian
Topic: stuck on iptables
Replies: 6
Views: 1987

Re: stuck on iptables

Hello

Thanks everyone for the replies, very helpful. I now have it working, I had set the static IP address on eth0 to 192.168.2.10 but the gateway in the dhcp configuration to 192.168.2.1. Setting the static IP to 192.168.2.1 fixed this.

Thanks again
Karl.
by karl101
Fri Aug 15, 2014 5:09 pm
Forum: Raspbian
Topic: stuck on iptables
Replies: 6
Views: 1987

stuck on iptables

Hello, This is the setup: a couple of computers connected by wired internet through a switch to a Pi on eth0 and a 4G USB mobile broadband dongle connected as usb0. The dongle works and I can connect out to the internet from the Pi. The dongle is a ZTE MF823 and acts as an Ethernet port rather than ...
by karl101
Sun Sep 01, 2013 9:45 am
Forum: Python
Topic: mysql and var
Replies: 2
Views: 619

Re: mysql and var

assuming you have created your cursor with something like:

Code: Select all

cursor = myDB.cursor(cursorclass=MySQLdb.cursors.DictCursor)
and your twitter table has an 'id' column? then try this:

Code: Select all

sql = "UPDATE `texts`  SET `messagesent` = 1 WHERE id = %s"
cursor.execute   (sql,(row['id']))
Karl.
by karl101
Sun Nov 04, 2012 7:24 pm
Forum: HATs and other add-ons
Topic: Cant build Gertboard.
Replies: 11
Views: 3640

Re: Cant build Gertboard.

I built my Gertboard yesterday. It was the first time I'd soldered SMD's, it wasn't as difficult as I thought it would be, following Gert's advice from the videos. Using the Gerboard as a feeble excuse to buy new things. I bought a soldering iron station that controls the temperature and has a fine ...
by karl101
Sun Nov 04, 2012 4:32 pm
Forum: HATs and other add-ons
Topic: Getting my Gertboard working... Help!
Replies: 9
Views: 2260

Re: Getting my Gertboard working... Help!

Hello No its not the software the program works, I've wired and set the jumpers for the LED test. The LED's still go on and off if I wave my hand around the board, its like a rubbish magic trick. I have used all the wires that come with the kit which is enough for all but the last three connections....
by karl101
Sun Nov 04, 2012 1:26 pm
Forum: HATs and other add-ons
Topic: Getting my Gertboard working... Help!
Replies: 9
Views: 2260

Re: Getting my Gertboard working... Help!

thanks, but mines an rev1 board.

What about the glowing LED's when my hand is near?

Karl.
by karl101
Sun Nov 04, 2012 11:45 am
Forum: HATs and other add-ons
Topic: Getting my Gertboard working... Help!
Replies: 9
Views: 2260

Re: Getting my Gertboard working... Help!

The second paragraph should read: Yet with the board setup for the LED test as in the user manual cannot get it to work properly using the test leds-rp.py from here: http://raspi.tv/tag/gertboard-software . The LED D5 illuminates half-heartedly or not at all when the program is run, it is connected ...
by karl101
Sun Nov 04, 2012 11:10 am
Forum: HATs and other add-ons
Topic: Getting my Gertboard working... Help!
Replies: 9
Views: 2260

Getting my Gertboard working... Help!

Hello, I've built my Gertboard. Checked it over three times, all the surface mount components are cleanly mounted, checking for shorts finds nothing, the resistor packs are all mounted so the dot on the pack matches the marking on the board, the IC's are in their proper places, and the right way rou...
by karl101
Sun Oct 21, 2012 9:34 am
Forum: Advanced users
Topic: setting udev rules for the GPIO?
Replies: 10
Views: 26708

Re: setting udev rules for the GPIO?

Hello Dave, Yes that works, I can see the ownership change in the /sys/devices/virtual/gpio directory. This is very useful. However, as the man says here: http://www.raspberrypi.org/phpBB3/viewtopic.php?f=50&t=8071&start=425 "the goalposts have moved!". The quest is to get the python RPi.GPIO module...
by karl101
Sun Sep 30, 2012 8:50 pm
Forum: Python
Topic: RPi.GPIO not working with curses?
Replies: 5
Views: 2341

Re: RPi.GPIO not working with curses?

is the first one still running when you test the curses one? also, set the pin reference mode first. Later versions won't even run without it: [email protected] ~/dev/curses $ sudo python cursestest.py Traceback (most recent call last): File "cursestest.py", line 6, in <module> GPIO.setup(11, GPIO.IN) RPi.GP...
by karl101
Sun Sep 30, 2012 7:50 pm
Forum: Python
Topic: RPi.GPIO not working with curses?
Replies: 5
Views: 2341

Re: RPi.GPIO not working with curses?

Are you sure what is being referred to as pin 11 is the same in both examples. It could be that one uses physical pin numbers and the other uses GPIO numbers. Physical pin 11 has on it GPIO 17 Where as:- GPIO 11 is on physical pin 23 No, the hardware is working, and it's connected to the correct GP...
by karl101
Sun Sep 30, 2012 5:22 pm
Forum: Python
Topic: RPi.GPIO not working with curses?
Replies: 5
Views: 2341

RPi.GPIO not working with curses?

Hello, I'm trying to write a python program that responds to a switch attached to GPIO pin 11, using the push button circuit from Mag Pi issue 2 http://www.themagpi.com/. Using the code in the magazine the button pressing works as expected, however when I try to do the same using python curses, noth...
by karl101
Sun Sep 23, 2012 9:00 am
Forum: Raspbian
Topic: problem recording from USB microphone
Replies: 10
Views: 14974

problem recording from USB microphone

Hello, I have bought this cheap USB sound card http://www.play.com/PC/PCs/4-/33367926/Portable-USB-2-0-3D-Virtual-5-1Channel-Pc-Sound-Card/Product.html to give my Pi a microphone input, it appears as expected in the list of USB devices: $ lsusb Bus 001 Device 028: ID 0d8c:000e C-Media Electronics, I...
by karl101
Sun Sep 09, 2012 2:01 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Connecting a 5V relay board
Replies: 20
Views: 14655

Re: Connecting a 5V relay board

On my Pi Raspberry project I used an opto-isolator between the GPIO and the relays to control a motor.

Image

More info on The Pi Raspberry http://www.g7smy.co.uk/?p=81

Karl
by karl101
Sun Aug 19, 2012 8:21 pm
Forum: Other projects
Topic: how good is the magpi
Replies: 26
Views: 7593

Re: how good is the magpi

I like it and read every issue. For me the listings are very nostalgic, from when I typed in all those game listings into my Sinclair Spectrum back in the day. The hardware GPIO circuits are very useful and to see that name Tandy takes me back to the 80's too when they had shops in the UK, although ...
by karl101
Sun Aug 12, 2012 7:43 pm
Forum: Python
Topic: Variable problems...
Replies: 16
Views: 2573

Re: Variable problems...

Also, more loops if digiplus == 2 gpio.output(17, True), gpio.output(9, True), gpio.output(21, False), gpio.output(22, False), gpio.output(10, False), gpio.output(7, False), gpio.output(11, False) use dictionary's and lists dig = int(raw_input('First single digit number: ')) digi = {} digi[1] = {21:...
by karl101
Sun Aug 12, 2012 7:26 pm
Forum: Python
Topic: Variable problems...
Replies: 16
Views: 2573

Re: Variable problems...

@karl101: I would argue the opposite — there is one parenthesis too much. Or in your correction a pair that is not necessary at all. eh? three opening brackets require three closing brackets. But yes, the bracket on the int is surplus. number = int(raw_input('Second single digit number to add to fi...
by karl101
Sun Aug 12, 2012 7:22 pm
Forum: Python
Topic: Variable problems...
Replies: 16
Views: 2573

Re: Variable problems...

Also, look into the world of loops, eg: gpio.setmode(gpio.BCM) gpio.setup(17, gpio.OUT) gpio.setmode(gpio.BCM) gpio.setup(21, gpio.OUT) gpio.setmode(gpio.BCM) gpio.setup(22, gpio.OUT) gpio.setmode(gpio.BCM) gpio.setup(10, gpio.OUT) gpio.setmode(gpio.BCM) gpio.setup(9, gpio.OUT) gpio.setmode(gpio.BCM...
by karl101
Sun Aug 12, 2012 7:17 pm
Forum: Python
Topic: Variable problems...
Replies: 16
Views: 2573

Re: Variable problems...

you are short in the bracket dept.

Code: Select all

number = (int(raw_input('Second single digit number to add to first digit:\n ')))
Karl
by karl101
Thu Aug 09, 2012 8:32 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: LEGO motor controller?
Replies: 14
Views: 6163

Re: LEGO motor controller?

In case you were wondering why I was building this....

Image

http://www.raspberrypi.org/phpBB3/viewt ... 37&t=14138

Karl.

Go to advanced search