Category: Blog

Byte Insight

Twitter

The original inspiration for this whole experiment came from a @Rob Bishop (OCR) Raspberry Pi Recipe Card  (ocr-recipe-card-twitter-led.pdf). The objective is to interact with Twitter using Python.

Sense Hat

The Sense Hat from Raspberry Pi was developed as part of the Astro Pi Project.  The Sense Hat comes with its own library and a variety of hardware including: a 8×8 RGB LED matrix for output; a five-button joystick for user control; and the following sensors:

  • Gyroscope used to measure the positioning of an object
  • Accelerometer used to measure the rate of the velocity of an object
  • Magnetometer that provides an electronic compass
  • Temperature
  • Barometric pressure
  • Humidity

The purpose of this page is a quick guide to using the different aspects of the Sense Hat but for full details you should check out the API.

Light Sensor

This circuit is based on the ARDX 09 circuit from Oomlout.  It shows how the Arduino can monitor light values using a Photo Resistor and adjust a LED in response. 

Arduino

The amazing versatile Arduino microprocessor board that can be used in many projects.

Python

Python is a highly readable language that is easy to use and learn hence it is gaining popularity as an education language.  However, this should not lead anyone to consider it a child’s language for it is not.  It is very powerful, flexible and platform independent.  It supports many styles of programming from scripting and web design to  GUI/Game development.

TKinter Drawing

TKinter is the easiest way to get drawing in Python.

Tkinter Events

Tkinter employs a type of programming called Event-Driven which means that the program runs in a endless loop waiting for things (events) to happen.  In order for the program to respond to these events it needs to know what to listen for.  

Time

It is not uncommon to use time (or dates) or programs in some way or another.   If you are writing games you might want to record how long something takes or give the player a restricted amount of time.  Thankfully Python has some pretty good libraries (datetime, time) to help you.

Potentiometer

This circuit is based on ARDX 8 which uses a potentiometer to change the flash rate of an LED.  

Push Button LED

This simple flashing LED (Light Emitting Diode) circuit is based on the ARDX 07 circuit from Oomlout.  It serves as an excellent introduction to combine inputs and outputs.   It uses a Pull Down Resistor.