Instructions
Table Of Contents
- Introduction
- Parts
- Using Alligator Clips
- Solar Board Reference
- Project 1 – Sun Finder
- Project 2 – Garden Light
- Project 3 – Self Charging Cooling Fan
- The BBC micro:bit
- Getting Code to Run on the micro:bit
- Project 4 – Adding an Energy Meter
- Project 5 – Energy Logger
- Connecting Up
- Code for the Energy Logger (MakeCode)
- How it works
- Connecting to Your PC
- Pairing Your micro:bit With MakeCode
- Showing the Device Console Graph
- Capturing Data From a Charge and Discharge Cycle
- Downloading Data
- Getting Data into a Spreadsheet Program
- Analysing the Data
- Graphing the Data
- Results
- Understanding the Data
- Understanding Duty Cycle
- How the Solar Store Works
- Project 6 – Intelligent Cooling Fan
- Troubleshooting
- About the Author
- Learning
- Monk Makes Kits
("99","09","09","09","09"),
("99","99","00","99","99"),
("99","99","99","09","99")
)
def img(n):
lg = FONT[int(n/10)]
rg = FONT[int(n%10)]
c = ""
for r in range(5):
c += lg[r] + "0" + rg[r]
if r != 4:
c += ':'
return Image(c)
def digits(n):
if n > 99:
display.show(Image.CHESSBOARD)
else:
display.show(img(n))
def read_temp():
global temp
temp = temperature()
if override: temp = HOT
def fan_needed():
return stored >= CHARGED and temp >= HOT
def fan_not_needed():
return stored <= DISCHARGED or temp <= COLD
def fan_on():
pin2.write_digital(1)
#display.show(Image.YES)
def fan_off():
pin2.write_digital(0)
#display.show(Image.NO)
Page 35