Skip to content

Instantly share code, notes, and snippets.

António P. P. Almeida perusio

  • Perusio LLC & UP42
  • Berlin, Germany
Block or report user

Report or block perusio

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:671fb60f4ca8eebd4d9984bec6ec3d35
https://www.timeanddate.com/countdown/launch?p0=37&iso=20190812T14&year=2019&month=8&day=12&hour=14&min=0&sec=0&msg=UP42%20Commercial%20Launch
@perusio
perusio / dry_run_example.json
Created Jul 10, 2019
UP42 Jobs API: Dry run job parameters.
View dry_run_example.json
{
"oneatlas-pleiades-aoiclipped:1": {
"intersects": {
"type": "Polygon",
"coordinates": [
[
[
13.286076,
52.517579
],
@perusio
perusio / cdlatex-pabbrev.el
Created Mar 27, 2017
Making pabbrev-mode completions work when cdlatex-mode is active
View cdlatex-pabbrev.el
;; When we are in cdlatex mode then
;; rebind the TAB key so that pabbrev
;; -mode completions still work.
(when (and (boundp 'cdlatex-mode)
(boundp 'pabbrev-mode)
pabbrev-mode
cdlatex-mode)
(local-set-key '[f12] 'pabbrev-expand-maybe))
View gist:5c1a7f765adbca15e365d04ec4a1d1f8
Your NodeMCU custom build finished successfully. You may now download the firmware:
- float: http://nodemcu-build.com/builds/nodemcu-dev-10-modules-2016-06-09-18-06-12-float.bin
- integer: http://nodemcu-build.com/builds/nodemcu-dev-10-modules-2016-06-09-18-06-12-integer.bin
This was built against the dev branch and includes the following modules: cjson, dht, file, gpio, mqtt, net, node, tmr, uart, wifi.
The files are guaranteed to be available for download for 24h.
@perusio
perusio / index.js
Created May 15, 2016
Better code for the Tessel board
View index.js
// Import the interface to Tessel hardware
var tessel = require('tessel');
//Install mqtt library using: npm install mqtt
var mqtt = require('mqtt');
var client = mqtt.connect({
servers:[{'host':'mqtt.relayr.io'}],
// Add your credentials here.
username: "<my device ID>", // add your own
@perusio
perusio / index.js
Created May 14, 2016
Example of using the Tessel Board with the relayr cloud
View index.js
/*
* Property: isOn
* Returns: boolean (true or false) if led is on
*
* Checks the led to see if it is on or not.
*/
if (led.isOn)
{
console.log('The green LED is currently on.');
}
View mqtt.lua
-- https://github.com/nodemcu/nodemcu-firmware/wiki/nodemcu_api_en
wifi.setmode(wifi.STATION)
wifi.sta.config("iotlab1","IoTInnoLab")
mqttOnline = false
mqttSubSuccess = false
-- timer vars
mainTimerId = 0 -- we have seven timers! 0..6
mainInterval = 1000 -- milliseconds
@perusio
perusio / init.lua
Created Mar 17, 2016
wifi credentials workshop
View init.lua
-- Setup the WiFi in station mode.
if not wifi.sta.getip() then
wifi.setmode(wifi.STATION)
wifi.sta.config("iotlab1", "IoTInnoLab")
print(wifi.sta.getip())
end
@perusio
perusio / gist:e3c0bb973229de0361ba
Created Mar 17, 2016
uploading code to the Node MCU
View gist:e3c0bb973229de0361ba
./luatool/luatool.py -p /dev/ttyUSB0 -f ~/lua/esp8266/dht_test.lua -t main.lua -v
@perusio
perusio / dht.lua
Last active Mar 17, 2016
DHT Lua ESP8266
View dht.lua
function print_dht_data(pin)
local status, temp, humi, temp_dec, humi_dec = dht.read(pin)
if status == dht.OK then
-- Integer firmware using this example.
print(
string.format(
'DHT Temperature:%d.%03d - Humidity:%d.%03d\r\n',
math.floor(temp),
temp_dec,
You can’t perform that action at this time.