This file contains 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
/************************************************************* | |
Download latest Blynk library here: | |
https://github.com/blynkkk/blynk-library/releases/latest | |
Blynk is a platform with iOS and Android apps to control | |
Arduino, Raspberry Pi and the likes over the Internet. | |
You can easily build graphic interfaces for all your | |
projects by simply dragging and dropping widgets. | |
Downloads, docs, tutorials: http://www.blynk.cc |
This file contains 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
int main(void) { | |
unsigned long side; // Chieu dai cua can phong | |
unsigned long area; // Dien tich can phong | |
UART_Init(); // Gọi ham de init uart | |
side = 3; | |
area = side*side; | |
printf("\nDien tich cua can phong chieu dai %ld m la %ld m2\n",side,area); | |
} |
This file contains 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. Documentation Section | |
// This program calculates the area of square shaped rooms | |
// Author: Ramesh Yerraballi & Jon Valvano | |
// Date: 6/28/2013 | |
// | |
// 1. Pre-processor Directives Section | |
#include <stdio.h> // Diamond braces for sys lib: Standard I/O | |
#include "uart.h" // Quotes for user lib: UART lib | |
// 2. Global Declarations section |
This file contains 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
uint32_t counter_1ms; | |
void Delay_ns(__IO uint32_t nCount) | |
{ | |
while(nCount--) | |
{ | |
} | |
} |
This file contains 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 <ESP8266WiFi.h> | |
#include <FirebaseArduino.h> | |
#define FIREBASE_HOST "hocarm1.firebaseio.com" //Thay bằng địa chỉ firebase của bạn | |
#define FIREBASE_AUTH "" //Không dùng xác thực nên không đổi | |
#define WIFI_SSID "ten_wifi" //Thay wifi và mật khẩu | |
#define WIFI_PASSWORD "mat_khau" | |
void setup() { | |
Serial.begin(9600); | |
WiFi.begin(WIFI_SSID, WIFI_PASSWORD); |
This file contains 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
/* | |
This sketch shows an example of sending a reading to data.sparkfun.com once per day. | |
It uses the Sparkfun testing stream so the only customizing required is the WiFi SSID and password. | |
The Harringay Maker Space | |
License: Apache License v2 | |
*/ | |
#include <NTPtimeESP.h> |
This file contains 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 <Wire.h> | |
#include <SPI.h> | |
#include "RTClib.h" | |
RTC_DS1307 RTC; | |
void setup () { | |
Wire.begin(4, 5); // Chan 4,5 I2C cua ESP8266 | |
RTC.begin(); // Khoi dong RTC | |
delay(500); | |
// Dong bo thoi gian voi may tinh |
This file contains 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
CC=gcc | |
CFLAGS=-I. | |
hellomake: hellomake.c hellofunc.c | |
$(CC) -o hellomake hellomake.c hellofunc.c -I. |
This file contains 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
/* Hello World Example | |
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> | |
#include "freertos/FreeRTOS.h" |
This file contains 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
// | |
// Copyright 2015 Google Inc. | |
// | |
// Licensed under the Apache License, Version 2.0 (the "License"); | |
// you may not use this file except in compliance with the License. | |
// You may obtain a copy of the License at | |
// | |
// http://www.apache.org/licenses/LICENSE-2.0 | |
// | |
// Unless required by applicable law or agreed to in writing, software |