Skip to content

Instantly share code, notes, and snippets.

View detik19's full-sized avatar

Tedy Tri Saputro detik19

View GitHub Profile
int LED_BUILTIN = 2;
void setup() {
pinMode (LED_BUILTIN, OUTPUT);
}
void loop() {
digitalWrite(LED_BUILTIN, HIGH);
delay(1000);
digitalWrite(LED_BUILTIN, LOW);
delay(1000);
}
@detik19
detik19 / main.c
Created February 1, 2019 03:14
Blink led AVR
#include <avr/io.h>
#include <util/delay.h>
#define F_CPU 12000000UL
int main(void)
{
DDRD=0xFF;
while(1)
{
PORTD=0xFF;
#include <avr/io.h>
#include <util/delay.h>
#define F_CPU 12000000UL
int main(void)
{
DDRD=0xFF;
while(1)
{
PORTD=0xFF;
void setup() {
pinMode(LED_BUILTIN, OUTPUT); // Initialize the LED_BUILTIN pin as an output
}
// the loop function runs over and over again forever
void loop() {
digitalWrite(LED_BUILTIN, LOW); // Turn the LED on (Note that LOW is the voltage level
// but actually the LED is on; this is because
// it is acive low on the ESP-01)
package com.subrutin.java11;
public class Test {
public static void main(String[] args) {
var x=1;
System.out.println(x);
}
}
/******************************************************************************
MLX90614_Serial_Demo.ino
Serial output example for the MLX90614 Infrared Thermometer
This example reads from the MLX90614 and prints out ambient and object
temperatures every half-second or so. Open the serial monitor and set the
baud rate to 9600.
Hardware Hookup (if you're not using the eval board):
MLX90614 ------------- Arduino
#define LED_A 3
#define LED_B 4
#define LED_C 5
#define LED_D 6
#define BUTTON_A 9
#define BUTTON_B 10
#define BUTTON_C 11
#define BUTTON_D 12
void setup(){
#define trigPin 11
#define echoPin 12
#define led 11
#define led2 10
void setup() {
Serial.begin (9600);
pinMode(trigPin, OUTPUT);
pinMode(echoPin, INPUT);
//*****************************************************************************
//
// blinky.c - Simple example to blink the on-board LED.
//
// Copyright (c) 2011-2017 Texas Instruments Incorporated. All rights reserved.
// Software License Agreement
//
// Texas Instruments (TI) is supplying this software for use solely and
// exclusively on TI's microcontroller products. The software is owned by
// TI and/or its suppliers, and is protected under applicable copyright
@detik19
detik19 / main.py
Last active December 16, 2018 03:28
from machine import Pin
from time import sleep
led = Pin(2, Pin.OUT)
while True:
led.value(not led.value())
sleep(2)