Skip to content

Instantly share code, notes, and snippets.

View moomdate's full-sized avatar
🍋
~/.profile

moomdate moomdate

🍋
~/.profile
  • bangkok
View GitHub Profile
#include <SoftwareSerial.h>
#include <Servo.h>
#include <PWM.h>
byte countByte = 0;
int byteTemp[4];
bool change = false;
int tt = 0;
int serAng = 90;
int serAngy = 90;
// Example By ArduinoAll
// more info https://www.arduinoall.com/b/141
#include <SoftwareSerial.h>
#include <Servo.h>
byte countByte = 0;
byte byteTemp[3];
byte tt;
int serAng = 90;
int serAngy = 90;
int ppx = 0;
#include<stdio.h>
#include<string.h>
#include <stdlib.h>
#define EndSign ':'
#define MarkMaxBufferPage 20
int searchName(char * fileName); // search file
void filterPageToArray(int pS,int pE); // data string to num array
int getEndSign(int startAt); //get position of end string
int MarkerPage[MarkMaxBufferPage]; // buffer
void printfPageOfMarker(char *); // print lst
#include<stdio.h>
#include<string.h>
#include <stdlib.h>
#define EndSign ':'
#define MarkMaxBufferPage 20
void searchName(char * fileName); // search file
void filterPageToArray(int pS,int pE); // data string to num array
int getEndSign(int startAt); //get position of end string
int MarkerPage[MarkMaxBufferPage]; // buffer
void printfPageOfMarker(); // print lst
#define BAUD 9600
#include <avr/io.h>
#include <util/delay.h>
#include <util/setbaud.h>
void uart_init(void) {
UBRR0H = UBRRH_VALUE;
UBRR0L = UBRRL_VALUE;
#if USE_2X
UCSR0A |= _BV(U2X0);
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
pinMode(A0, INPUT);
}
float u, y;
int p = 0;
void loop() {
u = (float)analogRead(0) * 5;
var header = Array(); var jsonData = {};
$("html body table tbody tr td table tbody tr td font a").each(function (i, v) {
header[i] = $(this).attr("href");
})
for (var i = 0; i < header.length; i++) {
var data = header[i];
var courseId = data.split("=")[3].split("&")[0];
var courseCode = data.split("=")[4].split("&")[0];
//var courseId = data.split("a");
if (courseCode.length > 3) {
#include <stdio.h>
#include <string.h>
#define lineLR 2 // 0xa,0d
#define maxSizeInLine 41
#define sectorSize maxSizeInLine*4
#define maxLine 97
char data[maxLine][maxSizeInLine]; // line * char num
char buffer;
int maxString = 50;
/*
This example is meant to be used as a starting point
for working with Anto.io services
2017/06/17
by Anto.io team
*/
#include <AntoIO.h>
@moomdate
moomdate / gg.ino
Last active September 23, 2017 14:03
gg
for(int i = 0; i < data; i++){
for(int j = 0; j < data; j++){
if(!(j<2 || i<2 || i>=data-2 || j>=data-2)){
System.out.print(" X");
}else{
System.out.print(" ");
}
}