Raspberry Pi: Unterschied zwischen den Versionen

Aus HSHL Mechatronik
Zur Navigation springen Zur Suche springen
Keine Bearbeitungszusammenfassung
 
(82 dazwischenliegende Versionen von 2 Benutzern werden nicht angezeigt)
Zeile 3: Zeile 3:
'''Betreuer:''' [[Benutzer:Ulrich_Schneider| Prof. Schneider]]<br/>
'''Betreuer:''' [[Benutzer:Ulrich_Schneider| Prof. Schneider]]<br/>
'''Art:''' Praxissemester<br>
'''Art:''' Praxissemester<br>
'''Projektlaufzeit:''' 02.11.2021-20.02.2022
'''Projektlaufzeit:''' 02.11.2021 - 20.02.2022
<br clear = all>
<br clear = all>


[[Datei:Raspberry Pi.jpg|right|mini|300px|Abb.1 Raspberry Pi 4 <nowiki></nowiki>]]
[[Datei:AlphaBot with RPi.jpg|right|mini|400px|Abb.1 AlphaBot with Raspberry Pi 4 <nowiki></nowiki>]]
 
 
== Introduction ==
 
The Raspberry Pi is a single computer the size of a credit card. It features an ARM/Broadcom SoC with a GPU, RAM, and wireless and cable communication options. In some ways, it's that straightforward: the Raspberry Pi is just a small computer. However, it is not so straightforward in another manner. The Raspberry Pi is a very adaptable platform that allows you to build whatever you desire.
 
Initially, we got the AlphaBot with an Arduino attached to it and then we replaced Arduino with a Raspberry Pi 4 and used or programmed it accordingly. In this article, the idea of using Raspberry Pi 4 instead of Arduino IDE with Alphabot  is introduced. Like, how different tools make the Raspberry Pi 4 to control and work with Alphabot. Before we go further, let us take a closer look at the difference between these two boards, Arduino IDE and Raspberry Pi. Then, the installation of required softwares and role of GPIO pins to control the hardware will be explained.
 
=== Arduino ===
 
[[Datei:AlphaBot Arduino.jpg|right|mini|200px|Abb.2 Arduino Uno Plus <nowiki></nowiki>]]
 
 
Arduino is a development board that uses a microcontroller. Arduino UNO uses the ATmega328P microcontroller, which is based on Atmel microcontrollers. The Processor, RAM, and ROM are all contained in the Microcontroller on the Arduino Board (such as the ATmega328P). Supporting hardware (for power and data) and GPIO pins are included on the board. Arduino was built from the ground up as open-source hardware and software. The hardware and software of Arduino are both easily accessible. There is no need for an operating system because it is a Microcontroller. To connect to the internet using Arduino, you'll need an extra module or shield. In the case of Arduino, there is no wireless connectivity (at least on board). C or C++ programming languages can be used to programme Arduino.


<br clear = all>
<br clear = all>


=== Raspberry Pi ===
[[Datei:RPi 4.jpg|right|mini|200px|Abb.3  Raspberry Pi 4 <nowiki></nowiki>]]
The Raspberry Pi is an SBC (Single Board Computer). It's built around a Broadcom SoC, which is an ARM Cortex A Series microprocessor. The Raspberry Pi Board contains all of the necessary components, such as the processor, RAM, storage, connectors, and GPIO pins. Raspberry Pi's hardware and firmware are both closed-source, which means they are not available for general usage. To boot the Raspberry Pi, you'll need a Debian-based Linux distribution called Raspberry Pi OS. Using Wi-Fi or Ethernet, you may effortlessly connect to the internet. The Raspberry Pi includes Bluetooth and Wi-Fi technology. Python, Scratch, Ruby, C, and C++ are the most popular programming languages for Raspberry Pi application development.
<br clear=all>
==Software requirement==
* Ubuntu 20.04.3 LTS (RPi 3/4/400)
* Robot Operating System 2  (Foxy Fitzroy)
==Hardware requirement==
* Robot (AlphaBot)
* Raspberry Pi 4
* HDMI cable (for connecting RPi with Monitor)
* Network cable
* Network switch


== Introduction ==
== Project planning ==
 
[[Datei:Project Plan.jpg|left|mini|700px|Abb. 4: Project plan]]
 
<br clear=all>
 
== [[Installation of Ubuntu Server and ROS2]] ==
 
== [[Overview of ROS]] ==
 
 
 
== [[Using the Raspberry Pi’s GPIO to control hardware components]] ==


The Raspberry Pi is a single computer the size of a credit card. It features an ARM/Broadcom SoC with a GPU, RAM, and wireless and cable communication options. In some ways, it's that straightforward: the Raspberry Pi is just a small computer. However, it is not so straightforward in another manner. The Raspberry Pi is a very adaptable platform that allows you to build whatever you desire.


In this article, the idea of using Raspberry Pi 4 instead of Arduino IDE with Alphabot  is introduced. Like, how different tools make the Raspberry Pi 4 to control and work with Alphabot.


== Documentation ==
== Illustration of the robot with UML diagram ==


[[Datei:Obstacle Avoiding Robot (Use Case).jpg|left|mini|700px|Abb. 15 Use Case Diagram  ]]


