Search

Theseus

솜노트 100 Mbytes 추가 방법

솜노트 100 Mbytes 추가 방법

Introduction
우선, 언제 어디서나 간편하게 사용할 수 있는 솜노트에 대해 알아봅시다.
솜노트 100 Mbytes 추가 방법은 페이지의 제일 아래쪽에 있어요.


솜노트를 사용해야하는 이유
1. 비주얼이 최강이다!
2. 첨부파일 업로드가 매우 빠르다!
3. 설치 없이 간단하게 사용할 수 있는 메모 application 이 필요하다.
4. 솜노트에 그림을 저장할 수 있다.
5. 에버노트는 첨부파일을 지워도 사용 용량이 줄어들지 않지만 솜노트는 줄어든다. 
6. 제한 용량을 모두 채워도 노트는 무제한으로 추가할 수 있다.

솜노트가 싫을 수도 있는 이유
1. 에버노트, 어썸노트에 비해 기능이 적다.
2. 핸드폰에서 작업한 내용은 자동이 아닌 동기화 버튼을 클릭해야 컴퓨터에서 그 내용을 확인할 수 있다.
3. 클라우드 서비스를 받기 위해서는 회원가입을 해야 한다.
4. 무료 용량이 100 Mbytes 이다. [친구 초대로 1 Gbytes 까지 가능]
5. 일반 계정으로는 단일 파일 업로드 용량이 20 MB 이다.

솜노트를 사용하는 방법은 세 가지가 있습니다.

1. 스마트폰으로만 솜노트를 사용하는 경우
아래 둘 중 한 가지 방법을 선택하자!

1) google play 에서 '솜노트' 검색 - download


2) 아래 링크를 '새 탭에서 링크 열기' 

- 사용자 기기에 맞는 버튼 클릭! 
- download   

Somnote Homepage

2. 솜노트와 솜클라우드 서비스 둘 다 이용하는 경우
솜노트 홈페이지에서 회원가입을 한다. 
[회원가입만하면 데스크탑에서는 솜노트와 솜클라우드 서비스를 받을 수 있습니다.]
Somnote Homepage
http://somcloud.com/about/somnote

3. 솜노트와 솜클라우드 서비스 + 100 Mbytes 추가 방법
아래 주소를 통해 회원 가입하면,
회원가입 하는 분과 저는 100 Mbytes 씩 추가로 받게 됩니다.  
결론
우리 모두 배 터지게 용량을 먹어봅시다!!

Is it possible to declare character variable using int?



Source Code
#include <stdio.h>

int main()
{
int nA = 'a';

printf("%c \n",nA);

return 0;
}

Review
It is possible to declare character variable using int

2 by 2 matrix declare and extraction


Source Code
#include <stdio.h>

int main(void)
{
char a[2][2] = {'a','b','c','d'};

printf("%c \n",a[0][0]);
printf("%c \n",a[0][1]);
printf("%c \n",a[1][0]);
printf("%c \n",a[1][1]);

return 0;
}

How to print variable address


Source Code
#include <stdio.h>

int main(void)  
{
int i = 999;
int *cool = &i; 
printf("%d\n", i); // 32 bits
printf("0x%p\n", &i); 

printf("%d\n", *cool); 
printf("0x%p\n", &cool); 

return 0;
}

Let's get the remainder from the division.

Source Code
#include <stdio.h>


void main()
{
printf("%d \n",5%3); // output control character
}

How to declare negative number?


Source Code
#include <stdio.h>

int main()
{
int a=+3;
int b=-2;
printf("-a : %d / -b : %d \n",-a,-b);

return 0;
}

How to make constant string


Source Code
#include <stdio.h>

#define PI 3.14 // proprocessor
#define TRUE 1
#define FALSE 0
#define STRING_HELLO "hello hello"

int main() 
{
const double pi=3.14; // double type guarantee 14 digits of the decimal point
const int tru=1;
const char *string_hello="hello hello2";

printf("#define :: PI=%f, string=%s\n",PI,STRING_HELLO);
printf("#define :: pi=%f, string=%s\n",pi,string_hello);
if(tru)
{
printf("true\n");
}
}

If I declare # define, I can use constant value all local

Source Code

#include <stdio.h>

void print();

int main()
{
#define A 1
const int B=2;
return 0;
}
void print()
{
const int A = 3;  //1=3 Error will occur
A =4;
const int B = 4;
}

const data type variable = ;


#include <stdio.h>
int main()
{
const char CONST_CHAR_C='c';  

printf("CONST_CHAR_C : %c\n",CONST_CHAR_C);
printf("CONST_CHAR_C : %d\n",CONST_CHAR_C); 

return 0;
}

How to declare constant variable? variety


#define variable 'a' 
// not add semi colon
ex) #define CONST_CHAR_A 'a'  
const data type variable = ?;
ex) const char CONST_CHAR_C='c';  

형변환 하였는데 overflow 가 발생하는 경우

[cast operator 오버플로우 castoperator data type datatype 데이버타입 데이터 타입]
예제
Source Code

#include <stdio.h>

