Go to advanced search

by Johnny5C
Tue Apr 21, 2015 9:47 pm
Forum: Astro Pi
Topic: Example Astro Pi code
Replies: 13
Views: 4242

Example Astro Pi code

Here is some example code you can run on an Astro Pi. It will scroll temperature, humidity and pressure on the LED matrix. It's a good way to test your sensors. There are some parts that can be tweaked easily to see the changes, like scroll_speed and text_colour. I'm not an expert, so there might be...
by Johnny5C
Tue Mar 31, 2015 5:29 pm
Forum: Python
Topic: PYTHON Loop for servo control?
Replies: 12
Views: 2888

Re: PYTHON Loop for servo control?

Jimmy, put the colon in and it works like a charm.

Thank you so much. That is superb.

Cheers
by Johnny5C
Tue Mar 31, 2015 5:12 pm
Forum: Python
Topic: PYTHON Loop for servo control?
Replies: 12
Views: 2888

Re: PYTHON Loop for servo control?

Jimmy, the asterisks I have added to show where the syntax error points to. They are not in the code. I tried without the comments and its the same.

Roger, where should I put colon?

Cheers for the quick responses!

John
by Johnny5C
Tue Mar 31, 2015 4:23 pm
Forum: Python
Topic: PYTHON Loop for servo control?
Replies: 12
Views: 2888

Re: PYTHON Loop for servo control?

Jimmy, thanks for posting the code. I now understand the range function, but, with the code: from Adafruit_PWM_Servo_Driver import PWM import time pwm = PWM(0x40) pwm.setPWMFreq(50) print'Spot Turn' pwm.setPWM(0, 0, 330) for servoPos in range(330, 520, 10) # Start at 330, finish at 520, increment by...
by Johnny5C
Fri Mar 27, 2015 7:06 pm
Forum: Python
Topic: PYTHON Loop for servo control?
Replies: 12
Views: 2888

Re: PYTHON Loop for servo control?

Thanks people, particularly JimmyN. I will try that code shortly.

Must put some time aside to get my head properly into Python!
by Johnny5C
Fri Mar 27, 2015 12:44 pm
Forum: Python
Topic: PYTHON Loop for servo control?
Replies: 12
Views: 2888

Re: PYTHON Loop for servo control?

Thanks Joan. That is a good link. I really would like to completely learn Python from scratch, but in this case, can I get a little support about my particular problem? As I said, I’m a hardware guy, but I always use the help gratefully received from these forums as a springboard for my own developm...
by Johnny5C
Fri Mar 27, 2015 11:53 am
Forum: Python
Topic: PYTHON Loop for servo control?
Replies: 12
Views: 2888

PYTHON Loop for servo control?

I have an adafriut servo breakout board connected to my B+ Pi, running over i2c, with their PWM library. It’s working well, with the code below pointing my servo to a position that corresponds to a pulse width of 330, wait for 2 seconds and then move to the 520 position. from Adafruit_PWM_Servo_Driv...
by Johnny5C
Thu Mar 26, 2015 4:12 pm
Forum: Automation, sensing and robotics
Topic: 16 Channel 12 Bit PWM/Servo Driver - I2C Interface
Replies: 8
Views: 12675

Re: 16 Channel 12 Bit PWM/Servo Driver - I2C Interface

So i am able to control a servo to a particulart position with the following: pwm.setPWM(0, 0, puWidth) How do I drive a servo to a position more slowly? Say, for instance, my servo centre position is puWidth 330, how can i move to puWidth 520 in gradual steps, not in one shot? Is there a loop i can...
by Johnny5C
Tue Mar 17, 2015 7:02 pm
Forum: HATs and other add-ons
Topic: GPIO pins and Adafruit Servo Controller
Replies: 6
Views: 1910

Re: GPIO pins and Adafruit Servo Controller

tvoverbeek wrote:Yes, pin 3 is SCL (clock) and pin 5 is SDA (data).
There are switched.

I had to read it through several times too, and got it wrong, and its only two wires.

Just clearing up ambiguity for anyone following.

John
by Johnny5C
Mon Mar 16, 2015 9:08 pm
Forum: HATs and other add-ons
Topic: GPIO pins and Adafruit Servo Controller
Replies: 6
Views: 1910

Re: GPIO pins and Adafruit Servo Controller

In case anyone finds this post through google, like I did, this is not quite correct. On my model B: P1 is VCC (3v3) P3 is SDA (data) P5 is SCL (Clock) P6 is GND Basically, the post above has SCL and SDA crossed. Its not easy to follow on the Adafruit guide, as they use a GPIO breakout. I just used ...
by Johnny5C
Tue Apr 08, 2014 12:24 pm
Forum: Camera board
Topic: Replacement camera ribbon
Replies: 4
Views: 855

Re: Replacement camera ribbon

I have just re mounted my camera in the case and noticed that the sensor ribbon had popped out under pressure.

I put a couple more washers in the fixings and now its fine.

At least I have a spare cable on the way...
by Johnny5C
Tue Apr 08, 2014 10:09 am
Forum: Camera board
Topic: Replacement camera ribbon
Replies: 4
Views: 855

Re: Replacement camera ribbon

Ordered one. Thanks!
by Johnny5C
Mon Apr 07, 2014 10:20 am
Forum: Camera board
Topic: Replacement camera ribbon
Replies: 4
Views: 855

Replacement camera ribbon

