This file contains hidden or 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
#include <PinChangeInterrupt.h> | |
/* | |
* Define pins used to provide RC PWM signal to Arduino | |
* Pins 8, 9 and 10 are used since they work on both ATMega328 and | |
* ATMega32u4 board. So this code will work on Uno/Mini/Nano/Micro/Leonardo | |
* See PinChangeInterrupt documentation for usable pins on other boards | |
*/ | |
const byte channel_pin[] = {8, 9, 10}; | |
volatile unsigned long rising_start[] = {0, 0, 0}; |
This file contains hidden or 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
import RPi.GPIO as GPIO | |
import time | |
def main(): | |
# GPIO.setwarnings(False) | |
GPIO.setmode(GPIO.BCM) | |
GPIO.setup(18, GPIO.OUT) | |
GPIO.output(18, GPIO.HIGH) |
This file contains hidden or 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
#include <Servo.h> | |
Servo servo; | |
const int PIN_BUTTON = 6; | |
const int PIN_SERVO = 5; | |
int pos = 1500; | |
int prevButtonState = HIGH; |
This file contains hidden or 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
<?php | |
/* | |
OCP - Opcache Control Panel (aka Zend Optimizer+ Control Panel for PHP) | |
Author: _ck_ (with contributions by GK, stasilok) | |
Version: 0.1.6 | |
Free for any kind of use or modification, I am not responsible for anything, please share your improvements | |
* revision history | |
0.1.6 2013-04-12 moved meta to footer so graphs can be higher and reduce clutter | |
0.1.5 2013-04-12 added graphs to visualize cache state, please report any browser/style bugs |
This file contains hidden or 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
//**************************************************************** | |
// 0=16ms, 1=32ms,2=64ms,3=128ms,4=250ms,5=500ms | |
// 6=1 sec,7=2 sec, 8=4 sec, 9= 8sec | |
void setup_watchdog(int ii) { | |
byte bb; | |
int ww; | |
if (ii > 9 ) ii=9; | |
bb=ii & 7; | |
if (ii > 7) bb|= (1<<5); |
This file contains hidden or 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
void enterSleep(void) { | |
set_sleep_mode(SLEEP_MODE_PWR_DOWN); | |
sleep_enable(); | |
sleep_mode(); | |
sleep_disable(); | |
} |
This file contains hidden or 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
import RPi.GPIO as GPIO | |
import time | |
def main(): | |
# GPIO.setwarnings(False) | |
GPIO.setmode(GPIO.BCM) | |
GPIO.setup(18, GPIO.OUT) | |
GPIO.output(18, GPIO.HIGH) | |
time.sleep(5); |
This file contains hidden or 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
@Override | |
public void onResume() { | |
super.onResume(); | |
Tracker t = ((PogodaApplication) getApplication()).getTracker(); | |
t.setScreenName("ForecastActivity"); | |
t.send(new HitBuilders.AppViewBuilder().build()); | |
} |
This file contains hidden or 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
<application | |
android:logo="@drawable/ab_icon" | |
android:label="@string/app_name" | |
android:name=".PogodaApplication" | |
android:icon="@drawable/ic_launcher"> |
This file contains hidden or 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
package pl.spychalski.WeatherStation; | |
import android.app.Application; | |
import com.google.android.gms.analytics.GoogleAnalytics; | |
import com.google.android.gms.analytics.Tracker; | |
public class PogodaApplication extends Application { | |
private Tracker appTracker = null; |