Advance Innovation Centre
  • AIC Knowledge @ EEC for All
  • 😎Logical Thinking
    • Karel Robot
    • Code to Flowchart
    • Play with Docker
    • CNX Software
  • MCU & Interfacing with Infineon PSOC™
    • Basic MCU Interfacing
      • Introduction to CY8CKIT-062S2-43012 Pioneer Kit
      • Development Environment Preparation
      • PSoC™ 6S2 Peripherals Interfacing (GPIO)
        • Hello World and LED Blinking
        • GPIO Principles
        • PSoC™ 6S2 GPIO-HAL LED Blink Lab
        • PSoC™ 6S2 GPIO-PDL LED Blink Lab
        • Button "Bounce" Principles
          • Push/Pull Button to Turn ON/OFF LED via HAL
          • Push/Pull Button to Turn ON/OFF LED via PDL
          • GPIO Button Interrupt via HAL
          • GPIO Button Interrupt via PDL
        • GPIO variables & functions
      • PSoC™ 6S2 Peripherals Interfacing (ADC, PWM)
        • PSoC™ 6S2 SAR ADC
          • ADC Principles
          • PSoC™ 6S2 with ADC Labs
            • Reading potentiometer sensor value via an ADC HAL
            • Reading potentiometer sensor value via an ADC PDL
        • PSoC™ 6S2 PWM & TCPWM
          • PWM Principles
          • PSoC™ 6S2 for PMW Function Labs
            • LED Brightness using PWM via HAL
            • LED Brightness using PWM via PDL
    • Sensor Interfacing and HMI
      • OLED Display
        • OLED Display Principles
        • Calling BDH’s OLED functions
        • Display ADC via Potentiometer on OLED
      • BDH Shell
        • Shell Principles
        • LED Blinking and CAPSENSE via BDH Shell
        • Adding "History" command
        • Adding "Reboot" command
        • CAPSENSE Button and Slider
          • CAPSENSE Button and Slider with Capsense Tuner
          • CAPSENSE Button and Slider using FreeRTOS
    • Serial Communication & Visualization
      • UART, I2C, SPI Communication via Infineon PSoC™6
      • BMX160 Sensor Communication via Infineon PSoC™6
        • Reading ADC via HAL with Potentiometer and Displaying GUI on Serial Studio
        • Reading XENSIV-DPS-3XX Pressure Sensor and Displaying GUI on Serial Studio
        • Motion Sensors GUI Integration via Serial Studio
    • IoT Connectivity & Data Analytics via Node-Red
      • Node-Red Installation
      • Setting MQTTS to MQTT Broker
      • Sending PSoC6’s sensor to MQTT (node-red)
    • Edge AI on PSoC™
      • Machine Learning on PSoC™6 via Edge-Impulse
    • Infineon PSoC™ Troubleshooting
  • IoT Development with Infineon PSOC™ & BDH Platform
    • PSoC™ IoT Development Kit
      • Introduction to CY8CKIT-062S2-43012 Pioneer Kit
      • Development Environment Preparation
        • Hello World and LED Blinking
    • IoT Connectivity
      • Node-Red Installation
      • Controlling PSoC™ LED using MQTT
      • Setting MQTTS to MQTT Broker
      • Sending PSoC6’s sensor to MQTT (node-red)
    • BDH IoT Connectivity
    • WireLinX™ IoT PLC
    • BDH X-Brain Data Analytics
      • PSoC6 Data Collection to CSV log file
    • Data Visualization
      • สร้าง Dashboard ด้วย Looker Studio
  • 🖥️Operation Systems
    • Prerequisites
      • Guideline from Ubuntu
        • Ubuntu and VSCode on WSL2
      • ติดตั้ง WSL 2
      • Run Ubuntu on VirtualBox7
    • Zero to Linux Hero
      • Computer OS Architecture
      • Anatomy of Linux System
        • UNIX/Linux History
        • UNIX/Linux Evolution
        • GNU Project
        • Linux OS Architecture
        • Command Line Interface (CLI)
          • Basic Commands
          • 😎Level up your Linux Shell
          • File & Dir. Commands
          • Searching Commands
          • 😎ChatGPT-based Terminal
          • SysAdmin Commands
          • Network Commands
          • Hacker Commands
        • Busybox
        • Shell Script
          • Awk Script
          • Bash Shell Script
            • Bash Snippets
            • Bash Useful Examples
      • Anatomy of Linux Kernel
        • Linux Kernel Principles
        • Linux Environment for Developer
      • Anatomy of Embedded Linux
        • Embedded Linux
        • Host & Target
        • Cross Toolchains
        • Bootloader
        • Building Embedded Linux
    • Linux OS Dev. Engineer
      • Process Management
        • Process Basic
        • Process State
        • Basic Process Mgmt. Commands
        • Advance Process Mgmt. Commands
        • Process API Programming
      • IPC
        • IPC Anatomy
        • Signal Programming
        • Pipe Programming
        • FIFO Programming
        • Msg. Queue Programming
          • System V
        • Share Memory Programming
          • System V
        • Socket Programming
      • POSIX Threads
        • Multi-tasking Basic
        • POSIX Thread Anatomy
        • Threading Programming
      • Applied IPC
        • Remote Commander
        • Multi-Remote Commanders
      • Process Synchronization
        • Mutex Programming
        • Semaphore Programming
      • Applied IPC with Semaphore
  • ⌚Embedded Systems Development
    • Introduction to ESD
      • Why's ESD?
      • What it use for?
      • How it works?
    • Enbedded System Development via PSoC6
      • Basic MCU Interfacing
        • Introduction to CY8CKIT-062S2-43012 Pioneer Kit
        • Development Environment Preparation
        • PSoC™ 6S2 Peripherals Interfacing (GPIO)
          • Hello World and LED Blinking
          • GPIO Principles
          • PSoC™ 6S2 GPIO-HAL LED Blink Lab
          • PSoC™ 6S2 GPIO-PDL LED Blink Lab
          • Button "Bounce" Principles
            • Push/Pull Button to Turn ON/OFF LED via HAL
            • Push/Pull Button to Turn ON/OFF LED via PDL
            • GPIO Button Interrupt via HAL
            • GPIO Button Interrupt via PDL
          • GPIO variables & functions
        • PSoC™ 6S2 Peripherals Interfacing (ADC, PWM)
          • PSoC™ 6S2 SAR ADC
            • ADC Principles
            • PSoC™ 6S2 with ADC Labs
              • Reading potentiometer sensor value via an ADC HAL
              • Reading potentiometer sensor value via an ADC PDL
          • PSoC™ 6S2 PWM & TCPWM
            • PWM Principles
            • PSoC™ 6S2 for PMW Function Labs
              • LED Brightness using PWM via HAL
              • LED Brightness using PWM via PDL
      • Sensor Interfacing and HMI
        • OLED Display
          • OLED Display Principles
          • Calling BDH’s OLED functions
          • Display ADC via Potentiometer on OLED
        • BDH Shell
          • Shell Principles
          • LED Blinking and CAPSENSE via BDH Shell
          • Adding "History" command
          • Adding "Reboot" command
          • CAPSENSE Button and Slider
            • CAPSENSE Button and Slider with Capsense Tuner
            • CAPSENSE Button and Slider using FreeRTOS
      • Serial Communication & Visualization
        • UART, I2C, SPI Communication via Infineon PSoC™6
        • BMX160 Sensor Communication via Infineon PSoC™6
          • Reading ADC via HAL with Potentiometer and Displaying GUI on Serial Studio
          • Reading XENSIV-DPS-3XX Pressure Sensor and Displaying GUI on Serial Studio
          • Motion Sensors GUI Integration via Serial Studio
    • Edge Computing and IoT Connectivity
    • Cloud-Based Data Analytics and Digital Twin
    • Edge Vision AI
    • Resources
      • Basic Hardware and Firmware
        • Environment Preparation
          • การติดตั้งโปรแกรม Arduino IDE
            • ตัวอย่างการเริ่มต้นใช้งาน Arduino IDE
          • การติดตั้งโปรแกรมสำหรับใช้งานเครื่องมือวัด NI MyDAQ
            • ตัวอย่างการตั้งค่าใช้ Digital Multimeter -NI ELVISmx
            • ตัวอย่างการตั้งค่าใช้ Oscilloscope-NI ELVISmx
          • ติดตั้งโปรแกรม KingstVIS
        • Basic measurement
          • Basic Digital and Analog I/O
            • LAB: Basic Digital Input/Output
            • LAB: Basic Analog Input/Output
          • Waveform
            • LAB: Oscilloscope
            • LAB: Oscilloscope and Function Generator
            • LAB: Pulse Width Modulation (PWM)
              • Homework
        • Interfacing and Communication
          • LAB: UART, RS485, RS232 Protocol
          • LAB: I2C Protocol
            • HOMEWORK
          • LAB: SPI Protocol
      • IoT Connectivity
        • Example: IoT with MQTT on Node-red
        • Data logger
        • LAB: Data Visualization
  • 🛠️C/C++ for Embedded Programming
    • Development Environment Preparation
      • ติดตั้ง WSL 2
      • ติดตั้ง Ubuntu environment
      • ติดตั้งโปรแกรม Visual Studio Code
      • การเชื่อมต่อ Virtual studio code เข้ากับ WSL
      • ติดตั้ง docker on WSL
    • Principle C/C++ Programming
      • Get started with C++
      • Makefile
        • Makefile Examples
      • Compiling and running
        • How to create a program that you can enter inputs.
          • Lab 1 Exercise
      • Arguments
        • Command line arguments in C and C++
      • signed and unsigned data types
      • Variable and Operator
      • If and If else
      • Loop, Infinite loop, and flag
        • Loop and Flag exercise
      • Array
        • Get to know with arrays
        • Implement example
      • Vector
    • Object Oriented Programming (OOP) in C++
      • Class and Object
      • Encapsulation and Abstraction
      • Polymorphism and Inheritance
    • C/C++ Preprocessing
      • Macro
        • Quiz Macro
      • File Inclusion
      • Conditional Compilation
      • Pragma directive
        • Quiz Pragma
    • String in C++
      • Concatenation
      • Split
    • Type conversions for C/C++
      • Conversion using Cast operator
    • Error handling
    • Data logger
      • การสร้างไฟล์และเขียนไฟล์
      • การอ่านไฟล์
      • การเก็บข้อมูลกับTime stamp
    • High performance programing
      • Multi-task and Multi-thread
        • Multi-threading example
      • Mutex
      • Queue
      • OpenCV
    • C/C++ Techniques
      • Makefile in action
      • Object Oriented Programming (OOP) in C++
        • Class and Object
        • Encapsulation and Abstraction
        • Polymorphism and Inheritance
      • C/C++ Preprocessing
        • Macro
          • Quiz Macro
        • File Inclusion
        • Conditional Compilation
        • Pragma directive
          • Quiz Pragma
      • Binary, Octal and Hexadecimal Numbers
      • Array and properties of an array
        • Get to know with arrays
        • Implement example
      • What's next?
  • 🤖Artificial Intelligence (AI)
    • VAMStack Design House, BUU
    • Data Analytics
      • Data cleansing
      • Data analytics
      • Data analytic exercise
    • Machine Learning
      • Neural Network Layers
      • Machine learning type
      • Dataset
      • Using Edge Impulse for AI Model
    • Basic Image Processing
      • Computer Vision using Python Language
        • Installation
        • Computer Vision Basics
          • Pixel and Color
          • Draw image
          • Basic Image processing
          • Morphology Transformations
          • Gaussian blur
          • Simple Thresholding
          • Contour
          • Canny edge detection
        • Case Study
          • Coin counting
          • Color detection & tracking
        • VAM_CV SDK
  • ⚙️FPGA Design and Development
    • Verilog HDL via Vivado IDE
      • LAB1: Setting Environment and Create Project
        • Create Vivado Project
      • LAB2: Hardware Description Language Work Flow
        • Simulation code
      • LAB3: Design HDL Project
        • Top Level Design
        • Top-level Simulation
      • LAB4: Asynchronous VS Synchronous Circuit
        • Simulation Synchronous counter
    • C/C++ Programming on Ultra96v2 FPGA Board
      • Application C/C++ on Ultra96v2 Part 1
        • Design Overview
        • Step 1 - Burn the image to SD card
        • Step 2 - Bring up Ultra96v2
        • Step 3 - Installing the Vitis-AI runtime packages
      • Application C/C++ on Ultra96v2 Part 2
        • STEP 1 : Setting auto boot Wifi
        • STEP 2 : How to working on Embedded
        • STEP 3 : How to run the test code
  • 🤖Robotics
    • Dobot Magician
      • Instruction of Dobot
      • Software Download
      • Basically of Program
        • Teaching and Playback
        • Write and Draw
        • LaserEngraving
        • 3D Printer
    • Robotino
      • Software Download
        • Robotino View
        • Robotino SIM
      • Charging
      • Connecting
      • Follow Line example
        • Basic block in Follow Line
    • RaspBlock
      • Get Started with Raspblock
  • 🚩Special Topics
    • Node-Red
      • Set up Raspberry Pi
      • Install node red in Raspberry Pi
      • Get started with Node Red
        • Open node-red
        • Turn off node red
        • Install Dashboard on Node-red
        • Use node red to show message
        • Using Ultrasonic sensor with node-red
    • IoT Cloud
      • Overview
        • How do they work?
          • Basic Knowlege
      • Installations
        • Install Docker
        • Install Mosquitto Broker
        • Install InfluxDB
        • Install Telegraf
        • Install Grafana
      • Get Sensor Value and Send to MQTT
        • Connect ESP3266 to sensor
        • Connect ESP3266 to MQTT
      • Integration
    • Senses IoT
      • SENSES IoT Platform
      • LAB8: MCU send data to IoT platform
    • CrowPi Dev Kit
      • Raspberry Pi with CrowPi
      • Remote to Raspberry Pi
      • Cross-Compile
        • Lab 1: Programming and cross complier
      • Hardware and Interfaces Usage CLI
        • LAB: Usage GPIO via CLI
        • LAB: Scan I2C bus via CLI
      • Python library for Crow Pi
      • wiringPi library (C) for CrowPi
        • Lab2: Crowpi and sensors
    • LVGL Development
      • LVGL - Light and Versatile Embedded Graphics Library
        • Setting program for LVGL Simulator
        • Get started with LVGL simulator
        • Example Library of LVGL
        • Create your own screen
          • Exercise
        • Style
          • Exercise
        • Event
    • Docker OS
      • Docker OS Part 1
        • Part 1 : Installation
        • Part 2 : Basic Docker OS and Linux CLI
      • Docker OS Part 2
        • Part 1 : Docker communication
        • Part 2 : Docker compose
      • Application Gstreamer on devcontainer
        • STEP 1 : Setting gstreamer environment
        • STEP 2 : Create the Gstreamer element on template
        • STEP 3 : Testing and application on your gst element
  • 🤟Recommended by AIC
    • Skill Roadmap
      • Embedded Engineer
      • Developer
    • Hardware Programming
    • Embedded Programming
    • General-propose Programming
    • Algorithmica
    • Thai Expert Knowledge
    • RT-Thread University Program
      • Infineon PSoC6
      • Kernel
        • Kernel Basics
        • Thread Management
        • Clock Management
        • Inter-thread synchronization
        • Inter-thread communication
        • Memory Management
        • Interrupt Management
        • Kernel porting
        • Atomic Operations
        • RT-Thread SMP
        • Kernel API Changelog
      • Tools
      • Devices & Drivers
        • SENSOR Devices
        • Touch Equipment
        • CRYPTO Devices
        • AUDIO Devices
        • Pulse Encoder Devices
      • Components
        • C Library (libc)
        • ISO/ANSI C Standard
        • POSIX Standard
          • FILE (File IO)
          • Pthread
          • Timer
          • IPC Semaphore
          • IPC Message Queues
          • Dynamic Modules
        • Network Components
          • FinSH Console
          • FAL: Flash Abstraction Layer
          • Virtual File System
          • tmpfs: temporary file system
          • ulog log
          • utest testing framework
          • Power Management
          • RT-Link
        • Software Packages
          • Internet of Things
            • MQTT-umqtt
            • Telnet
          • Tools
            • SystemView
            • SEGGER_RTT
          • LVGL Manual
            • Touch Screen Driver
      • Demo
        • Infineon Gateway
        • Handwriting Recognition (MNIST)
        • Object Detection (Darknet)
        • ROS using RT-Thread
        • Control the car using RT-Thread
        • LiDAR via RT-Thread
        • Detection via RT-Thread and ROS
        • Sensor Driver Development Guide
