Skip to content

Instantly share code, notes, and snippets.

View itpcc's full-sized avatar
😶
Planting commit forest...

Rachasak Ragkamnerd itpcc

😶
Planting commit forest...
View GitHub Profile
#include <AntoIO.h>
#include <dht11.h>
#define DHT11PIN 12
#define GPIO15 15
dht11 DHT11;
// change ssid and password to yours
const char* ssid = "aisfibre2704_2.4G";
const char* password = "6FF56B76";
#!/usr/bin/python
# -*- coding: utf-8 -*-
import os
import Tkinter
import tkFileDialog
from PIL import Image
import ImageDraw
import PIL.ImageOps
__DEFAULT_VAR_NAME__ = "var1"
@itpcc
itpcc / OLED_PROGMEM_Example1.cpp
Last active February 10, 2016 17:21
Example of using PROGMEM and making image transition by delay
if(millis()-lastCheckEPOCH > 200){
for(i = 0; i < 128; i++)
bitmapBuffer[i] = pgm_read_byte(&sawasdee[(rowDisplay*128)+i]);
OLED.LED_PrintBMP(0, rowDisplay, 127, rowDisplay, bitmapBuffer);
lastCheckEPOCH = millis();
Serial.print("rowDisplay : "); Serial.println(rowDisplay);
rowDisplay++;
}
var youtubeScriptTag = document.createElement('script');
youtubeScriptTag.src = "https://www.youtube.com/iframe_api";
var firstScriptTag = document.getElementsByTagName('script')[0];
firstScriptTag.parentNode.insertBefore(youtubeScriptTag, firstScriptTag);
var deviceRatio = ($(document).width())/($(document).height());
$(window).resize(function(){
var currDeviceRatio = ($(document).width())/($(document).height());
if(currDeviceRatio != deviceRatio && youtubePlayer && typeof youtubePlayer.stopVideo !== "undefined"){
var fullpageOption = {
scrollOverflow: true,
onLeave: function(index, nextIndex, direction){
var cntAllSlide = $("#fullpage .section").length;
console.log('From ->', index, 'to ->', nextIndex, 'All ->', cntAllSlide);
if(cntAllSlide > 4 && nextIndex >= cntAllSlide && index == cntAllSlide-1 && isCongreat && youtubePlayer && typeof youtubePlayer == "object" && typeof youtubePlayer.playVideo !== "undefined"){
youtubePlayer.setVolume(30);
youtubePlayer.playVideo();
isCongreat = false;
}else if(youtubePlayer && typeof youtubePlayer == "object" && typeof youtubePlayer.stopVideo !== "undefined"){
<!DOCTYPE html>
<html ng-app>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1.0, user-scalable=no">
<meta name="msapplication-TileColor" content="#32004b">
<meta name="msapplication-TileImage" content="http://27.comcamp.in.th/assets/img/icon/mstile-144x144.png">
<meta name="msapplication-config" content="http://27.comcamp.in.th/assets/img/icon/browserconfig.xml">
<meta property="og:title" content="Comcamp #27"/>