Friday Mar 28, 2014

Adafruit Ultimate GPS using UART configuration on Raspberry Pi

So in preparation for using the Adafruit Ultimate GPS with UART there are some configuration steps that needs to be done. First we need to edit /boot/cmdline.txt (so it doesn't provide a terminal connection by default.

Change the line:

dwc_otg.lpm_enable=0 console=ttyAMA0,115200 
kgdboc=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 
elevator=deadline rootwait
to:
dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait 
 

Then we need to edit /etc/inittab so the Pi doesn't spawn a login to the serial connection (we need it when connecting the GPS later)

Change:

#Spawn a getty on Raspberry Pi serial line
T0:23:respawn:/sbin/getty -L ttyAMA0 115200 vt100
to:
#Spawn a getty on Raspberry Pi serial line
#T0:23:respawn:/sbin/getty -L ttyAMA0 115200 vt100

Reboot!

Install GPSD, GPSD is an open source project which provides a daemon which streams GPS data via a TCP socket, allowing you to communicate with a whole host of different GPS devices (not just this one). Just execute:

sudo apt-get install gpsd gpsd-clients python-gps

Now it is time to connect the GPS and test it, but that will be a later post. Stay Tuned!

--Andy

I2C and SPI on Raspberry Pi Configuration

As I am going to use I2C (BMP180) and SPI (DS1722) sensors with my Raspberry Pi (wheezy distribution) I need to enable them. Real easy to do, start by editing the file /etc/modprobe.d/raspi-blacklist.conf and make sure that the lines containing blacklist spi-bcm2708 and blacklist i2c-bcm2708 are commented out

Then edit the /etc/modules file so it contains the following two lines (it may contain more lines): i2c-dev, i2c-bcm2708 and spi-bcm2708.


Reboot!

Execute the command lsmod, and you should see spi_bcm2708 and i2c_bcm2708 in the list


The I2C bus allows multiple devices to be connected to your Raspberry Pi, each with a unique address, that can often be set by changing jumper settings on the module. It is very useful to be able to see which devices are connected to your Pi as a way of making sure everything is working. To be able to do this execute sudo apt-get install python-smbus and sudo apt-get install i2c-tools.

And the last step is to execute sudo apt-get update and sudo apt-get upgrade to get the latest and greatest libraries.

That's it for now, next post should contain some code I hope.

--Andy

Wednesday Oct 02, 2013

Oracle Java 7 JDK on Raspberrry Pi

This is just fantastic news:

"It’s therefore fantastic to be able to announce that we’ve added the official hard-float Oracle Java 7 JDK to our repository. Oracle Java offers significant performance advantages over OpenJDK on ARM platforms, and will expand the range of Java applications that run well on the Pi."

Read more here!

And if you're a current owner of a Rpi how do you install Oracle Java 7 JDK on the RPi? Easy:

sudo apt-get update && \
sudo apt-get install oracle-java7-jdk

Now time to write some cool Java programs on the RPi.

--Andy


About

Andy's blog about the world of embedded Java, Oracle Java Cloud Service and my more fun things!

Search

Categories
Archives
« May 2015
SunMonTueWedThuFriSat
     
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
      
Today