Powered by GitBook

Assoc. Prof. Wiroon Sriborrirux, Founder of Advance Innovation Center (AIC) and Bangsaen Design House (BDH), Electrical Engineering Department, Faculty of Engineering, Burapha University

On this page
  • Remote to Raspberry Pi
  • How to Find IP adress
  • Secure Shell (SSH)
  • LAB1: ทดสอบคอมไพล์และรันโปรแกรม hello.c
  • แบบฝึกหัดที่ 1:
  • แบบฝึกหัดที่ 2:
  • SSH-Putty tool
  • SSH-WSL
  • Virtual Network Computing (VNC)
  • Using Secure Copy (SCP)
  • LAB2: คัดลอกไฟล์ hello_world.cpp ไปยัง RaspberryPi

Was this helpful?

  1. Special Topics
  2. CrowPi Dev Kit

Remote to Raspberry Pi

เพื่อให้ผู้เรียนทดลองเข้าใช้งานบอร์ด RaspberryPi ผ่านการแสดงผลบนคอมพิวเตอร์

Remote to Raspberry Pi

การใช้งานบอร์ด RaspberryPi เป็นเหมือนคอมพิวเตอร์ขนาดเล็กจะต้องทำการต่อจอแสดงผลและ คีย์บอร์ดเพิ่มเพื่อให้สามารถใช้งานโดยตรงได้ การ Remote เป็นอีกวิธีหนึ่งในการเข้าใช้งานบอร์ด RaspberryPi โดยไม่จำเป็นต้องหาอุปกรณ์ต่อพ่วงเข้าไปกับบอร์ด เพื่อเพิ่มความสะดวกในการใช้งาน ซึ่งวิธีการ remote นั้นมีหลายวิธียกตัวอย่างเช่น การใช้ Secure shell(SSH) protocol ที่เป็นการเข้าถึง Raspberry pi โดยใช้ command line หรือ Virtual Network Computing (VNC) ที่สามารถเข้าถึง Raspberry pi และสามารถควบคุมโดยแสดงหน้า Desktop ของ Raspberry Pi บนคอมพิวเตอร์ให้ด้วย อย่างไรก็ตามทั้งสองแบบจะสามารถเข้าถึง Raspberry pi ได้จะต้องรู้ IP address ของ RaspberryPi ก่อน

