Go to advanced search

by mattrix
Mon May 23, 2016 6:30 am
Forum: Python
Topic: Calculate total current from interval dataset
Replies: 5
Views: 1212

Re: Calculate total current from interval dataset

It's pretty great. Some nights I can get 40% of my daily power into that hour (shower, dish washer, washing machine, all my cooking) As I live alone, I cook in batches so works well. They only have off-peak hours available. eg. no hours between 4pm and 9pm & 7am - 10am. It's kind of like a game now,...
by mattrix
Mon May 23, 2016 3:33 am
Forum: Python
Topic: Calculate total current from interval dataset
Replies: 5
Views: 1212

Re: Calculate total current from interval dataset

I don't mind actually manually processing the data. Just use SQL to grab the dataset. But, I just don't know how to work out the current consumed in an hour using the data.... I could add them all-together and divide by the amount of them to get the average, but is that best? Or, do I maybe minus ea...
by mattrix
Mon May 23, 2016 3:09 am
Forum: Python
Topic: Calculate total current from interval dataset
Replies: 5
Views: 1212

Calculate total current from interval dataset

Hi, I have a CT measuring my houses current usage every 30seconds. Currently I'm just storing it in a SQL database with a time-stamp. My power company gives me a free hour of power each day which can be set any time up-to midnight. So, the plan is to work out my highest usage hour for the day, and u...
by mattrix
Sun May 01, 2016 11:51 pm
Forum: Python
Topic: While key pressed?
Replies: 1
Views: 1694

Re: While key pressed?

I usually use Pygame for this. apt-get install python-pygame python-rpi.gpio import pygame import RPi.GPIO as GPIO PIN = 17 pygame.init() pygame.display.set_mode((100, 100)) GPIO.setmode(GPIO.BCM) GPIO.setup(PIN, GPIO.OUT) while True: for event in pygame.event.get(): if event.type == pygame.KEYDOWN ...
by mattrix
Sun May 01, 2016 11:31 pm
Forum: Python
Topic: project due in 3 days, pls help
Replies: 1
Views: 569

Re: project due in 3 days, pls help

Try moving this code

Code: Select all

camera = PiCamera()
camera.resolution = (320, 240)
rawCapture = PiRGBArray(camera)
before the while loop

I suspect the camera doesn't like being initialized twice.
by mattrix
Thu Apr 21, 2016 10:20 pm
Forum: Python
Topic: Best Python library to use for quick image/ text effects
Replies: 1
Views: 681

Best Python library to use for quick image/ text effects

Hi all, For my latest project, I need to be able to show an image to the screen and then be able to move / rotate / enlarge / shrink it very quickly. These images can be quite large. I also need to do the same with text. Currently using Pygame but this slows down quite a big with larger images. Any ...
by mattrix
Fri Mar 11, 2016 12:53 am
Forum: Gaming
Topic: Dual Boot Recalbox + OSMC / OpenELEC Images (All Pi's)
Replies: 5
Views: 12480

Re: Dual Boot Recalbox + OSMC / OpenELEC Images

- Added new Raspberry Pi 3 images using experimental Recalbox Raspberry Pi 3 build

http://www.matthuisman.nz/2015/11/recal ... mages.html
by mattrix
Fri Mar 04, 2016 1:57 am
Forum: General discussion
Topic: RPi3 - Are these messages OK? [obsolete]
Replies: 7
Views: 6797

Re: RPi3 - Are these messages OK?

Ok, the package is called

pi-bluetooth

So, to update Pi2 Jessie image to Pi3, pretty much just do this

Code: Select all

apt-get update
apt-get dist-upgrade
apt-get install wireless-regdb iw crda wireless-tools pi-bluetooth
by mattrix
Fri Mar 04, 2016 1:47 am
Forum: General discussion
Topic: RPi3 - Are these messages OK? [obsolete]
Replies: 7
Views: 6797

Re: RPi3 - Are these messages OK?

To test, I booted the latest Raspbian on Raspberry Pi 3 I still got the same brcmfmac messages. So I guess they are fine. Also, I found the vc_vchi_sm_init: failed to open VCHI service is due to my GPU ram being low (as it's a minimum image), and that's also fine :) I do see some Bluetooth message B...
by mattrix
Thu Mar 03, 2016 3:50 am
Forum: General discussion
Topic: RPi3 - Are these messages OK? [obsolete]
Replies: 7
Views: 6797

RPi3 - Are these messages OK? [obsolete]

Moving a Raspberry Pi 2 Minimal Jessie image to use on Raspberry Pi 3. Did apt-get update && apt-get dist-upgrade On 4.1.18-v7+ kernel. Few questions 1) Are there any new userland packages I need to install that don't relate to the GUI eg. WiFi / Bluetooth driver / firmware 2) Are these dmesg messag...
by mattrix
Wed Mar 02, 2016 11:24 pm
Forum: General discussion
Topic: The Raspberry Pi 3 Model B Q&A thread
Replies: 457
Views: 225299

