embeded/arduino(genuino)2016. 3. 28. 20:04

시리얼 포트 쓰려면 dialout 그룹에 추가해야 하니 추가해주세열?



윈도우용으로 받는 신버전 보다 낮은지 먼가 메뉴가 다르다.

1.6.8 인거 같은데.. 리눅스 용은 버전이 왜 이모양이야? ㄷㄷ


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

아두이노 / avr bootloader  (0) 2016.03.30
arduino i2c 예제  (0) 2016.03.30
아두이노 빌드 프로세스 & c/cpp  (0) 2016.03.28
아두이노 나노 - LED 블링크 예제  (0) 2016.03.27
아두이노 나노 - 시리얼 테스트  (3) 2016.03.27
Posted by 구차니
파일방2016. 3. 28. 18:43

avidemux는

copy로 설정시 frame 단위로 잘라내기 때문에, 코덱 변환을 하지 않아

빠르고, 화질 저하 없이 편집이 가능한 녀석이다.


기본사용법은

ctrl-t (시간이동)

2 (Previous Intra Frame) or 8 (Next Intra Frame)

[ (시작위치 지정)

ctrl-t (시간이동)

2 (Previous Intra Frame) or 8 (Next Intra Frame)

] (시작위치 지정)

ctrl-s (잘라내서 저장하기)


리눅스 버전 2.5.4 (ubuntu 10.04 LTS 용이라.. 구버전일듯?)


윈도우 버전 2.6.10


네비게이션은 아래와 같은데


시간을 이동하면 i/b/p 프레임 상관없이 이동하기에

이동 후 Next Intra Frame을 통해 I-Frame으로 이동해서 선택하여 잘라내는것이 보기에 좋다

만약 그렇게 하지 않고 Append를 통해 붙일 경우, 동영상이 깨져 유령처럼 어른 거리는 현상이 나타나게 된다.


그나저나.. 더 구버전인 리눅스꺼가 이런 경고도 보여주고.. 더 낫네..


시간은 조금 불편한 리눅스 버전


깔끔하지만 이동이 잘 안되거나 안되는 망할 윈도우 버전.



결론 : 그러니 리눅스에서 편집을 하자(어?)

'파일방' 카테고리의 다른 글

ti - energia  (0) 2016.04.14
리눅스 텔레그램 콘솔... 그리고 서버제어?!  (0) 2016.04.08
notepad++ for linux?  (0) 2016.03.22
photostitcher  (0) 2016.03.15
Avidemux & Free Video Editor  (0) 2016.03.04
Posted by 구차니
하드웨어/모터(motor)2016. 3. 28. 14:35

서보를 질러서

이녀석 얼마나 빠르게 응답가능한가 고민하다가 보니..

20ms 주기의 PWM(50Hz).. 그러면 최악의 경우 20ms 대기 시간 + 모터 구동시간이니..

최악의 경우 20ms 의 작동 딜레이..


이걸 줄일수 있는 방법은 pwm 주파수를 올리는건데

digital servo 라는 녀석은 50Hz에서 300Hz로 !!

아무튼 신호 폭도 좁아 지겠지 당연히..




This means that, as opposed to the motor receiving 50 pulses/sec., it now receives 300. 