How to Find IP adress

เนื่องจาก Raspberry Pi OS รองรับ multicast Domain Name System (mDNS) เราสามารถสแกนหา IP address ของ Raspberry pi ได้จากชื่อ hostname ตามด้วย .local จากแล็ปก่อนหน้านี้เรา ตั้งค่าเริ่มต้น hostname ว่า “raspberrypi” ไว้ก่อนที่ flash OS ลง SD card ดังนั้นเราสามารถ scan หา IP address ของ raspberry pi ด้วย command line ด้านล่างนี้

For Windows, Linux/mac

ping raspberrypi.local

Secure Shell (SSH)

เมื่อเราทราบ IP address ของ raspberry pi แล้วเราสามารถ Remote โดย ใช้ SSH Command line บน mac/Linux terminal หรือ command Prompt บน Windows ดังนี้

ssh pi@raspberrypi.local

Password ของ Raspberry Pi คือ "raspberry"

***หมายเหตุ network ของบอร์ด RaspberryPi และคอมพิวเตอร์ที่ต้องการ Remote ต้องอยู่ใน local เดียวกันและ ทำการตั้งค่า ssh interface บนบอร์ดแล้ว

LAB1: ทดสอบคอมไพล์และรันโปรแกรม hello.c

คำสั่งพื้นฐานที่ใช้มีดังนี้ cd, cat, mkdir

