Tuesday, January 16, 2018

Pressure, Temp, accel, gps, sensors for RPi




These are the parts

  • 20U7 GPS from Sparkfun  
  • BME280 breakout from Adafruit 
  • GY-87 from Ebay
    • MPU-6050
    • BMP-180
    • HMC5883L


First enable i2c and download tools. By following the directions here.

Once this is done we can check for devices using:
sudo i2cdetect -y 1

My result shows i2c devices on 2A, 68 and 77.

  • 0x77 is the BME280 pressure/temperature/humidity sensor it can be 0x76 if you add a jumper
  • 0x68 is the MPU-6050 which has the HMC5883L as a slave
  • 0x2A is the FLIR Lepton

First I am going to work on getting the pressure/temperature sensors to work.  I have two sensors for this:

BME280 - Pressure, humidity and temperature
BMP180 - Pressure and temperature data included on GY-87 board

I will use the Adafruit BME280 driver for python which depends on Adafruit GPIO library.

After following the instructions to get everything installed.  I can read the temperature and pressure from my BME280.  I had to change a line in Adafruit_BME280.py so that I could use my BME280 on i2c 0x76 instead of the default 0x77.

Now I am ready to try out the IMU sensors.





Sunday, June 26, 2016

Setting up the Web.py Controlled Raspberry Pi Robot

Software Packages Used

  • Web.py - Python web interface
  • pyFirmata - Python API for firmata protocol to communicate with Arduino
  • Firmata - Accepts commands on the Arduino





Installing what you need on the computer:

sudo apt-get install i2c-tools

Fixing the Keyboard Symbols:
https://www.raspberrypi.org/forums/viewtopic.php?f=26&t=39806&p=331516#p331516
    My current content of /etc/default/keyboard is now 

      XKBMODEL=”pc105”
      XKBLAYOUT=”us”
      XKBVARIANT=””
      XKBOPTIONS=””

      BACKSPACE=”guess”

Camera:
http://elinux.org/RPi-Cam-Web-Interface#Basic_Installation

Web IDE:
https://learn.adafruit.com/webide/overview

Raspberry Pi Pinout
https://pinout.xyz/pinout/i2c

Getting I2C Sensors to work
http://blog.bitify.co.uk/2013/11/interfacing-raspberry-pi-and-mpu-6050.html

GPS
https://www.sparkfun.com/products/13740
https://learn.adafruit.com/adafruit-ultimate-gps-on-the-raspberry-pi/using-uart-instead-of-usb



Friday, August 30, 2013

Hyrpoxia, Eutrophication, Carbon and Power

So we live in a world with all sorts of problems.  To me these problems are temporary until we can figure out how to solve them (and probably create different problems for ourselves in the process.)

So here is a problem chain:

  1. We want cheap, easy, reliable food source.
  2. Therefore, we use fertilizers to make food production more efficient.
  3. These fertilizers eventually end up in rivers.
  4. The fertilizer causes Eutrophication, lots of algae, phytoplankton or cyanobacteria growth which hamper other plant/animal growth
  5. The algae, phytoplankton or cyanobacteria die and are then eaten by bacteria which use up all the oxygen.
  6. This creates hypoxia, or a dead spot in which most marine life cannot live.

So, here is what I think could be a solution.
  • Gather nitrogen rich/algal rich waters and confine them.
  • Allow  more algae to grow.
  • Harvest the algae
  • Bacteria eat the algae, producing natural gas.
  • Clean water returns back to the river.
Ideally the elevation head on the water would power most of the plant, and the natural gas production could pay for it.


Monday, August 19, 2013

Captcha's

Who thinks capchas are annoying?

I think instead of these we should employ less annoying means of stopping spam.  Such as pripple could make an account worth an anti spam service that would verify too other sites that you are a human.  The site could collect data such as time of day, platform, browser, ip address, location and a rough picture of your behavior to determine if you are likely to be a spammer.  Only if this data indicates a high risk of spammer would it require a test.  Tests could be fun, such as identifying objects in not copyrighted art and photos or playing a little game or reading handwriting from old documents to digitize census records and so on.

Wednesday, August 14, 2013

Stitching Pictures

Have you ever taken a picture with another person, or better yet a group of people?  Have you ever been somewhere and noticed that everyone is taking pictures?  Unfortunately even when you take the same portrait with a dozen cameras, all you end up with is a dozen incomplete pictures.  Some were too close, others too far, some too bright others too dark or grainy, some were a little blurry, some were framed too wide, others cut off someones arm, or head, some had one thing in focus, others something else.  Even with a single camera, there are these variations as a handful of pictures are taken.  In one someone was squinting in another someone else sneezed.

What if you could put together all of those pictures?  All of them are out there digitally somewhere.  The first step would be to collect all of the pictures of the same scene in one place.  The next step is obviously the hard part, -stitch them all together to make a 3d or quasi 3d image with higher resolution, better color, better lighting, everyone eyes open.  It's completely possible with today's technology.  ...It's just a matter of time until someone does it.  Sorry it won't be me, I'm busy.

Wednesday, June 19, 2013

For the Dreamers out there...

I am an avid dreamer.  I'm continually thinking of new ideas for the future.  Here's a great dreaming quote I ran across today.

Those who dream by night ... wake in the day to find that it was vanity: but the dreamers of the day are dangerous men, for they may act on their dreams with open eyes, to make it possible."
--T.E. Lawrence,
British army officer

Tuesday, June 18, 2013

Thorium: An alternative nuclear energy?

Today I learned about Thorium and its potential as a nuclear fuel source.  Thorium, like Uranium can be used as a nuclear fuel.  The U.S. built a working Thorium reactor in the 1960's but eventually gave up on it because it wasn't useful for producing nuclear weapons.  In today's world, thorium looks like it could be a sustainable energy source for a number of reasons:

  • Thorium is very abundant
  • Thorium is safer for meltdown risks, and should naturally shutdown during a disruption.
  • Thorium may have a lower risk of nuclear proliferation
  • Waste will be radioactive for only hundreds of years instead of tens of thousands
So, if it is so great, why we aren't using it?
  • Research has been stopped for decades
  • Utilities don't have the capital to put into developing complex unproven technologies, especially given the political, economic and technical uncertainties associated with nuclear energy
  • Although safer, it is still dangerous and will take considerable effort to figure out how to regulate it
  • Actually there is still a nuclear proliferation

In our quest for energy independence it seems like Thorium could be a very good option.  The technology could prove to be an excellent alternative to traditional nuclear and could generate significant cost savings by reducing the meltdown risks and the many costs of mitigating them.

http://en.wikipedia.org/wiki/Thorium-based_nuclear_power
http://www.nature.com/nature/journal/v492/n7427/full/492031a.html