Go to advanced search

by Johnny5C
Thu Jan 16, 2014 3:53 pm
Forum: Python
Topic: Clear Output Screen
Replies: 25
Views: 5118

Re: Clear Output Screen

Not being able to get at my pi to test this is bugging me! In the mean time I have been trying to put together the code to introduce a TKinter GUI. I'd like to call up three variabes, but for now im only calculating curent. The two voltage readings will stay blank. What do you think? from tkinter im...
by Johnny5C
Thu Jan 16, 2014 12:33 pm
Forum: Python
Topic: Clear Output Screen
Replies: 25
Views: 5118

Re: Clear Output Screen

Thanks guys. I changed my \n to a \r and added the flush, but now it just stacks the output in a consecutive line, as if a CR had been removed. Unfortunatley transfering code between the PC i can post here with and where my pi is running means passing it through a footbath, so i havent tried Dougie'...
by Johnny5C
Thu Jan 16, 2014 10:32 am
Forum: Python
Topic: Clear Output Screen
Replies: 25
Views: 5118

Re: Clear Output Screen

Back on thread, my code: #!/usr/bin/env python # -*- coding: utf-8 -*- import sys import serial from time import sleep # declare to variables, holding the com port and the speed port = '/dev/ttyAMA0' baud = 9600 # open a serial connection ser = serial.Serial(port=port, baudrate=baud) sleep(0.2) # se...
by Johnny5C
Wed Jan 15, 2014 5:38 pm
Forum: Python
Topic: Clear Output Screen
Replies: 25
Views: 5118

Re: Clear Output Screen

Thanks guys. When I use the code: sys.stdout.write("\rADC: {} Amps: {:0.2f}A".format(adc, amps)) sys.stdout.flush() it does display the text, but it does exactly the same as: print("ADC: {} Amps: {:0.2f}A" .format(adc, amps)) I get a CR, and each pass prints a new value, on a new line. Where ever i ...
by Johnny5C
Wed Jan 15, 2014 4:10 pm
Forum: Python
Topic: Clear Output Screen
Replies: 25
Views: 5118

Re: Clear Output Screen

I see. Thanks Dougie and elParaguayo. In my last post i was toying with the placement of the \r, but it just didn’t look right! I find working with python interesting, but I have far to go. Appreciate your help. Will test tonight and report back. PS, can anyone recommend a Python for beginners book?
by Johnny5C
Wed Jan 15, 2014 3:39 pm
Forum: Python
Topic: Clear Output Screen
Replies: 25
Views: 5118

Re: Clear Output Screen

Sorry. I dont get it. What am I missing?

