Skip to content

Instantly share code, notes, and snippets.

View legap's full-sized avatar

Pascal Gafner legap

View GitHub Profile
http://meettheipsums.com/
http://hipsum.co/
@legap
legap / gist:f5214b0bab1567f1c096
Created January 26, 2016 09:39
Embedded Programming
Embedded Programming with the GNU Toolchain - http://www.bravegnu.org/gnu-eprog/
git ls-files --others --exclude-standard | xargs -I {} -n1 rm "{}"
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() {
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() {

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.

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.

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)

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: