반응형

아두이노메가 LCD 3

블루투스 아두이노 메가 연결 테스트 Arduino Mega2560 과 Bluetooth 연결

아두이노 메가 2560의 TX1, RX1 핀 -핀번호 18, 19번-을 블루투스 모듈 HC-06 의 RX, TX 와 연결한다. 아래 소스코드를 업로드 하고 실행한다. 123456789101112131415161718192021//Bluetooth 모듈 HC-06 Test Program // Android APP is BT Chat App void setup() { // put your setup code here, to run once: Serial.begin(9600); Serial.println("Hello!"); Serial1.begin(9600);} void loop() { // put your main code here, to run repeatedly: if (Serial1.available(..

개발자/Arduino 2018.03.17

아두이노 메가 2560 1602 캐릭터 LCD 실습 코드

이것도 안되다가 다시 다 분리하고 해보니 잘 나온다. 코드와 실습 사진을 첨부한다. 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061/* LiquidCrystal Library - Hello WorldDemonstrates the use a 16x2 LCD display. The LiquidCrystallibrary works with all LCD displays that are compatible with the Hitachi HD44780 driver. There are many of them out there, and youcan usually ..

개발자/Arduino 2018.03.14

아두이노 메가 2560에서 스텝모터 회전 실습

스텝모터 회전 - 연결도 그렇고, 이상 작동으로 고생하다 제대로 연결하고 해봤더니 잘되었다. 분당 회전수도 15로 낮추고 정방향 역방향 회전 변환시 딜레이도 약간 길게 주었더니 잘 된다. 소스코드 하고 실습 사진 첨부한다. 1234567891011121314#include // Stepper.h 라이브러리 불러오기 (기본 라이브러리)Stepper step1(2048, 14, 16, 15, 17); // 모터드라이버 8, 9, 10, 11번에 연결int lap = 2048; // 2048당 한바퀴(360도) 회전 void setup() { step1.setSpeed(15); // 회전속도 (분당 18회 회전)} void loop() { step1.step(lap); // 오른쪽으로 한바퀴 회전 delay(..

개발자/Arduino 2018.03.14
반응형