Skip to content

Instantly share code, notes, and snippets.

Kouji Nakashima kuc-arc-f

Block or report user

Report or block kuc-arc-f

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
@kuc-arc-f
kuc-arc-f / webhook.py
Created Nov 15, 2017
webhook (python27 ) GoogleHome +Iot( sensor data ) with dialogFlow
View webhook.py
# -*- coding: utf-8 -*-
# 日本語
from urllib2 import urlopen
import webapp2
import json
import os
import sys
import traceback
import com_func
@kuc-arc-f
kuc-arc-f / wt-api.php
Created Oct 27, 2017
IoT data seve API (php) for GoogleHome
View wt-api.php
<?php
// $file = 'dat/rest-data.json';
class AppConst {
var $val01 = 'val01_###';
var $mDir='dat';
var $mExtName ='.json';
var $mOK_CODE=1;
var $mNG_CODE=0;
@kuc-arc-f
kuc-arc-f / webhook.py
Created Oct 25, 2017
GoogleHome- Dialogflow (webhook) ,read Sensor value API (python )
View webhook.py
# -*- coding: utf-8 -*-
# 日本語
from urllib2 import urlopen
import webapp2
import json
import os
#define
mDnsName="http://your-DNS.jp"
#
@kuc-arc-f
kuc-arc-f / main.cpp
Created Oct 3, 2017
microbit-adc-2/main.cpp, micro:bit adc read, P0
View main.cpp
//microbit-adc-2/main.cpp
#include "mbed.h"
#include <stdio.h>
#include <string>
Serial mPc(USBTX, USBRX);
AnalogIn mySensor(P0_3 );
//
@kuc-arc-f
kuc-arc-f / main.cpp
Created Oct 3, 2017
BLE_GAP_Example2/main.cpp ,micro:bit BLE driver , advertising
View main.cpp
// BLE_GAP_Example2/main.cpp
/* mbed Microcontroller Library
* Copyright (c) 2006-2015 ARM Limited
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
@kuc-arc-f
kuc-arc-f / RN4020_sv2_0_9_3_bat1-b2.ino
Last active Sep 20, 2017
RN4020 +atmega328 driver, Low power version
View RN4020_sv2_0_9_3_bat1-b2.ino
/*
SoftwareSerial, RN4020 BLE (Low Power version)
with Central= raspBerryPi , pubAddr version
Sensor 3V3 switch add, battery =1 QTY
v 0.9.03 - Beta-2
*/
#include <avr/sleep.h>
#include <avr/wdt.h>
#include <SoftwareSerial.h>
SoftwareSerial mySerial(5, 6 ); /* RX:D5, TX:D6 */
@kuc-arc-f
kuc-arc-f / RN4020_sv2_0_9_3_bat1.ino
Created Sep 19, 2017
Rn4020+ atmega328 BLE driver, Low power version battery= 1
View RN4020_sv2_0_9_3_bat1.ino
/*
SoftwareSerial, RN4020 BLE (Low Power version)
with Central= raspBerryPi , pubAddr version
Sensor 3V3 switch add, battery =1 QTY
v 0.9.03
*/
#include <avr/sleep.h>
#include <avr/wdt.h>
#include <SoftwareSerial.h>
SoftwareSerial mySerial(5, 6 ); /* RX:D5, TX:D6 */
@kuc-arc-f
kuc-arc-f / RN4020_sv2_0_9_3_moi.ino
Created Sep 14, 2017
RN4020 +atmega328 driver ,moisture Sensor
View RN4020_sv2_0_9_3_moi.ino
/*
SoftwareSerial, RN4020 BLE (Low Power version)
with Central= raspBerryPi , pubAddr version
Sensor 3V3 ,moistuire power switch add
v 0.9.03
*/
#include <avr/sleep.h>
#include <avr/wdt.h>
#include <SoftwareSerial.h>
SoftwareSerial mySerial(5, 6 ); /* RX:D5, TX:D6 */
@kuc-arc-f
kuc-arc-f / RN4020_sv2_0_9_3_SenSw.ino
Created Sep 14, 2017
RN4020 + atmega328 BLE driver, Low power /Sensor power Switch add
View RN4020_sv2_0_9_3_SenSw.ino
/*
SoftwareSerial, RN4020 BLE (Low Power version)
with Central= raspBerryPi , pubAddr version
Sensor 3V3 ,switch add
v 0.9.03
*/
#include <avr/sleep.h>
#include <avr/wdt.h>
#include <SoftwareSerial.h>
SoftwareSerial mySerial(5, 6 ); /* RX:D5, TX:D6 */
@kuc-arc-f
kuc-arc-f / LM60BIZ.ino
Last active Sep 13, 2017
arduino 3V3, LM60BIZ Sensor driver
View LM60BIZ.ino
//define
const int mVoutPin = 0;
uint32_t mTimerTmp;
//
long convert_Map(long x, long in_min, long in_max, long out_min, long out_max) {
return (x - in_min) * (out_max - out_min) / (in_max - in_min) + out_min;
}
//
You can’t perform that action at this time.