Heart Rate Monitor

Keep to the beat! – Heart Rate Monitor Tutorial

Last tutorial in our LED trilogy! If you haven’t – then check out our Light It Up!-LED Tutorial and CEED Universe Compass Tutorial.

Components needed: 

  1. ADS1115 x 1
  2. LDR x  1
  3. LED x 1
  4. Resistor (100Ω) x 2
  5. Wires x 11
  6. pi-topPROTO board x 1

Background: This project was created with hearts in mind. It demonstrates and reveals a technique to measure the heart rate by sensing the change in blood volume in a finger artery while your heart is pumping! Compared to our last two tutorials, it is a bit more complex; however, it is perfect for an inter-curricular class or a fun family project for the weekend.  


Step 1: In this tutorial you will learn to make a heart-rate-monitor with an LED circuit on the pi-topPROTO board.

Step 2: The diagram below illustrates how the components should be soldered onto the pi-topPROTO board:

heart_rate_monitor_schem

 

9

 

Step 3: To build this circuit on the pi-topPROTO board, solder the LED to the board.

2.png

Step 4: Next solder in the resistor and complete the circuit using a wire.

3

Step 5: Now solder in the LDR (Light Dependent Resistor), its accompanying resistor and complete the circuit using another wire.

4.png

Step 6: The next step is to solder in the analogue to digital signal converter (ads1115) into the pi-topPROTO board.

5.png

 

Step 7: Connect the ads1115 to the 5V power supply.

7.png

 

 

Step 8: Connect I2C connections (SCL and SDA) on the ads1115 to pin 5 and pin 3 on the board respectively.

8.png

 

Step 9: Connect the ADDR pin to the GND pin on the ads1115 so as to define the I2C address on the ads1115 as 0x48.

9.png

 

Step 10: The next step is to move onto the python code! This can be done on your pi-topCEED. After you have booted your pi-topCEED up: click on the Main Menu, accessories and then open up a terminal window as seen in the screenshot below.

2016-06-02-132709_1366x768_scrot

 

Step 11: Type in “sudo idle &” into the terminal to open up idle 2 which will allow you to create a run python scripts on the Raspberry Pi!

2016-06-02-132941_1366x768_scrot

 

Step 12: Once the python shell environment has opened up, click File and then New to open up a new text editor. This text editor is where you will type your code, save and run the project! Once you run the project on the text editor the results will be displayed on the python shell environment that was previously mentioned.

2016-06-01-113610_1366x768_scrot

 

Step 13: The next step is to now copy the code below in the python text editor:

import matplotlib.pyplot as plt

import matplotlib.animation as animation

import time

import Adafruit_ADS1x15

import pylab

import numpy as np




from scipy.interpolate import interp1d

from scipy.signal import butter, lfilter, filtfilt




# from scipy.interpolate import spline

#get plot and draw axes

fig = plt.figure()

ax1 = fig.add_subplot(1,1,1)

moving_y = []

xaxisthings = []




startTime = time.time()




secondsShown = 5

secondsCalc = 5

plotHz = 20                        

totalWidth = plotHz*secondsShown

Oversample = 5




allY = [0]*plotHz*secondsShown

allX = [0]*plotHz*secondsShown

       

#function to set the next y value

def new_y_value():

   time.sleep(1/(plotHz * Oversample))

   return Adafruit_ADS1x15.ADS1115().read_adc(0, gain=16)

              

def animate(i):

   #add a new y value, and remove the first

   totaly = 0

   totalx = 0

   count = 0

   for j in range(secondsCalc * plotHz * Oversample)

       totaly +=new_y_value()

       totalx +=time.time()-startTime

       count+=1

       if count == Oversample:

           allY.append(totaly/Oversample)

           allX.append(totalx/Oversample)

           count = 0

           totalx = 0

           totaly = 0




   while len(allY) > (secondsShown*plotHz):

       allY.pop(0)

       allX.pop(0)

   

   ax1.clear()




   ax1.plot(allX,allY)

ani = animation.FuncAnimation(fig, animate, interval=1)