Re: The Raspberry Pi 3 Model B Q&A thread

Using latest Noobs 1.8 on Raspberry Pi 3 - WiFi option grayed out?
I assumed it would support the Pi3 wifi chip??
by mattrix
Thu Feb 25, 2016 9:09 pm
Forum: Gaming
Topic: Dual Boot Recalbox + OSMC / OpenELEC Images (All Pi's)
Replies: 5
Views: 12480

Re: Dual Boot Recalbox + OSMC / OpenELEC Images

New v1.4 images just uploaded. Changes: Updated NOOBS lite to v1.7 Updated Recalbox to v4.0-beta 1 Updated OpenELEC to v6.0.1 Increased OpenELEC boot partition size to 512MB Increased OpenELEC storage partition size to 1000MB The Raspberry 1 images should now work on Raspberry Pi Zero (not tested).
by mattrix
Wed Jan 27, 2016 10:39 pm
Forum: Python
Topic: Raspberry Pi PySide Minimal Image | Perfect for GUIs
Replies: 1
Views: 721

Raspberry Pi PySide Minimal Image | Perfect for GUIs

Here is an image I have created to get people quickly into creating a Python GUI on the Raspberry Pi. Features: - Stripped down Raspbian Jessie (image size is 890MB) - Based on my Jessie Minimal Image - Boots directly to Python example GUI written using PySide - Runs bare bones Xorg - Uses OpenBox a...
by mattrix
Mon Jan 18, 2016 8:58 am
Forum: Gaming
Topic: recalboxOS - emulation platform for RPi and RPi2
Replies: 494
Views: 154612

Re: recalboxOS - emulation platform for RPi and RPi2

I should receive a rpi zero this weekend. The support is imminent :) Does this mean the firmware in the Recalbox Raspberry Pi 1 B / A+ build will be upgraded? I had a problem running the Raspberry Pi 1 Recalbox on latest NOOBS. The reason was that the latest NOOBS takes up 5x partitions. Recalbox n...
by mattrix
Wed Dec 23, 2015 9:26 pm
Forum: Gaming
Topic: Completely lost with emulation on Openelec/Kodi
Replies: 10
Views: 6184

Re: Completely lost with emulation on Openelec/Kodi

KODI is actually working on implementing an emulation feature.

It's called RetroPlayer
http://forum.kodi.tv/showthread.php?tid=173361

But, I wouldn't expect it in KODI mainline any time soon.

So, I would go for dualboot until that comes around :)
by mattrix
Wed Dec 23, 2015 8:26 am
Forum: Gaming
Topic: Completely lost with emulation on Openelec/Kodi
Replies: 10
Views: 6184

Re: Completely lost with emulation on Openelec/Kodi