หลังจาก Remote เข้า Raspberry Pi แล้วให้ทำการเขียน โปรแกรม hello.c ด้วยคำสั่ง cat ลงในไดเรกทอรี lab01 โดย code มีดังนี้

#include <stdio.h>
int main()
{
int i;
for (i=0; i<10; i++) printf(“hello world\n”);
}

เราสามารถคอมไพล์โปรแกรมภาษา c ด้วยคำสั่งนี้

gcc -o hello hello.c

เราสามารถรันโปรแกรมได้โดยใช้ไฟล์ที่คอมไพล์แล้ว

./hello

แบบฝึกหัดที่ 1:

1. จงใช้คำสั่ง mkdir สร้างไดเรกทอรีไฟล์ไฟล์ ชื่อ “hello101” และใช้คำสั่ง cat สำหรับสร้างไฟล์ โดยแต่ละไฟล์ให้ใส่ข้อมูลดังนี้

  1. id.txt ให้ใส่ รหัสนิสิต

  2. name.txt ให้ใส่ ชื่อ นามสกุล

เมื่อใช้ คำสั่ง tree จะได้ผลตามภาพด้านล่าง

และ ใช้ คำสั่ง cat แสดงข้อมูลในแต่ละไฟล์บันทึกผลภาพข้อมูลที่แสดง