plt.show()

2016-06-01-113833_1366x768_scrot.png


 

Step 14: After creating your code, click on “File” and then “Save as” to save the code that you have written so that you can come back to it and run the code whenever you want!

Step 15: After saving your code, put you finger in between the LED and the LDR and press F5 to run your code and see your heartbeat displayed across the screen as seen in the image below!

Heart Rate Monitor.png
2

CEED Universe Compass Tutorial

This is the second tutorial in our trilogy. If you missed the first – please check out our Light It Up! – LED Tutorial for pi-topCEED.

Components needed: 

  1. LED x 4
  2. Resistor(100Ω) x 1
  3. Wires x 8
  4. pi-topPROTO board x 1

 

Background: Now that you know how to build one LED, we can step it up to the next level and build an LED compass. This can be useful when you are travelling or lost your way through the vast CEED Universe. Check your direction by using your own LED compass to guide you

Step 1: In this tutorial you will learn to make a compass on an LED circuit on the pi-topPROTO board.

Step 2: Below is a image of how the circuit should be connected with the LED soldered in place first (please follow the link here to take you to our video showing you how to solder onto a pi-topPROTO board).

led_compass_schem 1.png

Step 3: The next step is to solder the resistor in place.

2.png

Step 4: The next step is to solder the wires that connect the LEDs to the GPIO (General Purpose Input Output) port pins that will detect the signals being sent from the code when the CEEDUniverse game is being played so that you can see if you are getting closer or further away from your target destination. To learn more about GPIO pins please follow the link here.

3.png

Step 5: Once the circuit has been soldered in place (please follow the link here to take you to our video showing you how to solder onto a pi-topPROTO board,) all you have to do is slide the pi-topPROTO board into the HUB and run the CEEDUniverse game to use the compass! You can watch a short video showing you the final product below. 

 

 

 

1

Light It Up! – LED Tutorial

Today we are ecstatic to announce that we have started shipping out our pi-topCEED. To get you started we’ve prepared a trilogy of projects. Let’s start the plug & play!

Components needed: 

  1. LED x 1
  2. 100Ω Resistor x 1
  3. Wire x 1
  4. pi-topPROTO board x 1

Background: LEDs are a particular type of diode that convert electrical energy into light. In fact, LED stands for “Light Emitting Diode”. They are all around us in daily life: in our phones, our cars and even our homes. It is highly likely that when something electrical lights up – there’s an LED behind it. For more on LEDs check out this link here.
Step 1: In this tutorial you will learn to make your first LED circuit on the pi-topPROTO board, that can be found by following the link here.
Step 2: This image below shows you diagram of the LED circuit and an empty pi-topPROTO board onto which the projects can be built!

 

led circuit_schem  1

 

Step 3:

  • Below is an image of how the circuit should be connected, with an LED, 100Ω resistor and a wire to complete the circuit.
  • The resistor is connected to ground and the negative terminal of the LED; a wire is connected to the 3V3 power source and the positive terminal of the LED. The longer of the two LED terminals is the positive terminal.
1

 

Step 4: Once the circuit has been soldered in place (please follow the link here  or watch it belwo, to take you to our video showing you how to solder onto a pi-topPROTO board,) all you have to do is slide the pi-topPROTO board into the HUB!

We would warn you to be very careful with soldering and take the necessary precautions!🙂
If you are interested in learning more about LEDS please follow the link here. Or, continue with the next Tutorial: CEEDUniverse Compass Tutorial.

GameDemoBG

Intern project: The impact of game-based learning on classroom teaching

Hi all,

One of our interns is currently working on his final project “The impact of game-based learning on classroom teaching”, he has designed a questionnaire on CEED Universe – our educational game. The aim of his study is to assess the way lessons are currently taught in the classroom, and see if games such as CEED Universe can benefit students. For more information on the subject he recommends checking out this e-Book called Reality is Broken by Jane McGonigal.


The optimization of learning is very important to us; and so is supporting our pi-top Family members! Therefore, if you have some spare time to support him and fill in the questionnaire by clicking here (should only take a few minutes) – we would all be ecstatic.🙂

