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
/* | |
PROJECT: ArduDroid | |
PROGRAMMER: Hazim Bitar (techbitar at gmail dot com) | |
DATE: Oct 31, 2013 | |
FILE: ardudroid.ino | |
LICENSE: Public domain | |
*/ | |
#define START_CMD_CHAR '*' | |
#define END_CMD_CHAR '#' |
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/python | |
import sys | |
import time | |
import datetime | |
import requests | |
import Adafruit_DHT | |
from time import gmtime, strftime | |
sensor = Adafruit_DHT.DHT22 | |
pin = 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
[Unit] | |
Description=Hello Express Service | |
After=mongod.service | |
[Service] | |
Restart=always | |
StandardOutput=syslog | |
StandardError=syslog | |
SyslogIdentifier=node-hello | |
Environment=NODE_ENV=production |
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 python | |
# -*- coding: utf-8 -*- | |
from time import sleep | |
from ds18b20 import DS18B20 | |
def main(): | |
sensor = DS18B20() | |
while True: |
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/python | |
import RPi.GPIO as GPIO | |
import time | |
# blinking function | |
def blink(pin): | |
GPIO.output(pin,GPIO.HIGH) | |
time.sleep(1) | |
GPIO.output(pin,GPIO.LOW) | |
time.sleep(1) |
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
<!DOCTYPE html> | |
<html lang=""> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<title>Title Page</title> | |
<script src="components/bower_components/platform/platform.js"></script> | |
<link rel="import" href="components/bower_components/paper-elements/paper-elements.html"> | |
<link rel="import" href="components/bower_components/core-toolbar/core-toolbar.html"> |
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
<!DOCTYPE html> | |
<html lang=""> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<title>Title Page</title> | |
<script src="components/bower_components/platform/platform.js"></script> | |
<link rel="import" href="components/bower_components/paper-elements/paper-elements.html"> | |
<link rel="import" href="components/bower_components/core-toolbar/core-toolbar.html"> |
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
#define START_CMD_CHAR '*' | |
#define END_CMD_CHAR '#' | |
#define DIV_CMD_CHAR '|' | |
#define CMD_DIGITALWRITE 10 | |
#define CMD_ANALOGWRITE 11 | |
#define CMD_TEXT 12 | |
#define CMD_READ_ARDUDROID 13 | |
#define MAX_COMMAND 20 // max command number code. used for error checking. | |
#define MIN_COMMAND 10 // minimum command number code. used for error checking. | |
#define IN_STRING_LENGHT 40 |
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
public void setup() { | |
textView1 = (TextView) findViewById(R.id.textView1); | |
textView2 = (TextView) findViewById(R.id.textView2); | |
textView3 = (TextView) findViewById(R.id.textView3); | |
textView4 = (TextView) findViewById(R.id.textView4); | |
textView5 = (TextView) findViewById(R.id.textView5); | |
layout_joystick = (RelativeLayout) findViewById(R.id.layout_joystick); |