I use a dual boot system. Basically 2x different operating systems and switch between them. The switching only takes 20seconds which is fine as I'm either in a gaming mode or a movie mode. Here is how: http://www.matthuisman.nz/2015/11/recalbox-kodi-dual-boot-images.html Recalbox is really straightf...
by mattrix
Tue Dec 22, 2015 2:27 am
Forum: Gaming
Topic: Dual Boot Recalbox + OSMC / OpenELEC Images (All Pi's)
Replies: 5
Views: 12480

Dual Boot Recalbox + OSMC / OpenELEC Images (All Pi's)

https://1.bp.blogspot.com/-PQyEzjDNfgQ/VuIad-HySDI/AAAAAAAAAmQ/P3p-5fpQsfwNLKRCzWljY8viPw_mWOR1w/s1600/1.jpg http://2.bp.blogspot.com/-jFgMBKid_PM/VnJPTO210AI/AAAAAAAAAfw/cOgl1q9QJjY/s1600/IMG_20151217_185653.jpg http://2.bp.blogspot.com/-4TSn_WGoaq8/VgnbQRD7CjI/AAAAAAAAAIc/4jUtLP4Amkc/s1600/10.jpg...
by mattrix
Wed Dec 09, 2015 6:08 am
Forum: General programming discussion
Topic: Realtime Multiplayer
Replies: 8
Views: 1491

Re: Realtime Multiplayer

Interesting.

What did they suggest on reddit?
LINK to your post?
by mattrix
Wed Dec 09, 2015 3:18 am
Forum: Gaming
Topic: recalboxOS - emulation platform for RPi and RPi2
Replies: 494
Views: 154612

Re: recalboxOS - emulation platform for RPi and RPi2

Hi there, I've downloaded the release (from march) of RecalBoxOS and installed it on my pi 2. Mostly good so far, but for some reason the official pi wifi adapter (https://www.raspberrypi.org/products/usb-wifi-dongle/) doesn't appear to work? I had this issue with OSMC earlier this year but updates...
by mattrix
Wed Dec 09, 2015 3:09 am
Forum: General programming discussion
Topic: Realtime Multiplayer
Replies: 8
Views: 1491

Re: Realtime Multiplayer

Use Python + Pygame?
Pretty easy to get some sprites moving with key-presses and then work from there.
by mattrix
Sun Nov 29, 2015 8:18 pm
Forum: General programming discussion
Topic: How to start without a hardware?
Replies: 6
Views: 2319

Re: How to start without a hardware?

I think you mean being able to use the GPIO's without hardware actually connected?

I just use a "dummy" GPIO class

Code: Select all

try:
    import RPi.GPIO as GPIO
except:
    import RPiDummy as GPIO
See my post here:
viewtopic.php?f=32&t=113680&p=779751&hi ... my#p779751
by mattrix
Fri Nov 27, 2015 1:21 am
Forum: Python
Topic: RPi to arduino lan connection
Replies: 5
Views: 2048

Re: RPi to arduino lan connection

If it was me, I would use the new Raspberry Pi Zeros as all the nodes. These would run a bare bones python server (bottle.py) that accepts calls from the main node. Main node would be a Raspberry Pi 2. This also runs an API which talks to the other nodes. Then you would also have it serving up a nic...
by mattrix
Fri Nov 27, 2015 1:10 am
Forum: Python
Topic: RPi to arduino lan connection
Replies: 5
Views: 2048

Re: RPi to arduino lan connection

Not sure if there is a simple web server available for Arduino ?
But if there is, just run a small API on each Arduino and use normal HTTP calls: http://192.168.2.3/light/on
from the Raspberry Pi.

Example is bottle.py in Python.
Few lines of code and you have an API ready to accept commands.
by mattrix
Thu Nov 26, 2015 9:14 pm
Forum: Python
Topic: Parent Detector Mod
Replies: 3
Views: 679

Re: Parent Detector Mod

Give this a whirl import RPi.GPIO as GPIO import time import picamera import datetime # new import os def get_file_name(): # new return datetime.datetime.now().strftime("SANTA %Y-%m-%d_%H.%M.%S.h264") sensor = 4 GPIO.setmode(GPIO.BCM) GPIO.setup(sensor, GPIO.IN, GPIO.PUD_DOWN) previous_state = False...
by mattrix
Wed Nov 25, 2015 9:20 pm
Forum: Python
Topic: Use of switches to redirect a Program
Replies: 11
Views: 1544

Re: Use of switches to redirect a Program

Try something like this (untested) import time from threading import Thread from itertools import cycle import RPi.GPIO as GPIO import mikezlcd class Pulse(object): PULSE_PIN = 18 BUTTON_PIN = 20 def __init__(self): self.count = 0 self.lcd = mikezlcd.lcd_module(2004, 17, 27, 25, 24, 23,22) self.info...

Go to advanced search