Looking forward to hearing your thoughts!
pi-topTeam

Hi All,

As mentioned in our latest Indiegogo update: we have a software update for you all!

In the pi-topCEED video you likely noticed our learning game CEEDUniverse and we hope you are excited about the concept of an engaging game that intertwines real learning in a fun adventure. We are now ready to give you a sneak peak of how far CEEDUniverse has come since we launched the campaign🙂 We have also integrated sound into the game! Look out next week for our video update on the pi-topSPEAKER!

 

Apologies for the delay in shipping emails we will be sending them out today and we have made our big website update where amongst other things you will have a login portal where you can update and finalise your shipping as a pi-topCEED Indiegogo backer. The email you receive will have instructions on how to go through the process.

Our next updates will focus on the general pi-topOS improvements and our brand new Raspberry Pi lesson plan integrated code editor. We have kept it slightly under wraps so far but we are very excited to show you this new feature bundled in pi-topOS!

As a side note – we have improved our freight shipping boxes – don’t they look pretty!

a6v0omm1xkiqo60o59rp

Importantly the rigid corner design and honeycomb panels are recyclable and will reduce shipping damage to a minimum🙂 whilst also reducing the amount of EPE Foam we have to use to protect the devices in transit by 90%. Part of why we design as much as possible that goes into all of pi-top is so we can reflect our company values on our supply chain.

Thanks all and keep an eye on your inbox’s!

Love,

pi-top Team

All (8) - Kopie

Extra pi-topCEED acrylic slice colour vote results!

Hi all,

Thank you to all our Indiegogo backers who participated in the latest pi-topCEED extra acrylic slice colour vote! We’ve now got the outcome for you and the results are…

 

ASColour.PNG

As you can see in the screenshot of the Pie Chart above it was a very close call. However, the prevailing winner is: dark blue!

                                         All (3).jpgAll (6) - Kopie

 

There we go – the second official pi-topCEED acrylic slice colour voted in by you.

Again, we can’t thank you enough for all your amazing support in our quest to bring affordable hardware and accessible computing to the world.

The new Raspberry Pi 3 is here!

Be the first to get yours from pi-top now!

piwithbox_web

We are celebrating the 4th Birthday of the Raspberry Pi and the launch of the Pi 3 by releasing a limited number of the brand new pi-topPROTO boards.

 

We are offering the new Raspberry Pi 3 in two amazing bundles:
1. Raspberry Pi 3 + 8GB SD card (pre-installed pi-topOS)
2. Raspberry Pi 3 + pi-topPROTO + 8GB SD card (pre-installed pi-topOS)

What is the pi-topPROTO board?


You can spruce up your pi-top with the pi-topPROTO! It is our first official add-on board for the pi-top. 

The pi-topPROTO provides full access to all 40 GPIO pins. These pins are the physical interface between the Pi and the outside world.  Additionally, there is a ton of prototyping space for adding cool gadgets (ADCs, real time clocks, motor drivers etc).

_MG_0090.JPG

It is an add-on board for pi-top‘s PCB Rail that breaks out the Raspberry Pi’s GPIO pins unlocking unlimited possibilities!

_MG_0075

Also, since it is powered from pi-top‘s Hub you have access to 18V, 5V, 3V and an always-on 3.3V (even when pi-top is powered down), with much higher current outputs than the Raspberry Pi alone can give. Here’s a link to an awesome gif!


What about the Pi 3? Key Features:


pi_angled_webThe new Raspberry Pi 3 is built on the latest Quad Core Broadcom 2837 ARMv8 64 bit processor which is faster and more powerful than it’s predecessors! Some noteworthy additions include:

  • Improved power management
  • built-in wireless connectivity
  • built-in Bluetooth

Meaning you can now use all your USB ports freely! For more detailed information please head over to our interactive Infographic!

We are super excited about this beauty and to see what fun projects everyone comes up with in the near future.

Much love,
pi-top Team

Indiegogo update 9 for pi-topCEED

