Hi, I got me a raspberry pi 2 model B with UK power standards. Have anyone power this device with a usb power bank that is for charging a smartphone?
Hi, I got me a raspberry pi 2 model B with UK power standards. Have anyone power this device with a usb power bank that is for charging a smartphone?
With a Raspberry Pi 2, nothing plugged in apart from a PI Sense hat I got an uptime of almost 7 hours using a power bank. Pretty impressive and way longer than I expected.
00:18:16 up 6:53, 0 users, load average: 0.00, 0.01, 0.05
The power bank specs:
5v/1000 mA
2200mAh 8.14WH
I had the LEDs running on the PiSense hat constantly.
If it can last 7 hours with the PiSense on a Pi 2 I would expect much longer on a basic Pi with no connections.
cat sense_test.py
colour = (95, 95, 0)
background = (0,0, 63)
from datetime import datetime
import time
from sense_hat import SenseHat
import subprocess
sense = SenseHat()
while 1:
#d = datetime.time(datetime.now()).strftime('%H:%M')
d = subprocess.Popen("uptime", shell=True, stdout=subprocess.PIPE).stdout.read()
print(d)
f = open('uptime.txt','a')
f.write(d) # python will convert \n to os.linesep
f.write('\n')
f.close() # you can omit in most cases as the destructor will call it
d = subprocess.Popen("sync", shell=True, stdout=subprocess.PIPE).stdout.read()
sense.show_message(d, 0.1, colour, background)
time.sleep(60)
With a Raspberry Pi 2, nothing plugged in apart from a PI Sense hat I got an uptime of almost 7 hours using a power bank. Pretty impressive and way longer than I expected.
00:18:16 up 6:53, 0 users, load average: 0.00, 0.01, 0.05
The power bank specs:
5v/1000 mA
2200mAh 8.14WH
I had the LEDs running on the PiSense hat constantly.
If it can last 7 hours with the PiSense on a Pi 2 I would expect much longer on a basic Pi with no connections.
cat sense_test.py
colour = (95, 95, 0)
background = (0,0, 63)
from datetime import datetime
import time
from sense_hat import SenseHat
import subprocess
sense = SenseHat()
while 1:
#d = datetime.time(datetime.now()).strftime('%H:%M')
d = subprocess.Popen("uptime", shell=True, stdout=subprocess.PIPE).stdout.read()
print(d)
f = open('uptime.txt','a')
f.write(d) # python will convert \n to os.linesep
f.write('\n')
f.close() # you can omit in most cases as the destructor will call it
d = subprocess.Popen("sync", shell=True, stdout=subprocess.PIPE).stdout.read()
sense.show_message(d, 0.1, colour, background)
time.sleep(60)