일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | |
7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 | 29 | 30 | 31 |
- 코테
- 개인프로젝트
- 주가예측
- Python
- java정리
- 풀스택프레임워크
- 프로그래밍
- 코딩독학
- 코스닥
- 개발
- SNS
- java
- 백준
- 코딩테스트
- Project
- 이웃한 칸
- 자바
- 프로그래머스
- 개발자
- 자바정리
- frontend
- backend
- 빅데이터
- 코딩
- C++
- 사물인터넷
- 자바독학
- Reflex
- 프로그램
- 모의 주식
- Today
- Total
목록Arduino(C,C++) (20)
Creative Code
#define V0 5.0 #define unit V0/1024 #define R1 10000.0 const int Xin = A0; const int Yin = A1; const int KEYin = 3; void setup() { // put your setup code here, to run once: Serial.begin(115200); pinMode(KEYin,INPUT_PULLUP); // 칩 내부에 있는 pull up 저항을 사용 } void loop() { // put your main code here, to run repeatedly: int Xval = analogRead(Xin); int Yval = analogRead(Yin); int buttonval = digitalRead(..
#define V0 5.0 #define unit V0/1024 #define R1 10000.0 const int Xin = A0; const int Yin = A1; const int KEYin = 3; void setup() { // put your setup code here, to run once: Serial.begin(115200); pinMode(KEYin,INPUT_PULLUP); // 칩 내부에 있는 pull up 저항을 사용 } void loop() { // put your main code here, to run repeatedly: int Xval = analogRead(Xin); int Yval = analogRead(Yin); int buttonval = digitalRead(..
#define V0 5.0 #define unit V0/1024 #define R1 10000.0 const int led_0 = 3; const int analogPin = A0; void setup() { // put your setup code here, to run once: Serial.begin(115200); pinMode(led_0,OUTPUT); } void loop() { // put your main code here, to run repeatedly: int analogValue = analogRead(analogPin); float V2 = analogValue * unit; Serial.println(analogValue); analogWrite(led_0,map(analogVa..
#define V0 5.0 #define unit V0/1024 #define R1 10000.0 const int analogPin = A0; void setup() { // put your setup code here, to run once: Serial.begin(115200); } void loop() { // put your main code here, to run repeatedly: int analogValue = analogRead(analogPin); // analogpin에 연결했을때 float V2 = analogValue * unit; float R2 = V2 * R1 / (V0 - V2); Serial.print(analogValue); Serial.print(", "); Seri..
#include "PinChangeInterrupt.h" const int led[6] = {8,9,10,11,12,13}; const int SW_0 = 4; int cnt =0; void SW0_Pressed(void) { for (int i = 0; i
const int SW_0 = 2; const int led_0 = 13; const int SW_1 = 3; const int led_1 = 12; int led_flag_0 = 0; // 0 : OFF , 1 : ON int led_flag_1 = 0; //사용자 함수 void SW0_Pressed(void) { if (led_flag_0 == 0) { } else { digitalWrite(led_0,LOW); led_flag_0 = 0; } } void SW1_Pressed(void) { if (led_flag_1 == 0) { digitalWrite(led_1,HIGH); led_flag_1 =1; } else { digitalWrite(led_1,LOW); led_flag_1 = 0; } } ..