Skip to content

Instantly share code, notes, and snippets.

View tedysaputro's full-sized avatar

Tedy tedysaputro

  • Indonesia
View GitHub Profile
@tedysaputro
tedysaputro / main.py
Created May 31, 2019 17:47
GPIO Pin MicroPython
from machine import Pin
from time import sleep
led = Pin(2, Pin.OUT)
button = Pin(4, Pin.IN)
while True:
led.value(button.value())
sleep(0.1)
@tedysaputro
tedysaputro / main.py
Created May 31, 2019 17:47
GPIO Pin MicroPython
from machine import Pin
from time import sleep
led = Pin(2, Pin.OUT)
button = Pin(4, Pin.IN)
while True:
led.value(button.value())
sleep(0.1)
@tedysaputro
tedysaputro / main.py
Created May 31, 2019 17:47
GPIO Pin MicroPython
from machine import Pin
from time import sleep
led = Pin(2, Pin.OUT)
button = Pin(4, Pin.IN)
while True:
led.value(button.value())
sleep(0.1)
@tedysaputro
tedysaputro / running text.ino
Created April 13, 2019 13:07
Running text led dot matrix
// Use the Parola library to scroll text on the display
//
// Demonstrates the use of the scrolling function to display text received
// from the serial interface
//
// User can enter text on the serial monitor and this will display as a
// scrolling message on the display.
// Speed for the display is controlled by a pot on SPEED_IN analog in.
// Scrolling direction is controlled by a switch on DIRECTION_SET digital in.
// Invert ON/OFF is set by a switch on INVERT_SET digital in.
@tedysaputro
tedysaputro / hello.ino
Created April 13, 2019 12:54
test dot matrix module
// Program to demonstrate the MD_Parola library
//
// Uses the Arduino Print Class extension with various output types
//
// MD_MAX72XX library can be found at https://github.com/MajicDesigns/MD_MAX72XX
//
#include <MD_Parola.h>
#include <MD_MAX72xx.h>
#include <SPI.h>
@tedysaputro
tedysaputro / user_main.c
Created April 12, 2019 17:03
RTOS SDK ESP8266
/*
This example code is in the Public Domain (or CC0 licensed, at your option.)
Unless required by applicable law or agreed to in writing, this
software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
CONDITIONS OF ANY KIND, either express or implied.
*/
#include <stdio.h>
@tedysaputro
tedysaputro / main.cpp
Created March 7, 2019 16:16
HelloOpenCV3
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <iostream>
using namespace cv;
using namespace std;
int main( int argc, char** argv )
{
@tedysaputro
tedysaputro / main.c
Created February 12, 2019 22:52
RGB Blink
/*
* main.c
*
* Created on: 13 Feb 2019
* Author: tedy.saputro
*/
#include <stdio.h>
#include <stdint.h>
@tedysaputro
tedysaputro / init.js
Created February 10, 2019 02:27
modified mongoose os
load('api_aws.js');
load('api_azure.js');
load('api_config.js');
load('api_dash.js');
load('api_events.js');
load('api_gcp.js');
load('api_gpio.js');
load('api_mqtt.js');
load('api_shadow.js');
load('api_timer.js');
#include <stdio.h>
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "esp_system.h"
#include "esp_spi_flash.h"
void app_main()
{
printf("Hello world!\n");
/* Print chip information */