sys.stdout.write()
sys.stdout.flush(("ADC: {} Amps: {:0.2f}A" .format(adc, amps))

Where does my \r CR go?
by Johnny5C
Wed Jan 15, 2014 1:41 pm
Forum: Python
Topic: Clear Output Screen
Replies: 25
Views: 5118

Re: Clear Output Screen

Sorry. I'm very new to Python. I have got a far as i have by taking bits of other peoples code and tweaking it! So i can replace my print statement with a sys.stdout. like this? sys.stdout.flush() sys.stdout.write(("ADC: {} Amps: {:0.2f}A" .format(adc, amps)) Thanks for this. I really appreciate it!...
by Johnny5C
Wed Jan 15, 2014 12:49 pm
Forum: Python
Topic: Clear Output Screen
Replies: 25
Views: 5118

Re: Clear Output Screen

Thanks fo rthe quick answer.

So do I just need to add

sys.stdout.flush()

before my line:

print("ADC: {} Amps: {:0.2f}A" .format(adc, amps))

Unfortunately im not near my pi right now to test it.

Next task is using TKinter to show this value in a GUI.....
by Johnny5C
Wed Jan 15, 2014 12:03 pm
Forum: Python
Topic: Clear Output Screen
Replies: 25
Views: 5118

Clear Output Screen

Hi, Im measuring current with an ADC and converting the value back to Amps in Python. At the moment im formatting and printing the value to the output window, every 0.5 seconds, and it produces a list. I would rather as each print happens, clear the last value and overwrite, so a single value appear...
by Johnny5C
Tue Oct 15, 2013 11:49 am
Forum: Camera board
Topic: Star Trails
Replies: 14
Views: 4943

Re: Star Trails

Steve,

Not star trails, but my first real time lapse. Its a view of south dartmoor from my parents house.

(I see you're in Devon)

https://www.youtube.com/watch?v=V3iwHSzVpVo

Still working on night time lapse. ISS is over head this week. I will see if my pi cam can "see" it....

John.
by Johnny5C
Thu Sep 19, 2013 11:56 am
Forum: Camera board
Topic: Adapt RPi camera to round cable (not flat flex) ?
Replies: 72
Views: 37700

Re: Adapt RPi camera to round cable (not flat flex) ?

Great idea.

RPI<CSI to HDMI<-- HDMI Cable-->HDMI to CSI>CAM

Keep us updated and good luck!
by Johnny5C
Mon Sep 16, 2013 4:24 pm
Forum: Camera board
Topic: Star Trails
Replies: 14
Views: 4943

Re: Star Trails

Good work geekinthesticks. I have a pi/cam and a 7inch 12v LCD coupled up to a 12AH SLA. One of my shell scripts calls up a 6 hour TL with 10s interval, and I turn the screen off once its running. Im thinking about changing to one of Texy's small touch screens, as the mouse takes me over the power b...
by Johnny5C
Mon Sep 16, 2013 4:11 pm
Forum: Camera board
Topic: Camera number 3!
Replies: 24
Views: 4801

Re: Camera number 3!

You are following ESD precautions when attaching to your pi right?
by Johnny5C
Thu Sep 12, 2013 3:45 pm
Forum: Camera board
Topic: Star Trails
Replies: 14
Views: 4943

Re: Star Trails

Thanks Niall et al. What happens if you stack a moving star field image? Would the trails appear? If (for instance) i could set my cam exposure to see the stars correctly, and did a couple of hours of time-lapse, but stacked the images rather than making a movie, would the trails appear? I’m hoping ...
by Johnny5C
Thu Sep 12, 2013 11:19 am
Forum: Camera board
Topic: Star Trails
Replies: 14
Views: 4943

Re: Star Trails

Hove, I’m not sure that what the OP was hoping for. I too have boxed up my camera and power source to make a deployable time lapse rig, and after a few goes my eyes have turned upwards. I have been looking (admittedly not too hard) for someone who has posted examples of exposure settings for photogr...
by Johnny5C
Sat Aug 31, 2013 9:59 am
Forum: Beginners
Topic: Carriage return with mouse. Possible in command line?
Replies: 11
Views: 2882

Re: Carriage return with mouse. Possible in command line?

Thanks Narf, but I have moved on.

Im now looking at how to drive raspbian with only a keyboard, to "click" on my shell scripts..

JC
by Johnny5C
Sat Aug 31, 2013 7:20 am
Forum: Beginners
Topic: Carriage return with mouse. Possible in command line?
Replies: 11
Views: 2882

Re: Carriage return with mouse. Possible in command line?

I managed to run some time lapse, but i had to "frig" the power because my mouse kept dropping out. I have created shell scrips thanks to ednl, which just need a double click, but the pesky 12V to USB adaptor makes it own mind up. I tried just a keyboard as i remembered what pksato said, but i dont ...
by Johnny5C
Mon Aug 26, 2013 1:53 pm
Forum: Beginners
Topic: Carriage return with mouse. Possible in command line?
Replies: 11
Views: 2882

Re: Carriage return with mouse. Possible in command line?

Thanks jojopi, I guess the term beginners is open to interpretation.

that code by ednl looks interesting. I could just launch from icons. Going to have a play with that.

If I fail miserably I can still copy the command with the newline still on the end.

Cheers all.
by Johnny5C
Mon Aug 26, 2013 11:54 am
Forum: Beginners
Topic: Carriage return with mouse. Possible in command line?
Replies: 11
Views: 2882

Re: Carriage return with mouse. Possible in command line?

The cut and pate bit is fine. My terminology obviously isn't correct. I have a prompt up in LXterminal, with the following I want to execute: raspstill -t xxxxxxx -tl yyyyyyy -o test%04.jpg But without hitting enter, it doesn't do anything! I only have a mouse attached. I am going to download matchb...
by Johnny5C
Mon Aug 26, 2013 11:13 am
Forum: Beginners
Topic: Carriage return with mouse. Possible in command line?
Replies: 11
Views: 2882

Re: Carriage return with mouse. Possible in command line?

Maybe CR isn't right, its Enter...

Hang over from my military days...
by Johnny5C
Mon Aug 26, 2013 11:12 am
Forum: Beginners
Topic: Carriage return with mouse. Possible in command line?
Replies: 11
Views: 2882

Re: Carriage return with mouse. Possible in command line?

I have created lines of text in notepad, like raspstill -t xxxxxxx -tl yyyyyyy -o test%04.jpg. There are 10 or so lines each with a different x and y. I just select which one I want and cut/paste into command line in LX terminal or bash. I cant actually hit CR to run the line though, with just a mou...
by Johnny5C
Mon Aug 26, 2013 10:45 am
Forum: Beginners
Topic: Carriage return with mouse. Possible in command line?
Replies: 11
Views: 2882

Carriage return with mouse. Possible in command line?

I have put everything I need for a deployable time lapse camera in a small peli case, with a 7 inch 12v DVI screen and an SLA battery. The problem I have is the 12v to usb adaptor I have isn't meaty enough to drive the keyboard and mouse together. (Its rated at 1A - but was only 3 quid) No problem I...
by Johnny5C
Fri Aug 23, 2013 8:02 pm
Forum: Beginners
Topic: Wht is THE largest class 10 SD card you got working?
Replies: 22
Views: 114799

Re: Wht is THE largest class 10 SD card you got working?

Formatted using a different disk manager to FAT32 for the File System, and 32KB for Cluster Size and it boots...

Just posting this solution for anyone who follows in my footsteps via google...

Cheers
by Johnny5C
Fri Aug 23, 2013 7:41 pm
Forum: Beginners
Topic: Wht is THE largest class 10 SD card you got working?
Replies: 22
Views: 114799

Re: Wht is THE largest class 10 SD card you got working?

I have a 4GB card formatted with the recommended SDFormatter and it works fine, but I do the same with a 64GB card and it does not boot. I doing time lapse, so I need more storage space. I thought a simple swap to a larger SD would crack it. This line stands out: If you want to use the card for NOOB...
by Johnny5C
Tue Aug 13, 2013 7:28 pm
Forum: Beginners
Topic: DVI LCD video set up
Replies: 0
Views: 258

DVI LCD video set up

I haver a 6 inch DVI LCD, but raspian is only showing in the middle 3rd of the screen. I don't think it reports back its resolution at start up. Its 1024x768. How do I get the raspberry to use all of the screen? First few seconds of boot show the rainbow in the middle half vertically... Sorry for th...

Go to advanced search