embeded/arduino(genuino)2020. 3. 9. 20:58

원래 값으로 읽어 보니 0~1023 사이의 값으로만 읽혀 온다.

10bit ADC 라 그런가?

 

#include <LiquidCrystal.h>

// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
int potpin = 0;
int val;

void setup() {
  // set up the LCD's number of columns and rows:
  lcd.begin(16, 2);
  // Print a message to the LCD.
  lcd.leftToRight();
}

void loop() {
  char str[20];
  val = analogRead(potpin);
//  val = map(val, 0, 1023, 0, 180);
  sprintf(str, "%5d", val);
  
  lcd.setCursor(0, 0);
  lcd.print(str);
}

[링크 : https://www.arduino.cc/en/tutorial/knob]

 

아무튼 겸사겸사 CLCD 밝기 조정도 겸사겸사 성공!

 

+

도대체.. 돈들여서 커다란 가변저항이랑 노브는 왜 샀을까.. 그냥 있던걸로 해볼 걸 ㅠㅠ

'embeded > arduino(genuino)' 카테고리의 다른 글

RGB LED 저항값  (0) 2020.03.14
arduino servo / knob 예제 실행  (0) 2020.03.09
arduino nano + CLCD  (0) 2020.03.07
arduino ide ubuntu에서 한글 깨질때  (0) 2020.02.17
e-paper 모듈 (아두이노 HAT)  (0) 2019.04.17
Posted by 구차니
embeded/arduino(genuino)2020. 3. 7. 10:46

와... 이렇게 편하게 하는데 예전에는 왜 일일이 라이브러리를 만들려고 개고생을 했던 걸까?

일단 CLCD는 16x2 라서 생각외로 출력가능한 메시지가 길지가 않아서 아쉽네

 

하드웨어 구성은 가변 저항쪽에 0 V를 인가하면 가장 어둡게 표현되는 듯?

(그러니까 저항으로 최대치를 하면 어두워 지는 식으로 0 Voltage로 설정되는 것으로 보임)

 

화이트 밸런스가 하늘로 날아가면서 액정 배경이 붉은색으로 나왔으나 실제로는 파란색에 가까움

 

1번 핀 부터(좌->우)

GND / VCC / 밝기(GND=MAX) / RS / RW(GND) / E + 데이터(4비트 혹은 8비트)

 

#include <LiquidCrystal.h>

// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

void setup() {
  // set up the LCD's number of columns and rows:
  lcd.begin(16, 2);
  // Print a message to the LCD.
  lcd.leftToRight();

  lcd.setCursor(0, 0);
  lcd.print("T:-10C H:100% R:50% PM12");

  lcd.setCursor(0, 1);
  lcd.print("PM1:100 PM25:100");
}

void loop() {
  // set the cursor to column 0, line 1
  // (note: line 1 is the second row, since counting begins with 0):
  lcd.setCursor(0, 1);
  // print the number of seconds since reset:
  delay(500);
  lcd.scrollDisplayLeft();
  //  lcd.print(millis() / 1000);
}

[링크 : https://www.arduino.cc/en/Tutorial/HelloWorld]

 

텍스트 방향은 아랍어 처럼 우->좌로 쓰는 경우에나 쓸모가 있을 듯.

[링크 : https://www.arduino.cc/en/Tutorial/LiquidCrystalTextDirection]

 

얘가 내가 원하던 텍스트 스크롤 기능.

다만, 전체 화면을 다 비울 정도 까지 스크롤 된 다음

다시 텍스트가 나와서 한참 있다 다시 나오니 조금 불편하지만 그래도 무한 반복으로 16 보다 긴 문자열도

자동으로 슬라이드 되어서 나오니 의외로 쓸모가 있을 듯?

[링크 : https://www.arduino.cc/en/Tutorial/LiquidCrystalScroll]

 

프로세서를 ATmega329P(Old Bootloader) 라고 해주어야지

프로그래머 "Arduino as ISP" 로 설정했을때 구워진다. 2016년 즈음부터 바뀐듯?

[링크 : https://www.diymaker.net/121]

'embeded > arduino(genuino)' 카테고리의 다른 글

arduino servo / knob 예제 실행  (0) 2020.03.09
arduino knob 변형 adc 값 읽기  (0) 2020.03.09
arduino ide ubuntu에서 한글 깨질때  (0) 2020.02.17
e-paper 모듈 (아두이노 HAT)  (0) 2019.04.17
dfrobot ph meter  (0) 2018.12.19
Posted by 구차니
embeded/arduino(genuino)2020. 2. 17. 15:29

오랫만에 생각나서 우분투에 아두이노 IDE 설치하는데 이상하게 깨진다. -_-

 

복구 하려면 설정에 들어가야 하는데

preperence는 ctrl-comma (이래저래 깨지니 단축키가 짱)

아무튼 영어로 설정하고 일단 쓰면되는데..

폰트 설정 파일을 보면 monospaced로 되어 있어서 그런가 한글이 깨져 안나온다.

 

현재 1.8.5이 패키지로 설치시 깔려지는데 신버전 버그인지 모르겠지만

설정파일들 바꾸어 주어도 폰트가 변경되지 않는다. 좀 기다려야 할지도 모르겠네..

한글로 메뉴 설정 안된다고 못쓰는건 아니니까 머...

 

[링크 : https://blog.opid.kr/457]

'embeded > arduino(genuino)' 카테고리의 다른 글

arduino knob 변형 adc 값 읽기  (0) 2020.03.09
arduino nano + CLCD  (0) 2020.03.07
e-paper 모듈 (아두이노 HAT)  (0) 2019.04.17
dfrobot ph meter  (0) 2018.12.19
433mhz tpms ivtm 센서용 통신 모듈  (0) 2018.10.05
Posted by 구차니
embeded/arduino(genuino)2019. 4. 17. 17:05

하이마트에서 전자잉크로 가격표 쓰는데 (검은색/빨간색) 의외로 싸게 풀린듯?

 

아무튼 전기도 공급안해줘도 되고 한번 변경할때 장비에 물려서 설정해주고 뽑아버리면 되니까

[링크 : http://eleparts.co.kr/goods/view?no=6517082] 0.99만

[링크 : http://eleparts.co.kr/goods/view?no=6268645] 7.5만

'embeded > arduino(genuino)' 카테고리의 다른 글

arduino nano + CLCD  (0) 2020.03.07
arduino ide ubuntu에서 한글 깨질때  (0) 2020.02.17
dfrobot ph meter  (0) 2018.12.19
433mhz tpms ivtm 센서용 통신 모듈  (0) 2018.10.05
firmata c library client  (0) 2018.05.18
Posted by 구차니
embeded/arduino(genuino)2018. 12. 19. 18:19

한동안 가지고 놀게 될(?) 부품

[링크 : https://www.dfrobot.com/wiki/index.php/PH_meter(SKU:_SEN0161)]

[링크 : https://www.dfrobot.com/wiki/index.php/Analog_pH_Meter_Pro_SKU:SEN0169]

[링크 : https://www.dfrobot.com/wiki/index.php/PH_meter_V1.1_SKU:SEN0161]


+

Reads the value from the specified analog pin. The Arduino board contains a 6 channel (7 channels on MKR boards, 8 on the Mini and Nano, 16 on the Mega), 10-bit analog to digital converter. This means that it will map input voltages between 0 and 5 volts into integer values between 0 and 1023. This yields a resolution between readings of: 5 volts / 1024 units or, .0049 volts (4.9 mV) per unit. The input range and resolution can be changed using analogReference().

It takes about 100 microseconds (0.0001 s) to read an analog input, so the maximum reading rate is about 10,000 times a second. 

[링크 : https://www.arduino.cc/reference/en/language/functions/analog-io/analogread/]

[링크 : https://www.arduino.cc/reference/en/language/functions/analog-io/analogreference/]

[링크 : https://forum.arduino.cc/index.php?topic=16585.0]


+

회로도 및 부품 데이터시트

[링크 : http://image.dfrobot.com/image/data/SEN0161/pH%20meter%20V1.0%20SCH.pdf]

[링크 : http://ww1.microchip.com/downloads/en/DeviceDoc/20001358D.pdf]

[링크 : https://pdf1.alldatasheet.co.kr/datasheet-pdf/view/177131/TI/TL081BCDG4.html]

Posted by 구차니
embeded/arduino(genuino)2018. 10. 5. 22:58

회사 다른분 차량에 달려있던 자동차 타이어 공기압 센서에

433MHz 써있는 걸로 찾아보기 시작


아무튼 TPMS 혹은 TPM 이라고 표기하기도 하고

IVTM이라고 표기하기도 하는데 브랜드 명이나 특허로 인한 고유명사인 것 같다.

(Tire Pressure Measure System 정도가 무난한 약어인듯)


ISM 대역으로 쓸 뿐이고 딱히 zigbee나 bluetooth 처럼

명칭이 붙는 어떠한 기술은 아닌듯


[링크 : http://vctec.co.kr/.../433mhz-무선-리시버-및-트랜시버-모듈.../10440/#none]

[링크 : https://www.rohde-schwarz.com/kr/applications/-tpms-application-card_56279-4820.html]


일단.. 버스용 인데 내장 리튬배터리로 6.5년 정도 보증을 하는 듯

[링크 : http://inform.wabco-auto.com/intl/pdf/815/00/45/8150100453.pdf]

'embeded > arduino(genuino)' 카테고리의 다른 글

e-paper 모듈 (아두이노 HAT)  (0) 2019.04.17
dfrobot ph meter  (0) 2018.12.19
firmata c library client  (0) 2018.05.18
아두이노로 상용제품 만들기  (2) 2018.04.10
아두이노 미세먼지 센서  (2) 2018.03.30
Posted by 구차니
embeded/arduino(genuino)2018. 5. 18. 18:10

파이썬으로 된거는 꽤 보이는데

C로 된건 잘 안보여서 일단 찾아 둠

[링크 : https://github.com/jdourlens/FirmataC/blob/master/README.md]


server(?)는 아두이노 firmata로 구현되어 있으니 별도로 찾지 않음

'embeded > arduino(genuino)' 카테고리의 다른 글

dfrobot ph meter  (0) 2018.12.19
433mhz tpms ivtm 센서용 통신 모듈  (0) 2018.10.05
아두이노로 상용제품 만들기  (2) 2018.04.10
아두이노 미세먼지 센서  (2) 2018.03.30
USB to TTL 정보  (0) 2018.01.10
Posted by 구차니
embeded/arduino(genuino)2018. 4. 10. 20:18

아두이노 보드가 물리적으로 포함될 경우 문제없음

파생된 디자인을 경우 CCL에 의해 Eagle(회로도) 공개필요

코어 라이브러리 사용가능(LGPL 따름), 소스 비공개 가능


Can I build a commercial product based on Arduino?

Yes, with the following conditions:

  • Physically embedding an Arduino board inside a commercial product does not require you to disclose or open-source any information about its design.
  • Deriving the design of a commercial product from the Eagle files for an Arduino board requires you to release the modified files under the same Creative Commons Attribution Share-Alike license. You may manufacture and sell the resulting product.
  • Using the Arduino core and libraries for the firmware of a commercial product does not require you to release the source code for the firmware. The LGPL does, however, require you to make available object files that allow for the relinking of the firmware against updated versions of the Arduino core and libraries. Any modifications to the core and libraries must be released under the LGPL.
  • The source code for the Arduino environment is covered by the GPL, which requires any modifications to be open-sourced under the same license. It does not prevent the sale of derivative software or its inclusion in commercial products.

In all cases, the exact requirements are determined by the applicable license. Additionally, see the previous question for information about the use of the name “Arduino”.  

[링크 : https://www.arduino.cc/en/Main/FAQ#toc10]

Posted by 구차니
embeded/arduino(genuino)2018. 3. 30. 16:33

센서를 보는데

PM2.5인지 PM10인지 구분이 모호해서 헷갈리는데 대부분이 PM2.5 센서 인듯?


[링크 : http://arduinodev.woofex.net/2012/12/01/standalone-sharp-dust-sensor/]

[링크 : http://www.hardcopyworld.com/ngine/aduino/index.php/archives/1485]


샤프센서가 만만한데

ADC와 led제어를 해주어야 한다


GP2Y1010AU0F / 7500원 / ???

0.1mg 단위로 재니까 100ug 단위로 잴 수 있는 녀석으로 보이고

단순(?) dust 센서니까 PM10으로 간주하면 되려나?

[링크 : http://www.devicemart.co.kr/1111977]

[링크 : http://www.sharp-world.com/products/device/lineup/data/pdf/datasheet/gp2y1010au_appl_e.pdf]


SZH PM2.5 GP2Y1023AU0F 먼지 센서 / 1.3만 / 

[링크 : http://www.devicemart.co.kr/1330859]


SDS011 / 4.4만(VAT별도) / PM2.5 & PM10 

[링크 : http://vctec.co.kr/product/미세먼지-센서-pm25-먼지-센서...-sds011/11683]


PPD42NS / 1.7만 / PM 1 보다는 크니 PM2.5 인가?

[링크 : http://wiki.seeedstudio.com/Grove-Dust_Sensor/]

[링크 : http://www.devicemart.co.kr/1066618]


완제품들도 PM2.5인지 PM10인지 모호한게 문제..


+

5.5 만 Kit

[링크 : http://daduino.co.kr/product/rb041아두이노-pms5003s-미세먼지-측정기-키트-소스코드-포함/1344/]


0.3~1.0 um / 1.0~2.5 um / 2.5~10 um

[링크 : http://www.aqmd.gov/docs/default-source/aq-spec/resources-page/plantower-pms5003-manual_v2-3.pdf]


35달러

[링크 : https://ko.aliexpress.com/item/PLANTOWER-PM2-5-SENSOR-laser-dust-sensor-Formaldehyde-sensor-two-for-one-G5S-PMS5003S-laser-dust/32625975231.html]

'embeded > arduino(genuino)' 카테고리의 다른 글

firmata c library client  (0) 2018.05.18
아두이노로 상용제품 만들기  (2) 2018.04.10
USB to TTL 정보  (0) 2018.01.10
심심한데 머리가 안돌아가는 아두이노.. -_ㅠ  (0) 2017.12.28
간만에 지름신  (0) 2017.10.26
Posted by 구차니
embeded/arduino(genuino)2018. 1. 10. 10:47


D-SUN "USB to TTL" (Blue)

(Rx & Tx use 3.3V logic levels) 

D-SUN사 USB TTL은 (파란색 PCB)

TX가 3.3V로 뜨고

5V는 그냥 USB 전원을 뺴주는 것으로 보인다(전원 공급용?)


Gikfun YP-02 USB to TTL, CH340, 6-pin

(Rx & Tx use ~3.7V logic levels) 

YP-02는 wch의 ch340 칩셋을 사용하는데

점퍼를 이용해서 Tx의 전압을 3.3V나 5.0V로 선택이 가능하다.


[링크 : https://www.cpmspectrepi.uk/raspberry_pi/MoinMoinExport/USBtoTtlSerialAdapters.html]

Posted by 구차니