Go to advanced search

by Lombra
Mon Dec 14, 2015 7:05 pm
Forum: Python
Topic: some issues with flask/python
Replies: 1
Views: 543

Re: some issues with flask/python

Not sure how specific of a reply you were expecting, but I guess what you need to do is consider the state of the alarm when rendering the button, and set the selected attribute on the appropriate tag.
by Lombra
Sun Nov 22, 2015 2:37 am
Forum: Raspbian
Topic: (New) Official nightly full and cutdown/headless images
Replies: 83
Views: 29855

Re: (New) Official nightly full and cutdown/headless images

Would you be able to give me a rough idea as to the status of these inofficial builds? (noX in my case) Are they like, still under construction? Mostly working? Good enough for ordinary use?
by Lombra
Sat Jul 18, 2015 2:09 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: 3.3V LED and resistors?
Replies: 4
Views: 516

Re: 3.3V LED and resistors?

Ok, so I'm getting 22 mA for a single LED. Around 40 when parallel connected. (didn't realise that would happen)

Used 3V3 pin instead of GPIO for measuring, in case that makes a difference.
by Lombra
Thu Jul 16, 2015 8:57 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: 3.3V LED and resistors?
Replies: 4
Views: 516

Re: 3.3V LED and resistors?

Does it not seem believable? :D It's these: (scroll to about middle of the page) http://www.ebay.com/itm/181423158468 I got 'em because they were cheap as dirt. I realise that these are likely to be low quality, and possibly incorrectly specified, but it's what I've got to go on. They work, at least...
by Lombra
Thu Jul 16, 2015 8:44 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: 3.3V LED and resistors?
Replies: 4
Views: 516

3.3V LED and resistors?

Hi, I'm using a couple of white LEDs in parallel connection on a GPIO. They are grounded to an external 9V battery in addition to the Pi, in case that makes a difference. Now, I didn't realise that a resistor apparently is "required". I have only very basic electronics knowledge. The information I'v...
by Lombra
Wed Jul 15, 2015 12:05 pm
Forum: Python
Topic: Catch KeyboardInterrupt, "unhandle" everything else?
Replies: 2
Views: 294

Re: Catch KeyboardInterrupt, "unhandle" everything else?

Thanks. I came up with this, which seems to do what I had in mind: from time import sleep n = 0 try: while True: n += 1 print(n) if n > 3: print(a) sleep(1) except KeyboardInterrupt: print("manual shutdown") except: print("terrible error") raise finally: print("cleaning up before we're going under")
by Lombra
Tue Jul 14, 2015 2:06 pm
Forum: Python
Topic: Catch KeyboardInterrupt, "unhandle" everything else?
Replies: 2
Views: 294

Catch KeyboardInterrupt, "unhandle" everything else?

Hi, I'm wanting to catch keyboard interrupts so I can GPIO.cleanup on exit, but I want any other error to work as usual, ie print stack and return from script. (possibly with GPIO.cleanup) From the brief experience I have with these things, I'm thinking I actually have to do that "manually". Is ther...
by Lombra
Mon Jul 13, 2015 4:23 pm
Forum: Raspbian
Topic: Start python script automatically on boot
Replies: 9
Views: 1040

Re: Start python script automatically on boot

You don't need to make it executable when you run it with the python command. As for the issue at hand, you might need to specify the full path to python, as the appropriate PATH variable might not be set. if I start the file manually, it works perfectly. Yes, I know. The PATH variable might not be...
by Lombra
Sun Jul 12, 2015 10:32 pm
Forum: Camera board
Topic: RPi Cam Web Interface
Replies: 4323
Views: 822378

Re: RPi Cam Web Interface

[...] Thanks for the response! Basically I was thinking whether it was possible not to base the preview aspect ratio directly off the video resolution, unless those two are closely related on a low level or something. Personally it doesn't bother me that the preview doesn't exactly match the conten...
by Lombra
Sun Jul 12, 2015 9:07 pm
Forum: Camera board
Topic: RPi Cam Web Interface
Replies: 4323
Views: 822378

Re: RPi Cam Web Interface

Hi, I realised today that the preview is significantly cropped compared to captured stills. I later found out that I could remedy this by configuring raspimjpeg with a video resolution of 4:3 format, so I set it to 1600x1200. However I feel this is suboptimal. I don't really want to change the resol...
by Lombra
Sat Jul 11, 2015 8:51 pm
Forum: Raspbian
Topic: Start python script automatically on boot
Replies: 9
Views: 1040

Re: Start python script automatically on boot

You don't need to make it executable when you run it with the python command.

As for the issue at hand, you might need to specify the full path to python, as the appropriate PATH variable might not be set.
by Lombra
Sun Jul 05, 2015 2:01 pm
Forum: Gaming
Topic: Moonlight Embedded
Replies: 280
Views: 150823

Re: Moonlight Embedded

