BioBoard/Documentation/PC Software: Difference between revisions

From Noisebridge
Jump to navigation Jump to search
(Created page with '= Introduction = The PC software has two parts: *[https://github.com/BioBridge/BioBoardLogServer The logging daemon] *[https://github.com/BioBridge/BioBoardSite The web applica…')
 
Line 10: Line 10:
The web application lets you create new projects and view graphs of the logged data.
The web application lets you create new projects and view graphs of the logged data.


= Setup =
= Software setup =


To get started, you should first install the software. There is an installation guide on [https://github.com/BioBridge/BioBoardSite the web app's github page] (scroll down to find it). Right now the installation guide is specific to Ubuntu Linux, though it should work for Debian and other Debian-based Linux distributions as well. The software is written in Ruby, so it should run on other operating systems such as Windows and OS X, though we are still working on the installation guides for these.
To get started, you should first install the software. There is an installation guide on [https://github.com/BioBridge/BioBoardSite the web app's github page] (scroll down to find it). Right now the installation guide is specific to Ubuntu Linux, though it should work for Debian and other Debian-based Linux distributions as well. The software is written in Ruby, so it should run on other operating systems such as Windows and OS X, though we are still working on the installation guides for these.
After verifying that everything works, you should create a new project in the web app. Make sure the web app is running (as per the [https://github.com/BioBridge/BioBoardSite install guide]), point your web-browser to [http://localhost:3000/ http://localhost:3000/] and click the "Start a new project!"-button. Name the project by filling out the "<give your project a name>" textbox.
Now, you need to ensure that the project name as specified in the Arduino sketch is the same as the name of your project. The only constraint is that the name cannot contain any exclamation marks. Remember to upload your sketch to the Arduino if you change it.
= Connecting the BioBoard =
There are two ways of connecting the BioBoard to the log server. One is to connect the Arduino to the computer running the logserver using USB. The other is to use an Arduino Ethernet Shield to connect over a local network or the Internet. First of all, make sure the log server is running, as described in the [https://github.com/BioBridge/BioBoardSite installation guide].
== Connecting using USB ==
When using USB, you need to start an additional serial forwarder program that reads the data from the connected Arduino and sends it to the log server. This step will be eliminated in future versions of the software. The serial forwarder is included with the log server. After starting the log server, do:
<code>
  cd BioBoardLogServer/
  ./serial_forwarder.rb
</code>
and let it run for as long as the log server runs.
Now connect the BioBoard to the USB port of the computer running the log server and hit the reset button on the Arduino. The Arduino will immediately start sending data from the connected probes and sending it the log server which will log the data in the database.
== Connecting using the Ethernet Shield ==
The code for using the Ethernet Shield has not been integrated with the rest of the Arduino code yet, but if you've used an Ethernet Shield before it should be fairly straight-forward. Instead of sending data over the serial connection, you need to modify the program to connect using TCP on port 9090 to the computer where the log server is running and send the data over that connection.
= Using the software =
Now you are ready to view the graphs generated from the probe data. If you still have the page for your new project loaded in the browser, simply hit the browser refresh button, otherwise go to [http://localhost:3000/ http://localhost:3000/] and click the project name under "Existing projects".
You should now see your graphs, one for each probe. You can toggle the graphs on and off. Features such as adjusting the x and y-axis scales are coming soon!
Don't worry about shutting down the serial forwarder, log server or web app. All your data will be there next time you start it up. Your entire database is stored in the file BioBoardSite/db/dev.sqlite so if you want to back it up, simply shut down the log server and make a copy of that file.

Revision as of 00:04, 3 May 2011

Introduction

The PC software has two parts:

The logging daemon receives data from the Arduino and logs it to a database. The Arduino can be connected either directly over USB or, if you have an Ethnernet Shield, over a local network or the Internet.

The web application lets you create new projects and view graphs of the logged data.

Software setup

To get started, you should first install the software. There is an installation guide on the web app's github page (scroll down to find it). Right now the installation guide is specific to Ubuntu Linux, though it should work for Debian and other Debian-based Linux distributions as well. The software is written in Ruby, so it should run on other operating systems such as Windows and OS X, though we are still working on the installation guides for these.

After verifying that everything works, you should create a new project in the web app. Make sure the web app is running (as per the install guide), point your web-browser to http://localhost:3000/ and click the "Start a new project!"-button. Name the project by filling out the "<give your project a name>" textbox.

Now, you need to ensure that the project name as specified in the Arduino sketch is the same as the name of your project. The only constraint is that the name cannot contain any exclamation marks. Remember to upload your sketch to the Arduino if you change it.

Connecting the BioBoard

There are two ways of connecting the BioBoard to the log server. One is to connect the Arduino to the computer running the logserver using USB. The other is to use an Arduino Ethernet Shield to connect over a local network or the Internet. First of all, make sure the log server is running, as described in the installation guide.

Connecting using USB

When using USB, you need to start an additional serial forwarder program that reads the data from the connected Arduino and sends it to the log server. This step will be eliminated in future versions of the software. The serial forwarder is included with the log server. After starting the log server, do:

 cd BioBoardLogServer/

 ./serial_forwarder.rb

and let it run for as long as the log server runs.

Now connect the BioBoard to the USB port of the computer running the log server and hit the reset button on the Arduino. The Arduino will immediately start sending data from the connected probes and sending it the log server which will log the data in the database.

Connecting using the Ethernet Shield

The code for using the Ethernet Shield has not been integrated with the rest of the Arduino code yet, but if you've used an Ethernet Shield before it should be fairly straight-forward. Instead of sending data over the serial connection, you need to modify the program to connect using TCP on port 9090 to the computer where the log server is running and send the data over that connection.

Using the software

Now you are ready to view the graphs generated from the probe data. If you still have the page for your new project loaded in the browser, simply hit the browser refresh button, otherwise go to http://localhost:3000/ and click the project name under "Existing projects".

You should now see your graphs, one for each probe. You can toggle the graphs on and off. Features such as adjusting the x and y-axis scales are coming soon!

Don't worry about shutting down the serial forwarder, log server or web app. All your data will be there next time you start it up. Your entire database is stored in the file BioBoardSite/db/dev.sqlite so if you want to back it up, simply shut down the log server and make a copy of that file.