This is still very preliminary... I need to add better pictures of physical hookup, and work through some of the awkward code.
Remove these ads by
Signing UpStep 1: Starting with a blank SD card, download Raspbian image, and install onto SD card
I downloaded:
Raspbian image, and used
Win32DiskImager to install on SD card
There's also more information at http://elinux.org/RPi_Easy_SD_Card_Setup





































Visit Our Store »
Go Pro Today »




(1) updated inputs (denoted by -I in command)
(2) updated the path from ../bcm2835.c to ../bcm2835-1.5/src/bcm2835.c
(3) updated file name from ADXL_RaspPi.c to ADXL362_RaspPi.c
gcc -o ADXL362_RaspPi -I ../bcm2835-1.5/src ../bcm2835.c ADXL_RaspPi.c
1) create a specific directory:
mkdir ADXL362_RaspPi
cd ADXL362_RaspPi/
2) install Git if you don't have it:
sudo apt-get install git
3) create a repository and pull from Github:
git init .
git add .
git pull https://github.com/annem/ADXL362_RaspPi.git
Your raspberry PI will always have the same IPv6 Link Local address every time it boots and it's determined from it's mac address.
For example, if your PI has a MAC address of 23:45:67:89:ab:cd, then it's link local address will be fe80::2145:67ff:fe89:abcd.
Converting the MAC to link local is as follows: Take the first three octets of MAC and insert FFFE and then the last 3 octets. (all values in hex).
For 11:11:11:22:22:22 this results in 1111:11FF:FE22:2222
Then, invert the 0x02 bit of the first octet: 1311:11ff:fe22:2222.
Finally place fe80:: in front fe80::1311:11ff:fe22:2222
Now, to communicate with that, you will need to specify the interface ID of the outbound interface on your machine. On rational systems, this is the name of the interface, such as "eth0" on Linux or "en0" on Mac, "fxp0" on BSD, etc. On windows boxes, it's unfortunately a number which has little rime or reason to it, but you should be able to get the correct number from ipconfig /all.
# sudo cat >> /etc/resolv.conf
nameserver 8.8.8.8
control-z-key
This adds the Google public DNS server. You can add any nameserver you want instead of 8.8.8.8
Others can build on this to do hardware SPI instead of bitbanging, saving digital pins and making things faster, cool :)
I'll give it a try, and update the tutorial if is works.