Has anyone had much success streaming Dolphin? Steam allows you to add 'non-steam' games to the library which I've done and I can launch games from Steam such as smash bros. When I stream though so far anyway its quite slow. Trying to improve performance to see if it can be playable. Its perfectly ...
by Lombra
Sun Jul 05, 2015 1:59 pm
Forum: Beginners
Topic: Choices for going screenless with an RPi B
Replies: 7
Views: 450

Re: Choices for going screenless with an RPi B

Hm, I probably don't have a solution, but I'm a bit confused/curious here. What do you mean screenless? Are you referring specifically to touch capabilities? If no, I'm confused at to the purpose of the device. How are you going to get output? By audio only?
by Lombra
Sat Jul 04, 2015 12:17 am
Forum: Gaming
Topic: Moonlight Embedded
Replies: 280
Views: 150823

Re: Moonlight Embedded

Look for a Python function to execute OS commands and then just put the exact command as a string.
by Lombra
Tue Jun 30, 2015 1:33 am
Forum: Python
Topic: Inaccurate timing under load - give prio?
Replies: 16
Views: 882

Re: Inaccurate timing under load - give prio?

Well, it does do fairly accurate timing when idle and, apparently with the right power source, also under load. I do kind of expect components that are frequently advertised together with the Pi to work properly, but I "respect" that it might not under heavy load. At the end of the day I didn't real...
by Lombra
Mon Jun 29, 2015 9:32 pm
Forum: Python
Topic: Inaccurate timing under load - give prio?
Replies: 16
Views: 882

Re: Inaccurate timing under load - give prio?

A+
by Lombra
Mon Jun 29, 2015 9:25 pm
Forum: Raspbian
Topic: Getting a Python script to run at startup
Replies: 5
Views: 641

Re: Getting a Python script to run at startup

I've done a lot more stumbling around but I am only getting more confused. I hope you will be willing to get me some further assistance. The attached file* shows what I am trying to add to crontab. And the messages I get when I close nano. And then the result of trying to "locate" crontab. (* I had...
by Lombra
Fri Jun 26, 2015 4:51 pm
Forum: Python
Topic: Inaccurate timing under load - give prio?
Replies: 16
Views: 882

Re: Inaccurate timing under load - give prio?

Well I've used this one so far:
http://swag.raspberrypi.org/products/ra ... wer-supply
but it's going to be a mobile project, and I already got a 1A "USB battery" for it.
by Lombra
Thu Jun 25, 2015 3:27 pm
Forum: Gaming
Topic: Minecraft Pi with PS3 controller, no bluetooth?
Replies: 2
Views: 923

Re: Minecraft Pi with PS3 controller, no bluetooth?

USB can be used for DS3 controlling, yes.
by Lombra
Wed Jun 24, 2015 10:50 am
Forum: Python
Topic: Inaccurate timing under load - give prio?
Replies: 16
Views: 882

Re: Inaccurate timing under load - give prio?

Ah, that's a shame. Thanks for taking your time! I don't suppose that is controlled and fixable by software somehow? I don't think I'm comfortable with UBECs (didn't even really know what it was!), nor do I think it will fit in my project. Guess I'll try changing it to manually emitting sonic pulses...
by Lombra
Mon Jun 22, 2015 9:45 pm
Forum: Python
Topic: Counter to show script loops per hour
Replies: 12
Views: 758

Re: Counter to show script loops per hour

I imagine you'd store the timestamp from just before starting the loop, and then do something like run_counter / ((currentTime - startTime) / 3600). Use time.time() to get current timestamp.
by Lombra
Sun Jun 21, 2015 9:57 pm
Forum: Gaming
Topic: Moonlight Embedded
Replies: 280
Views: 150823

Re: Moonlight Embedded

adcooney wrote:Incidentally since posting the above I haven't had to 'pair' my Pi once even after not playing it for over 12 hours so perhaps it already has some mechanism to do this.
You should only ever have to pair once, and that's the behaviour I've witnessed since I started using it.
by Lombra
Sun Jun 21, 2015 2:51 pm
Forum: Python
Topic: Inaccurate timing under load - give prio?
Replies: 16
Views: 882

Re: Inaccurate timing under load - give prio?

I'll try. I tried to narrow it down to the relevant bits. So the page is served by nginx and php5-fpm. I don't know if you're accustomed to raspimjpeg. It uses the Pi camera module to continuously capture stills and write them to a file in /dev/shm, which then is served to web clients using a PHP "s...
by Lombra
Sat Jun 20, 2015 11:00 pm
Forum: Python
Topic: Inaccurate timing under load - give prio?
Replies: 16
Views: 882

Re: Inaccurate timing under load - give prio?

could you reduce the niceness for the ultrasonic script (and decrease niceness for the server)? I tried to do that (I think), but it didn't seem to make a difference. Had a go at pigpio. Unfortunately it didn't seem to help too much. Tried starting the daemon with nice -20 , as well. I used the exa...

Go to advanced search