[링크 : http://www.futabarc.com/servos/digitalservos.pdf]

[링크 : http://blog.whattomake.co.kr/110]



근데.. 이전글을 보니.. 디지털 서보라고 해서 반드시 저 주기가 짧아 지는건 또 아닌거 같네...

2015/11/24 - [이론 관련/전기 전자] - 디지털 서보(?)

2010/02/16 - [하드웨어] - 디지털 서보모터



+

음.. 서보 중에 200Hz인 것도 있고.. 333Hz 인것도 있나 보네..



[링크 : http://www.mikado-heli.de/.../VBar%20Control%20Setup%20Manual.pdf]


Ultra high angle resolution (15bits/32,000steps) : 0.01'

Neutral pulse 1.5 ㎳(Adjustabla)

Travel angle 40~45° at ±400㎲(Adjuastable)

Dead Band 1 ~ 2 ㎲ (Adjustable) // dead band는 중립의 영역(1500us +- 1~2us) 이런식

[링크 : http://www.skyholic.co.kr/shop/step1.php?number=1980]

'하드웨어 > 모터(motor)' 카테고리의 다른 글

로봇 관절 부품  (0) 2016.11.25
drone 모터 관련  (0) 2016.11.22
L6470 보드 판매처  (0) 2015.11.06
바이폴라 / 유니폴라 - 전기적 결선 방법  (0) 2015.11.04
스테핑 모터 회로 구성  (0) 2015.11.04
Posted by 구차니
embeded/arduino(genuino)2016. 3. 28. 11:17


c/cpp 지원함


Can I program the Arduino board in C? 

In fact, you already are; the Arduino language is merely a set of C/C++ functions that can be called from your code. Your sketch undergoes minor changes (e.g. automatic generation of function prototypes) and then is passed directly to a C/C++ compiler (avr-g++). All standard C and C++ constructs supported by avr-g++ should work in Arduino. For more details, see the page on the Arduino build process.

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



아두이노 켜면 뜨는 sketch 파일은 바로 빌드 되는게 아니라 여러 단계를 거쳐서 빌드 됨

일단 소스를 보면.. 기본골격이 setup() / loop() 인데

아마도... 이런 구조로 변환하려나?


#include "board.h"

#include "wiring.h"

#define F_CPU 16000000


extern void setup();

extern void loop();

int main()

{

setup();

while(1)

{

// main loop

loop();

// event handler - not interrupt

serial_event();

}

} 

[링크 : https://www.arduino.cc/en/Hacking/BuildProcess]

[링크 : https://www.arduino.cc/en/Hacking/Preferences]



+

2016.03.28


빌드 메시지

/usr/share/arduino/hardware/tools/avr/bin/avr-g++ -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega328p -DF_CPU=16000000L -MMD -DUSB_VID=null -DUSB_PID=null -DARDUINO=105 -D__PROG_TYPES_COMPAT__ -I/usr/share/arduino/hardware/arduino/cores/arduino -I/usr/share/arduino/hardware/arduino/variants/eightanaloginputs /tmp/build3729038704914021233.tmp/SerialEvent.cpp -o /tmp/build3729038704914021233.tmp/SerialEvent.cpp.o

  Using previously compiled: /tmp/build3729038704914021233.tmp/WInterrupts.c.o

  Using previously compiled: /tmp/build3729038704914021233.tmp/wiring_pulse.c.o

  Using previously compiled: /tmp/build3729038704914021233.tmp/wiring_digital.c.o

  Using previously compiled: /tmp/build3729038704914021233.tmp/wiring_analog.c.o

  Using previously compiled: /tmp/build3729038704914021233.tmp/malloc.c.o

  Using previously compiled: /tmp/build3729038704914021233.tmp/realloc.c.o

  Using previously compiled: /tmp/build3729038704914021233.tmp/wiring.c.o

  Using previously compiled: /tmp/build3729038704914021233.tmp/wiring_shift.c.o

  Using previously compiled: /tmp/build3729038704914021233.tmp/CDC.cpp.o

  Using previously compiled: /tmp/build3729038704914021233.tmp/Stream.cpp.o

  Using previously compiled: /tmp/build3729038704914021233.tmp/main.cpp.o

  Using previously compiled: /tmp/build3729038704914021233.tmp/WMath.cpp.o

  Using previously compiled: /tmp/build3729038704914021233.tmp/HID.cpp.o

  Using previously compiled: /tmp/build3729038704914021233.tmp/WString.cpp.o

  Using previously compiled: /tmp/build3729038704914021233.tmp/HardwareSerial.cpp.o

  Using previously compiled: /tmp/build3729038704914021233.tmp/IPAddress.cpp.o

  Using previously compiled: /tmp/build3729038704914021233.tmp/USBCore.cpp.o

  Using previously compiled: /tmp/build3729038704914021233.tmp/new.cpp.o

  Using previously compiled: /tmp/build3729038704914021233.tmp/Tone.cpp.o

  Using previously compiled: /tmp/build3729038704914021233.tmp/Print.cpp.o

/usr/share/arduino/hardware/tools/avr/bin/avr-ar rcs /tmp/build3729038704914021233.tmp/core.a /tmp/build3729038704914021233.tmp/WInterrupts.c.o

/usr/share/arduino/hardware/tools/avr/bin/avr-ar rcs /tmp/build3729038704914021233.tmp/core.a /tmp/build3729038704914021233.tmp/wiring_pulse.c.o

/usr/share/arduino/hardware/tools/avr/bin/avr-ar rcs /tmp/build3729038704914021233.tmp/core.a /tmp/build3729038704914021233.tmp/wiring_digital.c.o

/usr/share/arduino/hardware/tools/avr/bin/avr-ar rcs /tmp/build3729038704914021233.tmp/core.a /tmp/build3729038704914021233.tmp/wiring_analog.c.o

/usr/share/arduino/hardware/tools/avr/bin/avr-ar rcs /tmp/build3729038704914021233.tmp/core.a /tmp/build3729038704914021233.tmp/malloc.c.o

/usr/share/arduino/hardware/tools/avr/bin/avr-ar rcs /tmp/build3729038704914021233.tmp/core.a /tmp/build3729038704914021233.tmp/realloc.c.o

/usr/share/arduino/hardware/tools/avr/bin/avr-ar rcs /tmp/build3729038704914021233.tmp/core.a /tmp/build3729038704914021233.tmp/wiring.c.o

/usr/share/arduino/hardware/tools/avr/bin/avr-ar rcs /tmp/build3729038704914021233.tmp/core.a /tmp/build3729038704914021233.tmp/wiring_shift.c.o

/usr/share/arduino/hardware/tools/avr/bin/avr-ar rcs /tmp/build3729038704914021233.tmp/core.a /tmp/build3729038704914021233.tmp/CDC.cpp.o

/usr/share/arduino/hardware/tools/avr/bin/avr-ar rcs /tmp/build3729038704914021233.tmp/core.a /tmp/build3729038704914021233.tmp/Stream.cpp.o

/usr/share/arduino/hardware/tools/avr/bin/avr-ar rcs /tmp/build3729038704914021233.tmp/core.a /tmp/build3729038704914021233.tmp/main.cpp.o

/usr/share/arduino/hardware/tools/avr/bin/avr-ar rcs /tmp/build3729038704914021233.tmp/core.a /tmp/build3729038704914021233.tmp/WMath.cpp.o

/usr/share/arduino/hardware/tools/avr/bin/avr-ar rcs /tmp/build3729038704914021233.tmp/core.a /tmp/build3729038704914021233.tmp/HID.cpp.o

/usr/share/arduino/hardware/tools/avr/bin/avr-ar rcs /tmp/build3729038704914021233.tmp/core.a /tmp/build3729038704914021233.tmp/WString.cpp.o

/usr/share/arduino/hardware/tools/avr/bin/avr-ar rcs /tmp/build3729038704914021233.tmp/core.a /tmp/build3729038704914021233.tmp/HardwareSerial.cpp.o

/usr/share/arduino/hardware/tools/avr/bin/avr-ar rcs /tmp/build3729038704914021233.tmp/core.a /tmp/build3729038704914021233.tmp/IPAddress.cpp.o

/usr/share/arduino/hardware/tools/avr/bin/avr-ar rcs /tmp/build3729038704914021233.tmp/core.a /tmp/build3729038704914021233.tmp/USBCore.cpp.o

/usr/share/arduino/hardware/tools/avr/bin/avr-ar rcs /tmp/build3729038704914021233.tmp/core.a /tmp/build3729038704914021233.tmp/new.cpp.o

/usr/share/arduino/hardware/tools/avr/bin/avr-ar rcs /tmp/build3729038704914021233.tmp/core.a /tmp/build3729038704914021233.tmp/Tone.cpp.o

/usr/share/arduino/hardware/tools/avr/bin/avr-ar rcs /tmp/build3729038704914021233.tmp/core.a /tmp/build3729038704914021233.tmp/Print.cpp.o

/usr/share/arduino/hardware/tools/avr/bin/avr-gcc -Os -Wl,--gc-sections -mmcu=atmega328p -o /tmp/build3729038704914021233.tmp/SerialEvent.cpp.elf /tmp/build3729038704914021233.tmp/SerialEvent.cpp.o /tmp/build3729038704914021233.tmp/core.a -L/tmp/build3729038704914021233.tmp -lm

/usr/share/arduino/hardware/tools/avr/bin/avr-objcopy -O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 /tmp/build3729038704914021233.tmp/SerialEvent.cpp.elf /tmp/build3729038704914021233.tmp/SerialEvent.cpp.eep

/usr/share/arduino/hardware/tools/avr/bin/avr-objcopy -O ihex -R .eeprom /tmp/build3729038704914021233.tmp/SerialEvent.cpp.elf /tmp/build3729038704914021233.tmp/SerialEvent.cpp.hex

바이너리 스케치 사이즈: 3,566 바이트 (최대 30,720 바이트) 


$ cat main.cpp.d

/tmp/build3729038704914021233.tmp/main.cpp.o: \

 /usr/share/arduino/hardware/arduino/cores/arduino/main.cpp \

 /usr/share/arduino/hardware/arduino/cores/arduino/Arduino.h \

 /usr/share/arduino/hardware/arduino/cores/arduino/binary.h \

 /usr/share/arduino/hardware/arduino/cores/arduino/WCharacter.h \

 /usr/share/arduino/hardware/arduino/cores/arduino/WString.h \

 /usr/share/arduino/hardware/arduino/cores/arduino/HardwareSerial.h \

 /usr/share/arduino/hardware/arduino/cores/arduino/Stream.h \

 /usr/share/arduino/hardware/arduino/cores/arduino/Print.h \

 /usr/share/arduino/hardware/arduino/cores/arduino/Printable.h \

 /usr/share/arduino/hardware/arduino/cores/arduino/new.h \

 /usr/share/arduino/hardware/arduino/variants/eightanaloginputs/pins_arduino.h \

 /usr/share/arduino/hardware/arduino/variants/eightanaloginputs/../standard/pins_arduino.h 


$ cat /usr/share/arduino/hardware/arduino/cores/arduino/main.cpp

#include <Arduino.h>


int main(void)

{

        init();


#if defined(USBCON)

        USBDevice.attach();

#endif


        setup();


        for (;;) {

                loop();

                if (serialEventRun) serialEventRun();

        }


        return 0;

} 


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

arduino i2c 예제  (0) 2016.03.30
아두이노 on ubuntu 15.10  (0) 2016.03.28
아두이노 나노 - LED 블링크 예제  (0) 2016.03.27
아두이노 나노 - 시리얼 테스트  (3) 2016.03.27
아두이노 나노 v3.0 / v3.1  (0) 2016.03.27
Posted by 구차니
Microsoft2016. 3. 28. 09:13

locky는 대개 doc로 첨부되서 여는 순간 매크로를 통해 다운로드/감염되고

요즘 자주 받는 메일중에 zip 파일 안에 *.js가 들은 녀석도 있는데

실제로는 wscript 기반이라 두개를 막으면 어느정도는 대응책이 될 듯..



WSH(Windows Script Host) 사용불가하게 하기

[링크 : https://technet.microsoft.com/en-us/library/ee198684.aspx]


MS워드에서 서명되지 않은 스크립트 실행하지 않게 하기

[링크 : https://blogs.technet.microsoft.com/mmpc/2016/02/24/locky-malware-lucky-to-avoid-it/]

'Microsoft' 카테고리의 다른 글

MVVM - Model-View-ViewModel  (0) 2018.04.24
윈7 + 장시간 안전모드 문제점?  (0) 2014.12.02
extendable vhd에서 fixed vhd로 변환하기  (0) 2013.10.27
Vista 와 Win7의 점수차이  (0) 2011.08.13
windows 암호깨는 프로그램  (0) 2011.06.13
Posted by 구차니
embeded/arduino(genuino)2016. 3. 27. 20:32

기본이 주기 1000 ms로 예제를 주니

100ms로 바꾸려면

const long interval = 1000;

을 

const long interval = 100;

으로 바꾸어 주면되는데...


나노의 겨우 13번 포트가 LED 연결되어 있으니 예제로 쓰긴 좋은데

USB을 뺐다가 꽂으면 왜 불규칙하게 깜박이게 될까?...


+

아두이노 IDE를 끄니 정상작동..

이녀석이 먼가 계속 핸들링 하면서 인터럽트 걸어서 그런가?

+



Posted by 구차니
embeded/arduino(genuino)2016. 3. 27. 20:19

기본 셋팅은 나의 경우에는 아래와 같이

Arduino nano 선택시 cpu는 ATmega328로 자동 선택되었고

포트는 수동으로

프로그래머도 수동으로 선택해주어야 한다.


프로그래머는 avrdude 나 stk500 등을 내장해서 굽는데

USB를 통해서 구울때는 Arduino as ISP로 설정해야 구워지네...

+

2016.04.06

어? 프로그래머 멀로 하던 알아서 굽는 느낌?

avrdude: Version 6.0.1, compiled on Apr 15 2015 at 19:59:58

         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/

         Copyright (c) 2007-2009 Joerg Wunsch


         System wide configuration file is "C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf"


         Using Port                    : COM6

         Using Programmer              : arduino

         Overriding Baud Rate          : 57600

         AVR Part                      : ATmega328P

         Chip Erase delay              : 9000 us

         PAGEL                         : PD7

         BS2                           : PC2

         RESET disposition             : dedicated

         RETRY pulse                   : SCK

         serial program mode           : yes

         parallel program mode         : yes

         Timeout                       : 200

         StabDelay                     : 100

         CmdexeDelay                   : 25

         SyncLoops                     : 32

         ByteDelay                     : 0

         PollIndex                     : 3

         PollValue                     : 0x53

         Memory Detail                 :


                                  Block Poll               Page                       Polled

           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack

           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------

           eeprom        65    20     4    0 no       1024    4      0  3600  3600 0xff 0xff

           flash         65     6   128    0 yes     32768  128    256  4500  4500 0xff 0xff

           lfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00

           hfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00

           efuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00

           lock           0     0     0    0 no          1    0      0  4500  4500 0x00 0x00

           calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00

           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00


         Programmer Type : Arduino

         Description     : Arduino

         Hardware Version: 2

         Firmware Version: 1.16

         Vtarget         : 0.0 V

         Varef           : 0.0 V

         Oscillator      : Off

         SCK period      : 0.1 us


avrdude: AVR device initialized and ready to accept instructions


Reading | ################################################## | 100% 0.01s


avrdude: Device signature = 0x1e950f

avrdude: reading input file "C:\Users\shin\AppData\Local\Temp\build56906a4f22bf0a8b9bdb55c318239f30.tmp/sketch_mar27a.ino.hex"

avrdude: writing flash (1796 bytes):


Writing | ################################################## | 100% 1.18s


avrdude: 1796 bytes of flash written

avrdude: verifying flash memory against C:\Users\shin\AppData\Local\Temp\build56906a4f22bf0a8b9bdb55c318239f30.tmp/sketch_mar27a.ino.hex:

avrdude: load data flash data from input file C:\Users\shin\AppData\Local\Temp\build56906a4f22bf0a8b9bdb55c318239f30.tmp/sketch_mar27a.ino.hex:

avrdude: input file C:\Users\shin\AppData\Local\Temp\build56906a4f22bf0a8b9bdb55c318239f30.tmp/sketch_mar27a.ino.hex contains 1796 bytes

avrdude: reading on-chip flash data:


Reading | ################################################## | 100% 1.05s


avrdude: verifying ...

avrdude: 1796 bytes of flash verified


avrdude done.  Thank you. 




상단메뉴 tooltip 캡쳐

시리얼 모니터는 포트로 설정된 쪽에서 열리고, 업로드 시에는 자동으로(?) 꺼지게 된다.



시리얼 포트가 USB를 통해 항상 열리는게 아니기에

시리얼 모니터를 열어야 LED가 깜박이게 된다.


HTML로 복사해서 붙여 넣으니 이쁘네 ㅋㅋ

시리얼에서 무한으로 115k로 열어 Hello World 뿌려주는 예제

\r\n 넣을걸 그랬나?

void setup() {
  // put your setup code here, to run once:
  Serial.begin(115200);
}

void loop() {
  // put your main code here, to run repeatedly:
  while(1)
  {
    Serial.print("Hello world.");
  }
}



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


+

2020.03.27


old bootloader로 하면 잘 된다.

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

Posted by 구차니
embeded/arduino(genuino)2016. 3. 27. 19:50


나노 3.0 부터는 Atmega328 이라네..

ATmega328 (Arduino Nano 3.x) or ATmega168 (Arduino Nano 2.x)

[링크 : https://www.arduino.cc/en/Main/ArduinoBoardNano]


심심하니.. 아두이노 IDE나 설치


드라이버 설치 한다고 하니.. 두개가 뜨네



장치 관리자 상으로는

범용 직렬 버스 컨트롤러 - USB Serial Converter

포트(COM & LPT) - USB Serial Port(COMx)

두개만 추가 된다.


FTDI 칩을 쓰니.. 저가형 ISP로 나온 시리얼 포트를 통한 업데이트를 쓰는걸려나?


[링크 : http://www.atmel.com/images/doc0943.pdf]


아두이노 스케치(?) 실행!



좌 나노 3.0

우 나노 3.1


거상인 보드(GS-08A) 와의 비교

전면은 USB 커넥터 하나고

후면은 FTDI 칩(USB) / 레귤레이터 차이 일려나?



Posted by 구차니
embeded/arduino(genuino)2016. 3. 26. 22:45

헐.. 뜯지도 않은거네 ㄷㄷ

2016/03/24 - [개소리 왈왈/직딩의 비애] - po지름wer!!!


아무튼.. 아두이노도 한번 해봐야지

usb만 꽂으면 되는거라고 하니.. 좀더 편할테니..


HS-311 표준 서보


아두이노 nano



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

아두이노 나노 - 시리얼 테스트  (3) 2016.03.27
아두이노 나노 v3.0 / v3.1  (0) 2016.03.27
아두이노 버전별 차이점  (0) 2015.10.05
아두이노 부품들...  (0) 2015.06.29
아두이노 (arduino)  (0) 2011.12.29
Posted by 구차니

뜸을 들이다가 이제 주네? ㅋㅋ



'게임 > 오리진&스팀&유플레이' 카테고리의 다른 글

오리진의 선물 - 던전키퍼  (2) 2016.10.26
tropico 4 무료  (0) 2016.09.09
오리진의 낚시  (0) 2016.03.18
오리진의 선물 - NFS 모스트 원티드  (0) 2016.02.03
스팀 195개.. 오리진 45개?  (0) 2016.01.12
Posted by 구차니