-
Download the file sim908.sh
-
type
sh sim908.sh
in your terminal
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> [email protected] install /home/pi/mcp/node_modules/spi | |
> node-gyp rebuild | |
make: Entering directory '/home/pi/mcp/node_modules/spi/build' | |
CXX(target) Release/obj.target/_spi/src/spi_binding.o | |
In file included from ../src/spi_binding.cc:19:0: | |
../src/spi_binding.h:47:9: error: ‘FunctionCallbackInfo’ does not name a type | |
../src/spi_binding.h:47:9: error: ISO C++ forbids declaration of ‘parameter’ with no type [-fpermissive] | |
../src/spi_binding.h:47:9: error: expected ‘,’ or ‘...’ before ‘<’ token | |
../src/spi_binding.h:48:9: error: ‘FunctionCallbackInfo’ does not name a type |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
var SPI = require('pi-spi'); | |
var spi = SPI.initialize("/dev/spidev0.0"); | |
// Read value from a MCP3002 (http://ww1.microchip.com/downloads/en/DeviceDoc/21294C.pdf) | |
function readMCP(channel, callback) { | |
if (spi === undefined) return; | |
var mode = (8 + channel) << 4; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
/** | |
* Module dependencies | |
*/ | |
/*global setImmediate:true*/ | |
var events = require('events'), | |
Store = require('./store'), | |
eos = require('end-of-stream'), | |
mqttPacket = require('mqtt-packet'), | |
Writable = require('readable-stream').Writable, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.~*# | |
*.old |
sudo mkdir /usr/lib/systemd/system/
sudo touch /usr/lib/systemd/system/babette.service
nano /usr/lib/systemd/system/babette.service
écris
[Service]
## Intro
You've got a GIS dataset, you want to serve a map to visualize it ?
- A GIS dataset. Here's one
Today, many datas are geolocalised (meaning that they have a position in space). They're named GIS datas.
It's not rare that we need to do operations on those, such as aggregations, and there are many optimisations existing to do that.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python2 | |
from math import cos as f, radians as u, sin as k | |
def area(h,c): | |
return f(u(c))*k(u(c))*h/2 | |
if __name__ == '__main__': | |
import sys | |
if (len(sys.argv) < 3): | |
print "usage : %s HYPOTHENUSE ANGLE_IN_DEGREES" % sys.argv[0] |
OlderNewer