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
float Vout = 0.0; // 아두이노에 들어오는 전압 | |
float Vin = 0.0; // 실제 전압 | |
float R1 = 30000.0; // 1번 저항의 값 선언 | |
float R2 = 7500.0; // 2번 저항의 값 선언 | |
int sensorValue = 0; // 전압 측정 센서 변수 선언 | |
void setup() { | |
Serial.begin(9600); // 컴퓨터랑 통신하기 위한 시리얼 모니터 사용 설정 | |
pinMode(A0, INPUT); | |
} |
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
boolean onErasing = false; | |
String buttonColor = "white"; | |
int[][] redCircle = new int [41][41]; | |
int[][] greenCircle = new int [41][41]; | |
int[][] blueCircle = new int [41][41]; | |
void setup() { | |
size(640, 360); | |
background(0); | |
//redCircle X |
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
🌞 Morning 91 commits ██▉░░░░░░░░░░░░░░░░░░ 13.8% | |
🌆 Daytime 167 commits █████▎░░░░░░░░░░░░░░░ 25.3% | |
🌃 Evening 206 commits ██████▌░░░░░░░░░░░░░░ 31.3% | |
🌙 Night 195 commits ██████▏░░░░░░░░░░░░░░ 29.6% |
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 <MechaQMC5883.h> | |
#include <SoftwareSerial.h> | |
int BT_RX = 2; | |
int BT_TX = 3; | |
SoftwareSerial HM10(BT_RX, BT_TX); | |
MechaQMC5883 qmc; | |
void setup() { |
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 SENSOR = 0; // the analog pin connected to the sensor | |
void setup() { | |
Serial.begin(9600); //시리얼 모니터 사용을 위한 초기화 | |
} | |
void loop() { | |
int value = analogRead(SENSOR); // 센서에서 아날로그 read 로 값을 가져와서 int value 에 저장 | |
Serial.println(value); | |