Hi guys. I installed my camera and pi into an enclosure at the weekend, but my camera no longer works. It looks like i have got a little nick in the ribbon. Doh. The LED flashes momentarily, but nothing else. The pi doesnt crash. Camera was working flawlessly untill I I fitted it in the box. (really...
by Johnny5C
Fri Mar 28, 2014 10:00 pm
Forum: HATs and other add-ons
Topic: 2.8" TFT + Touch Shield Board v2
Replies: 189
Views: 118725

Re: 2.8" TFT + Touch Shield Board v2

shaoq wrote:not sure.... can't rly see it on the screen its realy small :S
2.8 inches small?
by Johnny5C
Fri Mar 28, 2014 8:44 pm
Forum: General discussion
Topic: Pi-powered Space station detector
Replies: 4
Views: 2400

Re: Pi-powered Space station detector

ISS-Above tells you when the ISS is overhead. A cool space-related project using Raspberry Pi: http://www.slate.com/blogs/bad_astronomy/2014/03/25/iss_above_alert_system_to_see_the_space_station.html Project site: http://issabove.com/ Hmm. I might be speaking out of turn here, but in not sure this ...
by Johnny5C
Thu Mar 27, 2014 5:27 pm
Forum: HATs and other add-ons
Topic: 2.8" TFT + Touch Shield Board v2
Replies: 189
Views: 118725

Re: 2.8" TFT + Touch Shield Board v2

Hi all, I just wanted to share my experience with the screen. I am really pleased with it, and I’m just about getting to where I want to be. I’m making a small deployable time-lapse camera, all wrapped up in a Peli 1120 camera case. I will post some pics when finished. I basically wanted to run head...
by Johnny5C
Wed Mar 12, 2014 8:35 pm
Forum: HATs and other add-ons
Topic: 2.8" TFT + Touch Shield Board v2
Replies: 189
Views: 118725

Re: 2.8" TFT + Touch Shield Board v2

Just a quick note to say I ordered my screen from texy on Friday, and had a working screen by Monday evening.

I downloaded the notro image and put it onto an SD. Everything booted and worked first time.

Excellent work people!

Get one!

Cheers

John
by Johnny5C
Tue Mar 11, 2014 1:53 pm
Forum: Advanced users
Topic: Reading UART in console
Replies: 7
Views: 9282

Re: Reading UART in console

Yes, measured my UART device at 3.3V.

Is there a hyper terminal equivalent in raspbian?

What i would really like to do is have python code to capture, say, 5 minutes of UART, and save the data in a file.....

Im going to google it, but any help would be appreciated.
by Johnny5C
Tue Mar 11, 2014 11:31 am
Forum: Advanced users
Topic: Reading UART in console
Replies: 7
Views: 9282

Re: Reading UART in console

Thanks deeJay.

Im not rally that up on UART, but my device is outputting UART, and to read it on a laptop it needs a 232 converter.

I assumed this meant i could just read the UART right into my pi.
by Johnny5C
Mon Mar 10, 2014 3:18 pm
Forum: Advanced users
Topic: Reading UART in console
Replies: 7
Views: 9282

Reading UART in console

Hi, I didn’t want to hijack another user’s thread about ser2net, so I’m posting my question here. I have a device that outputs UART data at 115.2kbps,N,8,1. I am looking at a method of reading this on a laptop with a UART to USB (232) dongle, but I have a Pi nearby............ Now, can I just connec...
by Johnny5C
Tue Mar 04, 2014 12:53 pm
Forum: HATs and other add-ons
Topic: 2.8" TFT + Touch Shield Board v2
Replies: 189
Views: 118725

Re: 2.8" TFT + Touch Shield Board v2

Hi Texy.

Any screens available soon?

John
by Johnny5C
Wed Feb 05, 2014 10:08 pm
Forum: Automation, sensing and robotics
Topic: Pi Based Tide clock/display
Replies: 16
Views: 4705

Re: Pi Based Tide clock/display

Thanks for the link mixographer. I will check that out.

But tenochtitlanuk,
Shouldn't need a Pi
Doesn't mean dont use a Pi!

Cheers
by Johnny5C
Mon Feb 03, 2014 1:11 pm
Forum: Automation, sensing and robotics
Topic: Pi Based Tide clock/display
Replies: 16
Views: 4705

Re: Pi Based Tide clock/display

Thanks all for your input and comments. I like the idea of polling a website for current tide information, but I was hoping to come up with something stand alone, i.e., it doesn’t rely on an internet connection to work. So with tides having a period of 12.5 hours it would be simple to equate this to...
by Johnny5C
Thu Jan 30, 2014 5:08 pm
Forum: Automation, sensing and robotics
Topic: Pi Based Tide clock/display
Replies: 16
Views: 4705

Re: Pi Based Tide clock/display

Thanks Ravenous. The existing "tide clock" only has 4 segments, so the full out to full in tide only corresponds to 5 states. (I think) Tide out = no lights Light 1 Light 1+2 Light 1+2+3 Tide fully in = light 1 + 2 +3 +4 and in reverse! I have done some python work with A/D conversion, lighting an L...
by Johnny5C
Thu Jan 30, 2014 3:02 pm
Forum: Automation, sensing and robotics
Topic: Pi Based Tide clock/display
Replies: 16
Views: 4705

Pi Based Tide clock/display

I’m exploring the art of the possible here... I noticed on my commute to work today that the harbour tide clock wasn’t working. It’s a simple, decorative 4 section bar graph which indicates the current state of the tide. It started me thinking that this could be done with a Pi. My first thought was ...

Go to advanced search