레이블이 I2C인 게시물을 표시합니다. 모든 게시물 표시
레이블이 I2C인 게시물을 표시합니다. 모든 게시물 표시

2015. 1. 19.

[Quick & Dirty guide] GPIO app for Raspberry Pi

[Quick & Dirty guide] GPIO app for Raspberry Pi

(source : bitcraze.se)

(source : Adafruit)
(source : Davidhunt.ie)

There are already numerous creative projects out there as shown in the above, and the number of projects are on the rise.

For us, Raspberry Pi means a lot to us.

It’s a perfect low-cost hardware platform for PROTA that enables what it’s capable of now.

In return for its great hardware platform, we decided to release GPIO, the app that lets users make a full use of the possibility of Raspberry Pi with very little effort.

This’s the app.













Features
  • Change interface mode
  • Set specific 'pin'
    • Input : 'Read' value
    • Ouput : 'Write' input value
    • Serial communication : UART, SPI, I2C
    • PWM : 'Write' input value
    • Edge_Rising / Edge_Falling : detect edge status

Why need for the GPIO app?

No need to code to see it work

If you wanted to control GPIO, you had to code. However, now with the GPIO app, all you have to do is enter 1 in the OUPUT data and with just a few clicks, you can see it work instantly. It won’t take days or hours of your time to get it going.

"Automates pin & pin, pin & web services"

GPIO pins can be used as a sensor or an actuator to execute an rule automation. For instance, if PIR sensor detects a motion, turn on the LED connected to GPIO 17. If the weather in sunny in the afternoon, lower the PWM value to 10 connected to GPIO 18. Far more can be achieved and realize your imagination.

All this is possible because of the automation app, Ambiency.

From here on, you’ll be able to check out diverse PROTA Pi projects using GPIO from [Casual hacking].

2015. 1. 16.

[Quick & Dirty guide] GPIO app for 라즈베리파이(Raspberry Pi)

[Quick & Dirty guide] GPIO app for 라즈베리파이(Raspberry Pi)

(이미지 출처 : bitcraze.se)
(이미지 출처 : Adafruit)
(이미지 출처 : Davidhunt.ie)


위 사진들처럼 전세계적으로 정말 수많은 라즈베리파이(Raspberry Pi) 프로젝트들이 활성화 되어 있죠!

앞으로도 얼마나 많은 프로젝트들이 생겨날 지 모르겠습니다.

라즈베리파이는 NARAN에게도 큰 의미가 있는 제품입니다.

바로 PROTA Pi의 하드웨어 플랫폼이기 때문이죠.
오늘은 이 라즈베리파이를 통해 PROTA Pi가 출시된 것에 대한 고마움의 의미로
Raspberry Pi foundation, Raspberry Pi users 을 위해 만든
'GPIO 앱'을 소개하고자 합니다!





Features
  • Change interface mode
  • Set specific 'pin'
    • Input : 'Read' value
    • Ouput : 'Write' input value
    • Serial communication : UART, SPI, I2C
    • PWM : 'Write' input value
    • Edge_Rising / Edge_Falling : detect edge status
GPIO 앱을 사용하면 무엇이 좋을까요?

"Need not 'programming' "

개발자가 아니어도 GPIO 앱을 이용한다면 기존에 pin의 상태를 설정하기 위한 프로그래밍이 필요없습니다. 몇 번의 클릭만으로 PWM 값을 입력할 수 있고, LED 를 켜기 위해 해당 핀을 클릭하여 output 입력칸에 '1'이라는 숫자만 입력하면 됩니다.


"Automates pin & pin, pin & web services"

GPIO pin을 자동화 규칙을 만들기 위한 'sensor', 'actuator'로 사용할 수 있습니다.
"PIR 센서에 모션이 감지되면, GPIO 17의 LED의 불이 켜져라"

"오늘 오후 날씨가 '맑음'이면, GPIO18의 PWM value를 10으로 줄여라"
몇 가지 예를 들어봤는데요, 모두 쓸 수 없을만큼 많은 자동화 규칙을 만들 수 있습니다.
우리가 상상하기 나름이겠죠?
자동화가 가능한 이유는 소개드렸던 '엠비언시(Ambiency)'이기에 가능합니다.

앞으로 [Casual hakcing] 코너에서 GPIO를 이용하여 다양한 PROTA Pi 프로젝트를 소개해드리겠습니다.

