configure the Pi to use the PCB. By the way, in Python, the
hash mark, or indicates a comment:
GPIO.setup(16,GPIO.OUT) SD Card Safe
to remove indicator LED
GPIO.setup(26,GPIO.IN,pull_up_down=GPIO.PUD_UP)
# Flight Mode Switch go into flight mode
GPIO.setup(23,GPIO.OUT) Flight Mode
Indicator LED
GPIO.setup(25,GPIO.OUT) Signal
PICAXE to start/stop collecting data
GPIO.setup(12.GPIO.OUT) PWM IO
pwm=GPIO.PWM(12,50) configure to
produce 50 Hz signal for servo
GPIO.setup(13.GPIO.OUT) PWM IO
pwm=GPIO.PWM(13,50) configure to
produce 50 Hz signal for servo
import RPi.GPIO as GPIO make the
GPIO available to the Pi
import smbus so the Pi can use
I2C commands
import serial so the Pi
can read GPS sentences
from picamera import PiCamera #so the Pi can
use its camera
ser = serial.Serial(port=’/dev/
ttyAMA0’,baudrate=4800,parity=serial.
PARITY_NONE,stopbits=serial.STOPBITS_
ONE,bytesize=serial.EIGHTBITS,timeout=2)
I haven’t tested all the ports in the Raspberry Pi flight
computer yet. However, I still want to briefly mention
them. GPIO pins 17, 22, 24, and 27 form an expansion
port that also provides 3. 3 volts and ground. The second
I2C pins and the SPI pins are available in four- and six-pin
ports, respectively, that include 3.3V and ground.
GPIO.setwarnings(False) suppress
error messages
GPIO.setmode(GPIO.BCM) makes the Pi use
the I/O’s Broadcom names
Making the Raspberry Pi flight computer has been
a real learning experience, and I’ve barely scratched the
surface. I still need to run all the code I’ve written in a full
test. I need to find out how to copy the code and data
from the SD card to my PC, so I can analyze it in Excel.
Next are the GPIO found on the expansion board,
their functions, and the Python commands used to set
them up:
I need to identify an appropriate power pack (cell
phone back-up battery?) to operate the flight computer
for its three hour balloon flight. I need to learn how to
configure the Pi to start the flight code without me telling it
to do so over a keyboard and monitor. Plus, I need to make
a BalloonSat airframe for the flight computer and send it
up.
However, I’m out of space this month. I hope what I’ve
written so far will help some readers avoid making some
of the mistakes I’ve made. Feel free to correct me and
make suggestions. With any luck, I’ll have a really neat near
space mission to write about this summer.
Onwards and Upwards,
Your near space guide NV
Your Single Source of Electronic Equipment, Tools, and Components
01DM820B
01DMMY64
01DMM9803R
Sweep Function Generator
Digital Multimeter
Digital Multimeter
Bench DMM
Super Economy
32 Ranges
True RMS
3MHz, 6 Waveform Functions, Int/Ext Counter,
lin/log sweep
DMM - Volts, current,
Resistance, Transistor
and Diode Test.
Includes Leads $7.50
Including temperature,
capacitance, frequency
and diode/transistor
testing $29.95
Auto and manual
range, RS232C
standard interface.
$135 Model FG- 30 (no display)
Runs on DC or AC $139.95
Model FG- 32
( 5 digit display) $195
01DS1102E
01SDS1052DL
DC Power Supplies
100MHz Rigol Oscilloscope
Siglent 50MHz DSO
Model HY3003
500MSa/s Sampling
Features: 1 million points of
deep memory, FFT, record
and replay, roll mode, alternate trigger mode, and
adjustable trigger sensitivity $399 $279
Variable Output, 0-30VDC,
32K Memory
0-3Amp.
$95
6 Digit Frequency Counter
Model HY3003-3
USB Interface
Two 0-30VDC, 0-3Amp Variable
7” Color TFT-LCD Screen
Outputs plus 5V 3A fixed. $195
Parallax Board of Education Full Kit $98.90
BOE Full Kit
0603ZD98
USB version with Stamp and USB Cable.
Parallax 7.5V Power Supply
$8.95
48W Soldering Station
Temp. Controlled
310oF~840oF $15.25
1 (800) 972-2225 | http://www.elexp.com | contact@elexp.com
May/June 2018 79