Skip to content

Instantly share code, notes, and snippets.

View legap's full-sized avatar

Pascal Gafner legap

View GitHub Profile

Low cost 9 degrees of freedom module (GY-85 6DOF 9DOF)

I just bought a low-cost 9 degrees of freedom module at [AliExpress][1].

Contained sensors

Mnemonic Description Datasheet Arduino library
ADXL345 accelerometer [Datasheet][2] [Adafruit_ADXL345 library][7]
HMC5883L digital compass [Datasheet][3] [Arduino-HMC5883L library][8]
ITG3205 MEMS gyroscope [Datasheet][4] [ITG3205 library][9]

Installing Wifi from the command line

Finding the Acces Point (AP)

With the following command you can see a list of available Access Points (AP).

$ iwlist wlan0 scan

Find the one you want to use and pick the ESSID, i.e. ESSID: "my_network"

Preparing the Preshared Key (PSK) for Wi-Fi Protected Access (WPA)

When using Wi-Fi Protected Access (WPA) you will need to generate the Pre-shared key (PSK) with your (E)SSID you picked before and the PASSWORD used to connect to the Access Point:

MCP3008

![MCP3008_Pins][1]

Pin MCPP Mnemonic MCPP Pin Raspberry
16 VDD 3.3V
15 VREF 3.3V
14 AGND GROUND
13 CLK GPIO11 (P1-23)

MMA7361 Pin description

![MMA7361_PCB][1]

Pin Mnemonic Description
X X-axis This is the analog signal out along the X-axis
Y Y-axis This is the analog signal out along the Y-axis
Z X-axis This is the analog signal out along the Z-axis
SL Sleep This pin will put the chip to sleep when pulled low to consume less power and will resume operation when pulled high.

Wiring and accessing an ADXL345 3-axis accelerometer with a Raspberry Pi (Zero)

ADXL345 Pinout

![ADXL345_Pinout_Image][1]

Pin No. Mnemonic Description
1 VDD I/O Digital Interface Supply Voltage.
2 GND Must be connected to ground.
3 Reserved Reserved. This pin must be connected to VS or left open.
import java.io.File;
import java.io.FileFilter;
import java.nio.file.DirectoryStream;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
public class JavaFileOperations {
public void findAllXmlFilesInFolderWithJavaIO() {
var http = require('http');
it('should send a get request to the config restlet.', function () {
var gotResponse = false;
var myResponse = {};
//this function to wait the rest to respond back
function waitForBackend() {
git ls-files --others --exclude-standard | xargs -I {} -n1 rm "{}"
@legap
legap / gist:f5214b0bab1567f1c096
Created January 26, 2016 09:39
Embedded Programming
Embedded Programming with the GNU Toolchain - http://www.bravegnu.org/gnu-eprog/