2. ใช้คำสั่ง cp สำหรับ copy ไฟล์ hello.c และ hello ที่คอมไพล์แล้วจากการทดลองก่อนหน้ามาไว้ในไดเรกทอรี hello101 แล้วใช้คำสั่ง tree เพื่อแสดงโครงสร้างไฟล์ทั้งหมดในไดเรกทอรี บันทึกผล

แบบฝึกหัดที่ 2:

No.

คำสั่ง

คำอธิบาย

ผลการทดลอง

1

2

:

20

SSH-Putty tool

1.หลังจาก Dowload และติดตั้งโปรแกรม เปิดโปรแกรมจะพบหน้าต่างดังภาพด้านล่าง

2. ระบุ IP address ของ RespberryPi ลงช่อง Host name และใช้ port 22

3. ตรวจสอบ Connection type ให้ติ๊ก SSH แล้วคลิ๊ก Open จะปรากฎหน้าต่างตามด้านล่าง

  • หลัง login as : พิมพ์ "pi" แล้ว enter เมื่อหน้าต่างขึ้นถามหารหัสผ่านของ RaspberryPi ใส่ดังนี้ "raspberry"

เมื่อพิมพ์รหัสผ่าน จะไม่มีตัวอักษรใด ๆ ปรากฎ โปรดพิมพ์รหัสให้ถูกต้อง

  • เมื่อปรากฎดังภาพด้านล่างแสดงว่าสามารถ Remote เข้า RespberryPi ได้สำเร็จ

  • เมื่อ Remote สำเร็จเราสามารถใช้คำสั่ง command สำหรับใช้งาน RaspberryPi ได้เลย

