Light sensor Python script

“””script to read a Light Dependent Resistor on GPIO pin 11 must be run in command line: –login as root >sudo su — run python command from directory >python lightsensor.py — ctrl-C to quit “”” #!/usr/bin/python import time import os import RPi.GPIO as GPIO GPIO.setmode(GPIO.BOARD) def LDRtime(LDRpin): reading = 0 GPIO.setup(LDRpin, GPIO.OUT) GPIO.output(LDRpin, GPIO.LOW) time.sleep(0.1)… Continue reading Light sensor Python script

Raspberry Pi 3B setup

install NOOBS from https://www.raspberrypi.org/downloads/noobs/ v 1.8.0 released 2016-02-29 Get online using wifi dongle and QMUL Guest login (fuck eduroam for now) >sudo apt-get update >sudo apt-get install mysql-server >sudo apt-get upgrade >sudo pip install PyMySQL Changed mind and went for MariaDB as that is what I use on PEW >sudo apt-get install mariadb-server As MySQL… Continue reading Raspberry Pi 3B setup

Raspberry Pi set-up (old)

On mac, Download NOOBS from https://www.raspberrypi.org/downloads/noobs/ Unzip Format the microSD using SDFormatter software (I’ve used a 32GB card as I want to be able to backup the NMR data locally, just-in-case. This could be done to a USB stick too I guess). Copy files from root of NOOBS to freshly formatted SD card. Put card… Continue reading Raspberry Pi set-up (old)