แสดงบทความที่มีป้ายกำกับ raspberry pi แสดงบทความทั้งหมด
แสดงบทความที่มีป้ายกำกับ raspberry pi แสดงบทความทั้งหมด

วันศุกร์ที่ 12 กรกฎาคม พ.ศ. 2556

เริ่มต้นกับ Secure Shell (ssh) บน Raspberry pi

Standard
          พอดีน้องที่มหา'ลัยกำลังเริ่มต้นกับ raspberry pi แล้วเค้าถามถึงการจะ remote ไปใช้งานผ่านทาง Secure Shell หรือที่คุ้นหูคือ ssh ว่าจะต้องทำอะไรยัง
           แล้ว Secure Shell คืออะไร ? ผมเขียนคร่าวๆ แล้วกันนะครับ ส่วนลึกๆ สามารหาอ่านได้จาก internet ครับ  Secure Shell ก็คือ protocol แบบนึงที่มีความปลอยภัยเพื่อนใช้ในการ remote ไปยังเครื่องคอมพิวเตอร์ปลายทาง ซึ่งโดยทั่วไปจะใช้ port 22 ในการสื่อสารครับ แต่นอกจากจะใช้ remote แล้ว ssh ยังสาามารถใช้ในการ upload/download file ที่เครื่องปลายทางได้อีกด้วย

วันพุธที่ 3 กรกฎาคม พ.ศ. 2556

Raspberry Pi i/o ภาษาซี ด้วย lib BCM2835

Standard
         การเขียน i/o ผ่าน pin ของ Raspberry Pi ผมใช้ library ภาษาซี จาก http://www.open.com.au/mikem/bcm2835/ โดย Core CPU ของ Raspberry Pi นั้นคือ chip Broadcom BCM2835 มาเริ่มกันเลยครับ


1.ขั้นแรกสร้าง folder เพื่อใช้เก็บ library และ source 
#mkdir /store
#mkdir /store/lib


วันพฤหัสบดีที่ 27 มิถุนายน พ.ศ. 2556

Raspberry Pi "warning: Setting locale failed"

Standard


     หากใครที่เพิ่งลง raspberry pi มาใหม่แล้วเจอ warning
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings: 

LANGUAGE = (unset),
LC_ALL = (unset),
LC_CTYPE = "UTF-8",
LANG = "en_US.UTF-8"
      are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
locale: Cannot set LC_CTYPE to default
locale: No such file or directory locale: Cannot set LC_ALL to default locale: No such file or directory

Raspberry Pi setup Lan & WLan Interface

Standard


  1. วิธีการตั้งค่า interface ของ raspberry pi ให้แก้ไขที่ไฟล์ etc/network/interfaces
  2. $vi etc/network/interfaces

Raspberry Pi reading CPU, GPU temperature and CPU frequency script

Standard


Script สำหรับอ่านค่า อุณหภูมิของ CPU GPU และ ความถี่ของ CPU สำหรับ Raspberry Pi

วันพุธที่ 26 มิถุนายน พ.ศ. 2556

Reading CPU Temperature of Raspberry Pi

Standard



Reading CPU Temperature of Raspberry Pi in file
/sys/class/thermal/thermal_zone0/temp
this file show in milli celsius (m˚C) unit,  divide 1000 convert to ˚C
for example
44388 ÷ 1000 = 44.388 ˚C

Script for caculate in celsius unit

#!/bin/bash

temp=`cat /sys/class/thermal/thermal_zone0/temp`
real_temp=`bc <<< "scale = 3; ($temp/1000)"`
echo "CPU Temperature $real_temp ˚C"

Note : please install bc first.
           #apt-get install bc

วันเสาร์ที่ 25 พฤษภาคม พ.ศ. 2556

PiMyLib : PiMyLCD free library for Raspberry Pi + LCD16x2 + LCD5110

Standard

    Library สำหรับเชื่อมต่อจอ GLCD5110 หรือ LCD แบบ 16x2 โดยออกแบบมาแน้นใช้งานได้ง่าย

โดยสามารถ Download Source Code ได้จาก Github : PiMyLib

ทำ LED ไฟวิ่งด้วย Raspberry Pi

Standard
   

     เห็นไฟดาวตกที่เป็นแถวๆ แล้ววิ่งแบบมีการหรี่ขณะวิ่งผมว่ามันสวยดีเลยลองสั่ง LED แบบแถว กะว่าเอามาลองทำเล่นดูบ้าง แต่อันนี้มีแค่ 10 ดวงเองดูสั้นๆ ยังไงก็ไม่รู้ 555+