Hi All!

It has been a busy few weeks here at Pi-Top HQ, and we are excited to share these shots of the pi-topCEED and the new more space efficient pi-topCEED Hub. We have some final tweaks to make to the hinge mechanism and case before we pull the trigger and start CNCing the mould when Ryan goes back to Shenzhen on the 18th. We hope you are excited by the improved design!

All is going smoothly for April delivery and we are really happy about the way this product is going forward.

We have also chosen 5 complimentary Acrylic Slice colours which we will be showing off early next week and soon after we will hold the colour vote for the $130,000 stretch goal!

We will be checking back with you soon!

All the love,

Ryan, Jesse & the pi-topTEAM

gpkj2xvxm0ttknwqdwsw

The new design provides easy access to the ports on the Raspberry Pi.

ndmhgngxcpdyil5ql1pb

You will be able to choose between green and grey closer to the shipping date.

ersjbl3qkclirbunrdtt

The power button has been integrated into the case.

wnjh30zzj4gzenltrzo1

The case is 30% thinner than our original!

wa5oq4ai5kg1icorwy42

The modular rail is now made of steel! The big change here is that all the addon boards will have small magnets so they are super easy to swap in and swap out. We have tested this extensively and it’s a fantastic way to add whatever functionality you wish to your pi-topCEED.

Unfortunately Indiegogo doesn’t let us put gifs in these updates but you can go here to see our newest addon board (pi-topProto) magnetically connecting to the rail and easily sliding into the modular connector.

imuek1oxyblioohhohwg

The hub size has been reduced by 17mm, which adds plenty of space for any addon boards to go into the rail.

Huge thank you to all our backers :) We are working hard to make pi-topCEED as great as it can be!

How to extract pi-topOS for Mac & Linux

Hi everyone,

We’ve written out two methods for you to extract the pi-topOS!

Method one: Mac and Linux (terminal command method)
Method two:  Mac (graphical method)

These tow solutions are to unzip the pi-topOS file for whoever has downloaded the zip file into the Downloads folder (located in /Users/<username>/Downloads):

Mac and Linux (terminal method): 

  1. Open the terminal application on your computer.

For this tutorials command, we presume that your default location is in your home folder. (see image below)

1

Image 1: This is where we assume your file to be located for the command.

2. Type out the command (below) into your terminal application:

`cd Downloads && tar xzvf pi-topOS.zip`

and hit Enter to begin extracting the zip file (see image below). Please note that the command it case sensitive – so please copy it exactly as written above!

2

Image 2: This is what it should look like in your terminal.

Leave the terminal window open until you are presented with a prompt allowing you to enter another command, indicating that the extraction is complete. The image file will have been extracted into your Downloads folder ready to be installed onto an SD card.

Mac (graphical method):

If you are happy to install third party software, the simplest method is to install ‘The Unarchiver’ from the App Store. This will also help for future uzipping of files! If the attached link does not work. Simply open the App Store, search for ‘The Unarchiver’ in the top right, and you should see it appear in the search results (see image below):

3

Image 3: Depicting App Store with “The Unarchiver” in top left corner.

Click the relevant ‘install’ button to download and install it onto your computer. You may be required to enter your Apple ID and password. At this point, you can return to the Downloads folder in Finder, right click the pi-topOS zip file, and select ‘The Unarchiver’ from the ‘Open With’ toolbar menu (image below):

4

Image 4: Depicts how to use ‘The Unarchiver’

This will extract the zip file into your Downloads folder ready to be installed onto and SD card!

We hope this helps and you enjoy the new update!🙂 If you have any questions or feedback on the new pi-topOS update just drop us an email at support@pi-top.com.

All the love to you amazing people.

Your pi-topTEAM

image 3

Pre-announcement: pi-topOS

Hi everyone,

New year, new features! 2015 was an intense year for the Dev Team at pi-top. Our small team have worked hard to improve the operating system (OS). Monday we will be releasing the update to all pi-top family members. Keep an eye out!

Have a great weekend making!

Love,

pi-top Team