2015. 1. 13.

[Casual hacking] Introduce GPIO app for Raspberry Pi

 [Casual hacking] GPIO app for Raspberry Pi 

What is GPIO?
GPIO stands for General Purpose Input/Output. By integrating with software, electrical input and output of a device can be controlled.

This blog post is about GPIO Raspberry Pi, one of the most popular board out there.

If you are one of its users, you’ll be able to see that it’s quite different from how you managed and built it before.




(Above is what the GPIO app looks like)


(This is what inside the app looks like when you first launch it.)


(Python code to test input & output)

This’s what it looked like before when trying code to control pins.

To list functions in the GPIO UI you’ve seen above, they are as follows:
GPIO / SPI, UART, I2C / Pull up & down / PWM

1) GPIO pins
- Input, Output


Select the specific GPIO pins that you wish.
When selected it provide you options like the following.


Selecting Input will let you Read.
You can find out if the current GPIO state is 0 or 1 with this option.


Selecting Output will send data of 0 and 1 to the specific device.
For instance, when trying to control the LED using Raspberry Pi, you can control its power using True(=1), False(=1) using python. Writing 1 in blank will turn on the LED and 0 in blank will turn off the LED.

2) PWM - GPIO18 pin
- 1 ~ 1023 write


Inputting 1023 like in the above will increase the voltage to its highest level.

What’s unique about using a GPIO app is that you can select input or output values with a few clicks.

However, this’s the real reason why it was created.


GPIO can be integrated with other apps. They can easily integrated for automation.
In the next blog post, you can find out more about how to integrate the values from GPIO with other apps and how to setup PI, UART, I2C, and Interrupt(rising, falling).

2015. 1. 10.

[Casual hacking] Introduce GPIO app for Raspberry Pi

 [Casual hacking] GPIO app for Raspberry Pi 


GPIO 란?
Genenral Purpose Input/Output. 쉽게 말해 다용도 입출력 포트를 말합니다.
GPIO를 소프트웨어와 연동해서 전기 입력 및 출력 신호를 이용하여 소프트웨어에서 구현하려고 했던 디바이스 컨트롤을 행하죠.

이번에 다루는 GPIO는 세계적인 열풍을 불러 일으킨 라즈베리파이(Raspberry Pi) GPIO 입니다!

기존 라즈베리파이 유저분들이라면 신세계를 맞이할 것 같네요^^



 (위에 GPIO 앱이 보이시나요?)

(GPIO app을 접속하면 처음 보시게 되는 Shell 화면입니다.)


(Input & Output test를 위한 python code)

기존에는 위와 같은 코딩을 통해서 pin들을 컨트롤해왔었죠?!

이제 위 이미지에서 봤던 GPIO 앱 UI를 순서대로 하나씩 설명해 드리겠습니다!^^
GPIO / SPI,UART,I2C / Pull up & down / PWM

1) GPIO pins 
    - Input, Output

해당 GPIO pin 들을 마우스로 선택해줍니다.
선택하면 아래의 옵션이 보이게 되죠.
input option은 Read 를 할 수 있습니다.
현재 해당 GPIO 의 상태가 0인지 1인지를 판단할 수 있죠!



 Output option은 1과 0을 입력하여 해당 device에 data값을 보내줍니다.
예를 들자면,
기존 Raspberry Pi를 이용하여 LED 를 컨트롤 하려고 하면, python 의 경우 True(=1), False(=1)로 LED 의 전원을 제어할 수 있었죠!
blank에 1을 Write하면 LED 가 켜지고, 0을 Write하면 LED 가 

2) PWM - GPIO18 pin
    - 1 ~ 1023 write

위의 이미지에서는 PWM값을 1023으로 입력하여 전압 폭을 늘리는 시도를 하고 있네요!

GPIO 앱을 사용하면 기존의 번거로운 코딩없이 입출력을 클릭 몇번으로 사용할 수 있는 것이 큰 매력이라고 할 수 있습니다.

하지만 GPIO 앱이 개발된 가장 큰 이유는 바로!

PROTA에 설치되어 있는 다른 앱들과의 자동화를 실현할 수 있다는 점입니다!!
실제로 GPIO 값을 다른 앱들과 연동하여 자동화 하는 case는 SPI, UART, I2C, Interrupt(rising, falling) 값을 설정하는 법과 함께 다음 포스팅에서 소개해드리겠습니다!^^