SSH-WSL

เราสามารถ Remote โดยใช้ ssh command บน Terminal Vscode ได้ดังนี้

  1. เปิด Virtual studio code และตรวจสอบว่า ได้เชื่อมต่อกับ WSL แล้วหรือไม่

ถ้า Virtual studio code ยังไม่เชื่อมต่อ WSL ให้ทำดังนี้

คลิ๊ก ปุ่มสีเขียวมุมซ้ายด้านล่างของหน้าต่างโปรแกรม VScode

หน้าต่างโปรแกรม Vscode จะแสดงช่องค้นหา

ให้เลือก Remote-WSL: New Window using Distro... >>Ubuntu 18.04 จะปรากฎหน้าต่าง Vscode ที่เชื่อมต่อ WSL

ไปที่แถบเมนู เลือก terminal>>New terminal

Virtual Network Computing (VNC)

VNC Viewer Program***รูปตัวอย่างการแสดงผลเชื่อมต่อ Rpi

Using Secure Copy (SCP)

Secure Copy (SCP) เป็นคำสั่งสำหรับส่งไฟล์บน SSH protocol ซึ่งสามารถคัดลอกไฟล์ระหว่างคอมพิวเตอร์หรือ RaspberryPi ได้โดยจะต้องรู้ IP address ของ Raspberry Pi ที่เราต้องการส่งไฟล์ไป

