Tested on Linaro 4.9.39
sudo apt-get updatesudo apt-get upgradesudo apt-get install autoconf libtool automake bison python-dev swig libasound2-dev
| package main | |
| import ( | |
| "fmt" | |
| "os/exec" | |
| "strings" | |
| ) | |
| func run(args ...string) { | |
| cmd := exec.Command("adb", args...) |
| #include "gpio.h" | |
| uint16_t GpioDB410cMapping(uint16_t pin) { | |
| // only pin 23-34 | |
| if (pin < 23 || pin > 34) { | |
| printf("ERROR: Pin %d does not have a GPIO pin mapped\n", pin); | |
| return 0; | |
| } | |
| switch(pin) { |
| #include "i2c.h" | |
| // File handlers if all I2C | |
| #define I2C_MAX_BUS_COUNT 4 | |
| // initalize every counter to zero | |
| static int I2C_FH[I2C_MAX_BUS_COUNT]; | |
| // Keeps a refernce counter of all used FH | |
| static int I2C_FH_RC[I2C_MAX_BUS_COUNT] = { 0 }; | |
| int I2cOpen(int bus) { |
| /* apt install libiw-dev | |
| * gcc wifi_scan.c -liw -o wifi_scan | |
| * ./wifi_scan | |
| * | |
| * Docs: http://docs.ros.org/jade/api/heatmap/html/iwlib_8h.html | |
| */ | |
| #include <stdio.h> | |
| #include <time.h> | |
| #include <iwlib.h> |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>Simple HTML Form</title> | |
| <style> | |
| body { | |
| text-align: center; | |
| } | |
| #main { |
| # Display Monitor Timings - DMT | |
| hdmi_group=2 | |
| # CVT (coordinated video timings) | |
| hdmi_mode=87 | |
| # hdmi_cvt=<width> <height> <framerate> <aspect> <margins> <interlace> <rb> | |
| ## width (required) width in pixels | |
| ## height (required) height in pixels | |
| ## framerate (required) framerate in Hz |
| // gcc test.c -lwiringPi -o test | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <unistd.h> | |
| #include <wiringPi.h> | |
| #include <ads1115.h> | |
| #define MY_BASE 2222 | |
| #define JOY_RX 0 |
| #include "accel.h" | |
| void AccelSetup(int bus) { | |
| uint8_t modeReg; | |
| I2cOpen(bus); | |
| I2cSetSlave(bus, 0x4c); | |
| I2cReadByte(bus, MMA7660_REG_MODE, &modeReg); | |
| netsh wlan show profile <SSID> key=clear | findstr "Key Content" |