void main()
{
int nVar = 128;
char cResult;

cResult = (char)nVar; // cast operator

printf("%d \n",cResult);
}
Review
char 는 -128~+127 인데 int 형 데이터 128을 char로 변환하면 overflow 가 발생한다.

Print Control Character Variety

[alarm print control character variety printcharacter output print]
Print Control Character Variety
알람소리 = \a
Print Control Character Example
Source Code
#include <stdio.h>

void main()
{
    printf("\n");
    printf("\a");
}

Data type variable 선언방법은?

[데이터 타입 대이터 데이터타입 변수 declaration method int char float]
int nA;
char chA;
float fA;
float fA,fB;
int nA = 1;

Assembly Language Using reason

[machine code machinecode]
If you write source code using assembly language not using high level language
We need to use assembler.
컴파일러와 같은 역할을 수행하는 어셈블러가 필요하다. 어셈블러(assembler)는 어셈블리 Language로 작성된 프로그램을 기계어로 바꿔주는 프로그램이다. 어셈블러는 기계어를 제외한 다른 모든 고급 Language보다 프로그램의 실행 속도가 빠르고 하드웨어에 대한 정교한 통제가 가능하므로 시스템 소프트웨어를 작성하거나 하드웨어 장치를 처리하는 프로그램 작성에 주로 사용한다.

Arduino - Analog Output - LED - Source Code

LED Dimmer
[조명 밝기 조절]
Source Code



int PWMValue;
void setup() //설정할 것이 없어도 setup()은 써야한다.
{
}
void loop()
{
for(PWMValue=0; PWMValue<=255; PWMValue+=5)
//analog 출력은 8bits
//analog 입력은 10bits
{
  analogWrite(9,PWMValue);
  delay(50);
  //10,11번 핀도 analogWrite 가능
}
for(PWMValue=255; PWMValue>=0; PWMValue-=5)
{
  analogWrite(9,PWMValue);
  delay(50); //0.1 second
}
}

Arduino - LED - Source Code

LED Blinking
Source Code
// File - example - Basics - Blink
int led = 13;

// the setup routine runs once when you press reset:
void setup() 
{                
  // initialize the digital pin as an output.
  pinMode(led, OUTPUT);     
}

// the loop routine runs over and over again forever:
void loop() 
{
  digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level)
  delay(4000); // wait for a second
  digitalWrite(led, LOW); // turn the LED off by making the voltage LOW
  delay(4000); // wait for a second
}
4개의 LED 모두 ON/OFF

Source Code
void setup()
{
  pinMode(13,'output');
  pinMode(12,'output');
  pinMode(11,'output');
  pinMode(10,'output');
}
void loop()
{
  digitalWrite(13,HIGH);
  digitalWrite(12,HIGH);
  digitalWrite(11,HIGH);
  digitalWrite(10,HIGH);
  delay(2000);  //2 seconds
  digitalWrite(13,LOW);
  digitalWrite(12,LOW);
  digitalWrite(11,LOW);
  digitalWrite(10,LOW);
  delay(2000);
}
Review
Arduino의 digital 출력핀의 연결법에 대해서 MCU의 전원을 통해서 많은 LED를 이용한다면 시스템이 불안정해진다. 외부 전압을 이용하는 것이 더욱 안정적이다.

Pull Up Pull Down Resistor

Switch and Pull Up Resistor

그림 3-3에서 switch가 ON state일 때, HIGH값을 가진다. 그렇다면 switch가 OFF 상태일 때는?
switch가 off 되어 있을 때 0인지 5인지 부정확한 반면[=floating state or tri state], pull upresistor을 사용하는 경우는 switch가 off 되었을 때 5V로 명확하고 switch가 ON이 되면 0V가 입력될 것이다.
switch가 ON되면 전류가 물이라고 생각했을 때 더 큰 전위차가 발생하는 길을 택할 것이다. 즉, 위 그림에서 ground로 전류가 흘러 전압이 0V가 나올 것이다.

풀업 저항은 스위치를 누르지 않은 상태일 때 논리적으로 High 레벨 상태를 유지하기 위해 입출력 단자와 VCC 사이에 접속하는 저항이다.
저항 값은 1kΩ ~10kΩ을 사용한다.

Tri state
Tri state란 무엇인가?
Tri state=open, low, high->값이 불분명하다!

스위치가 ON일 때 신호가 0인 이유
저항이 전체 저항이기 때문에 저항 이후의 wire는 전압값이 0일 것이다.

Switch and Pull down resistor


pull down switch의 경우 switch가 OFF state일 때, GND 신호가 디지털 회로에 인가될 것이다.





AVR - Proteus - LED - Button


Port Input 으로 사용하기
Introduction
LED 를 통해 하나의 Port 를 Input, 그리고 나머지 Port 를 output 으로 활용해보자!
Schematic

Source Code

#include <avr/io.h>
#include <util/delay.h> // slash

int main(void)
{
while(1)
{
DDRD = 0X00;
DDRE = 0XFF;


PORTE = PIND;
_delay_ms(50);

return 0;
}
}

Review
Output Port 값은 PORTE 를 이용하고 Input Port 값은 PIND 와 같이 사용한다.