Skip to content

Instantly share code, notes, and snippets.

@ati
ati / gist:3638457
Created September 5, 2012 15:29
мобильная версия vozduh.msk.ru
Пишу по поводу мобильной версии vozduh.msk.ru
Моё лучшее представление о мобильной версии такое: программа состоит из нескольких экранов. Их число равно количеству датчиков + 1.
Последний экран -- текст о проекте, с описанием железки, методологии, с благодарностями и пр.
Остальные экраны -- информация с датчиков. Выглядят они примерно так: http://i.imgur.com/uZi2G.jpg. Последовательно сверху вниз, слева направо:
1. название датчика, ссылка на "последнюю" страничку
2. точечки, соответствующие активной странице
3. "сейчас": время, кнопка refresh
4. текущее значение, большими буквами, с единицами измерения.
@ati
ati / electric_imp_co2_k30
Last active December 10, 2015 01:38
Electric imp code for K30 CO2 sensor communication using RS-232 protocol
//K30 CO2 sensor interface
// using RS-232 communication
/*
250 - 350 ppm – background (normal) outdoor air level
350- 1,000 ppm - typical level found in occupied spaces with good air exchange.
1,000 – 2,000 ppm - level associated with complaints of drowsiness and poor air.
2,000 – 5,000 ppm – level associated with headaches, sleepiness, and stagnant, stale, stuffy air.
Poor concentration, loss of attention, increased heart rate
and slight nausea may also be present.
>5,000 ppm – this indicates unusual air conditions where high levels of other gases could also be present.
@ati
ati / gist:4568508
Created January 18, 2013 21:04
using http://embed.ly with octopress
# Title: trivial hack to use embed.ly in octopress
# Authors: Alexander Nikolaev <variomap@gmail.com>
#
# Syntax {% embedly url %}
#
require 'embedly'
module Jekyll
@ati
ati / evt_num.diff
Created September 25, 2014 05:35
Patch for missing DPI dialog in image sequence export
From ad88b0f68d2f5827ba0f53e2f83e78539b54cdb1 Mon Sep 17 00:00:00 2001
From: Alexander <ati@undev.ru>
Date: Thu, 25 Sep 2014 09:32:38 +0400
Subject: [PATCH] fix for missing EVT_NUM
---
src/dialogs_file.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/dialogs_file.py b/src/dialogs_file.py
%matplotlib inline
import matplotlib.pyplot as plt
import numpy as np
import scipy.fftpack
SAMPLE_RATE = 12800
FFT_SIZE = 32768
import socket
UDP_IP = "127.0.0.1"
UDP_PORT = 5005
MESSAGE = "Hello, World!"
sock = socket.socket(socket.AF_INET, # Internet
socket.SOCK_DGRAM) # UDP
sock.sendto(MESSAGE, (UDP_IP, UDP_PORT))
3-d
** **** **** ** ****** ****
*** */// * *///** *** /*//// */// *
//** / /* /* */*//** /***** /* /*
/** *** /* * /* /** ///// */ ****
/** *// **/** /* /** ** /* */// *
/** * // /* /* /** // * /*/* /*
****/****** **/ **** **** **/ **** / ****
//// ////// // //// //// // //// ////
3x5
@ati
ati / MS5611.patch
Created December 5, 2016 14:14
Replace hardcoded i2c address with initialization variable
From e031c8978c7a62b90146d669b26f5c738610c709 Mon Sep 17 00:00:00 2001
From: Alexander Nikolaev <variomap@gmail.com>
Date: Sat, 3 Dec 2016 17:01:45 +0000
Subject: [PATCH] Replaced hardcoded i2c address with configuration variable
---
python/MS5611.py | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/python/MS5611.py b/python/MS5611.py
@ati
ati / gist:8ee798e5a2a7a1f61fedb53860845bda
Last active March 16, 2017 15:59
Списко дополнительного оборудования для проекта "Радионебо".
Error: Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node.
at ur (https://mokum.place/assets/application-08c9f95d4db9fbfaea2fb4354dabcb350716f86d186e8f4fac10c87e29fcd8b8.js:19:5736)
at hr (https://mokum.place/assets/application-08c9f95d4db9fbfaea2fb4354dabcb350716f86d186e8f4fac10c87e29fcd8b8.js:19:8327)
at gr (https://mokum.place/assets/application-08c9f95d4db9fbfaea2fb4354dabcb350716f86d186e8f4fac10c87e29fcd8b8.js:19:10590)
at https://mokum.place/assets/application-08c9f95d4db9fbfaea2fb4354dabcb350716f86d186e8f4fac10c87e29fcd8b8.js:19:23786
at Object.t.unstable_runWithPriority (https://mokum.place/assets/application-08c9f95d4db9fbfaea2fb4354dabcb350716f86d186e8f4fac10c87e29fcd8b8.js:20:32457)
at Wr (https://mokum.place/assets/application-08c9f95d4db9fbfaea2fb4354dabcb350716f86d186e8f4fac10c87e29fcd8b8.js:19:23720)
at qr (https://mokum.place/assets/application-08c9f95d4db9fbfaea2fb4354dabcb350716f86d186e8f4fac10c87e29fcd8b8.js:19:23495)