LAB2: คัดลอกไฟล์ hello_world.cpp ไปยัง RaspberryPi

  1. สร้างไฟล์ hello_world.cpp แล้วใส่ code ด้านล่างลงไปแล้ว save

#include <iostream>
#include <vector>
#include <string>
using namespace std;
int main()
{
   vector<string> msg {"Hello", "C++", "World", "from", "VS Code", "and the C++ extension!"};
   for (const string& word : msg)
   {
      cout << word << " ";
   }
   cout << endl;
}

2. คัดลอกไฟล์ hello_world.cpp ไปยังไดเรกทอรี LAB1 ที่ได้สร้างก่อนหน้าใน RaspberryPi โดยใส่ คำสั่ง scp

scp hello_world.cpp pi@ip-address:~/ไดเรกทอรีLAB1

3. เมื่อเข้าไปยังบอร์ด RaspberryPi อีกครั้งให้ตรวจสอบไฟล์ที่ได้ทำการคัดลอกมาในขั้นตอนก่อนหน้าที่โดยพิมพ์ ls บันทึกผล

4. ทำการ compile code ภาษา c++ โดยใช้คำสั่งดังนี้

g++ hello_world.cpp -o hello02

5. ทดลองรันโปรแกรมและบันทึกผล

./hello2

6. ใช้คำสั่ง tree และบันทึกภาพโครงสร้างไฟล์ที่มีในไดเรกทอรีทังหมด

Date: May 2023

Author: Soontree Jaikhong (AIC-Researcher)

Author: Thanaluk Pranekunakol (AIC-Researcher)

PreviousRaspberry Pi with CrowPiNextCross-Compile

Last updated 1 year ago

Was this helpful?

ผลการรัน
โครงสร้างไฟล์ใน ไดเรกทอรี hello101

ให้เลือก คำสั่ง 20 คำสั่ง จากลิ้ง บันทึกผลการใช้งานและอธิบายคำสั่งที่ใช้ โดยมีรูปแบบตารางการเก็บผลตามด้านล่างนี้

สามารถ และติดตั้งลงคอมพิวเตอร์เพื่อทดลองใช้ได้เลย สำหรับการใช้ putty สามารถทำได้ดังนี้

เราสามารถเข้าถึง Raspberry pi และมี Desktop แสดงผลแบบกราฟฟิกบนคอมพิวเตอร์ของเราได้โดยการใช้ VNC ซึ่งใน Raspberry pi OS เราจะต้องเข้าไปตั้งค่าเปิดการใช้งาน VNC ที่การตั้งค่า Interfaces ของ Raspberry Pi สำหรับบนเครื่องคอมพิวเตอร์ที่ต้องการเข้าถึง Raspberry Pi และมีกราฟฟิกแสดงผลดาวน์โหลดและติดตั้งโปรแกรม ได้ทั้ง Linux mac และ Windows ตาม OS ของคอมพิวเตอร์ที่เราใช้ โดยใส่ IP address ของ Raspberry pi ลงไปในช่อง ค้นหา ถ้าสามารถสามารถเชื่อมต่อได้จะมีหน้า Desktop ของ raspberry pi แสดงขึ้นมาสามารถคลิ๊กเพื่อใชงานได้เลย ซึ่งโปรแกรมจะใช้หน้าจอคอมพิวเตอร์ของเราเป็นหน้าจอแสดงผลของ Raspberry Pi

🚩
Basic Linux commands
Download
VNC viewer
หน้าต่าง setting putty
หน้าต่าง login เพื่อ Remote เข้า Rpi โดยใช้ Putty
หน้าต่าง Remote Putty
Virtual studio code conneted WSL Ubuntu-18.04
button Open a Remote Windows
Open a Remote Windows