* Ubuntu Server in Raspberry Pi4
<br clear=all>
* Using the Raspberry Pi’s GPIO to control hardware components
* Programming experience and tips


== [[Zusammenfassung_Praxissemester_Murad|Summary]] ==
== [[Zusammenfassung_Praxissemester_Murad|Summary]] ==


== Softwares ==
* Ubuntu 20.04.3 LTS (RPi 3/4/400). To install Ubuntu Server 20.04.3 LTS on a Raspberry Pi, please use this [https://ubuntu.com/tutorials/how-to-install-ubuntu-on-your-raspberry-pi#1-overview guide].
* Robot Operating System 2  (Foxy Fitzroy). To install ROS 2 Foxy on a Raspberry Pi, please use these [http://docs.ros.org/en/foxy/Installation/Ubuntu-Install-Debians.html instructions].
== Demo ==
The code can be run straight from the SVN repository: https://svn.hshl.de/svn/Robotik_und_Autonome-Systeme/trunk/Projekte/AlphaBot_PI_ROS2/ .
In order to know how the code can be executed from SVN directory, please go through these [https://wiki.hshl.de/wiki/index.php/Demo instructions] .


== Weiterführende Links ==
== Weiterführende Links ==
* ROS2 [https://docs.ros.org/en/foxy/Tutorials.html Tutorials].
* Difference between [https://www.electronicshub.org/raspberry-pi-vs-arduino/#:~:text=The%20main%20difference%20between%20them,supply%2C%20programming%20and%20IO%20Connectivity. Raspberry Pi and Arduino].

Aktuelle Version vom 20. März 2022, 00:31 Uhr

Autoren: Fawad Murad
Betreuer: Prof. Schneider
Art: Praxissemester
Projektlaufzeit: 02.11.2021 - 20.02.2022

Abb.1 AlphaBot with Raspberry Pi 4


Introduction

The Raspberry Pi is a single computer the size of a credit card. It features an ARM/Broadcom SoC with a GPU, RAM, and wireless and cable communication options. In some ways, it's that straightforward: the Raspberry Pi is just a small computer. However, it is not so straightforward in another manner. The Raspberry Pi is a very adaptable platform that allows you to build whatever you desire.

Initially, we got the AlphaBot with an Arduino attached to it and then we replaced Arduino with a Raspberry Pi 4 and used or programmed it accordingly. In this article, the idea of using Raspberry Pi 4 instead of Arduino IDE with Alphabot is introduced. Like, how different tools make the Raspberry Pi 4 to control and work with Alphabot. Before we go further, let us take a closer look at the difference between these two boards, Arduino IDE and Raspberry Pi. Then, the installation of required softwares and role of GPIO pins to control the hardware will be explained.

Arduino

Abb.2 Arduino Uno Plus


Arduino is a development board that uses a microcontroller. Arduino UNO uses the ATmega328P microcontroller, which is based on Atmel microcontrollers. The Processor, RAM, and ROM are all contained in the Microcontroller on the Arduino Board (such as the ATmega328P). Supporting hardware (for power and data) and GPIO pins are included on the board. Arduino was built from the ground up as open-source hardware and software. The hardware and software of Arduino are both easily accessible. There is no need for an operating system because it is a Microcontroller. To connect to the internet using Arduino, you'll need an extra module or shield. In the case of Arduino, there is no wireless connectivity (at least on board). C or C++ programming languages can be used to programme Arduino.


Raspberry Pi

Abb.3 Raspberry Pi 4


The Raspberry Pi is an SBC (Single Board Computer). It's built around a Broadcom SoC, which is an ARM Cortex A Series microprocessor. The Raspberry Pi Board contains all of the necessary components, such as the processor, RAM, storage, connectors, and GPIO pins. Raspberry Pi's hardware and firmware are both closed-source, which means they are not available for general usage. To boot the Raspberry Pi, you'll need a Debian-based Linux distribution called Raspberry Pi OS. Using Wi-Fi or Ethernet, you may effortlessly connect to the internet. The Raspberry Pi includes Bluetooth and Wi-Fi technology. Python, Scratch, Ruby, C, and C++ are the most popular programming languages for Raspberry Pi application development.


Software requirement

  • Ubuntu 20.04.3 LTS (RPi 3/4/400)
  • Robot Operating System 2 (Foxy Fitzroy)

Hardware requirement

  • Robot (AlphaBot)
  • Raspberry Pi 4
  • HDMI cable (for connecting RPi with Monitor)
  • Network cable
  • Network switch

Project planning

Abb. 4: Project plan


Installation of Ubuntu Server and ROS2

Overview of ROS

Using the Raspberry Pi’s GPIO to control hardware components

Illustration of the robot with UML diagram

Abb. 15 Use Case Diagram


Summary

Softwares

  • Ubuntu 20.04.3 LTS (RPi 3/4/400). To install Ubuntu Server 20.04.3 LTS on a Raspberry Pi, please use this guide.
  • Robot Operating System 2 (Foxy Fitzroy). To install ROS 2 Foxy on a Raspberry Pi, please use these instructions.

Demo

The code can be run straight from the SVN repository: https://svn.hshl.de/svn/Robotik_und_Autonome-Systeme/trunk/Projekte/AlphaBot_PI_ROS2/ .

In order to know how the code can be executed from SVN directory, please go through these instructions .

Weiterführende Links