diff --git a/Projects/3D/Finger_Starter/FingerStarterKit_InMoov.rar b/3D/Finger_Starter/FingerStarterKit_InMoov.rar similarity index 100% rename from Projects/3D/Finger_Starter/FingerStarterKit_InMoov.rar rename to 3D/Finger_Starter/FingerStarterKit_InMoov.rar diff --git a/Projects/3D/Finger_Starter/fingerStarter.md b/3D/Finger_Starter/fingerStarter.md similarity index 100% rename from Projects/3D/Finger_Starter/fingerStarter.md rename to 3D/Finger_Starter/fingerStarter.md diff --git a/Projects/3D/InMoov_3D_RightForearm/STL PARTS/ForeArm_AndServoBed.rar b/3D/InMoov_3D_RightForearm/STL PARTS/ForeArm_AndServoBed.rar similarity index 100% rename from Projects/3D/InMoov_3D_RightForearm/STL PARTS/ForeArm_AndServoBed.rar rename to 3D/InMoov_3D_RightForearm/STL PARTS/ForeArm_AndServoBed.rar diff --git a/Projects/3D/InMoov_3D_RightForearm/STL PARTS/InMoov silicon finger tip mold - 285972.zip b/3D/InMoov_3D_RightForearm/STL PARTS/InMoov silicon finger tip mold - 285972.zip similarity index 100% rename from Projects/3D/InMoov_3D_RightForearm/STL PARTS/InMoov silicon finger tip mold - 285972.zip rename to 3D/InMoov_3D_RightForearm/STL PARTS/InMoov silicon finger tip mold - 285972.zip diff --git a/Projects/3D/InMoov_3D_RightForearm/STL PARTS/NewThumbV2_right_fixed.stl b/3D/InMoov_3D_RightForearm/STL PARTS/NewThumbV2_right_fixed.stl similarity index 100% rename from Projects/3D/InMoov_3D_RightForearm/STL PARTS/NewThumbV2_right_fixed.stl rename to 3D/InMoov_3D_RightForearm/STL PARTS/NewThumbV2_right_fixed.stl diff --git a/Projects/3D/InMoov_3D_RightForearm/STL PARTS/NewThumbV3_base_Balse_version.stl b/3D/InMoov_3D_RightForearm/STL PARTS/NewThumbV3_base_Balse_version.stl similarity index 100% rename from Projects/3D/InMoov_3D_RightForearm/STL PARTS/NewThumbV3_base_Balse_version.stl rename to 3D/InMoov_3D_RightForearm/STL PARTS/NewThumbV3_base_Balse_version.stl diff --git a/Projects/3D/InMoov_3D_RightForearm/STL PARTS/Rotation-Wrist_InMoov.rar b/3D/InMoov_3D_RightForearm/STL PARTS/Rotation-Wrist_InMoov.rar similarity index 100% rename from Projects/3D/InMoov_3D_RightForearm/STL PARTS/Rotation-Wrist_InMoov.rar rename to 3D/InMoov_3D_RightForearm/STL PARTS/Rotation-Wrist_InMoov.rar diff --git a/Projects/3D/InMoov_3D_RightForearm/Schemas/Forearm parts scheme.png b/3D/InMoov_3D_RightForearm/Schemas/Forearm parts scheme.png similarity index 100% rename from Projects/3D/InMoov_3D_RightForearm/Schemas/Forearm parts scheme.png rename to 3D/InMoov_3D_RightForearm/Schemas/Forearm parts scheme.png diff --git a/hardware_guide/Archtecting/3D Printing/overview.md b/hardware_guide/Archtecting/3D Printing/overview.md deleted file mode 100644 index cd559f6..0000000 --- a/hardware_guide/Archtecting/3D Printing/overview.md +++ /dev/null @@ -1,42 +0,0 @@ -# A General Overview of 3D Printing - -3D printing, also known as additive manufacturing, is a transformative technology that builds three-dimensional objects layer by layer from a digital file. It allows for the creation of complex and custom shapes without the need for traditional manufacturing molds or tooling. - -## Core 3D Printing Technologies - -There are several methods of 3D printing, each with unique advantages and materials. The most common types include: - -### 1. Fused Deposition Modeling (FDM) - -This is the most widely used and accessible form of 3D printing. FDM printers work by extruding a thermoplastic filament through a heated nozzle, melting it, and depositing it layer by layer on a build platform. The layers fuse together as they cool to form a solid object. - -- **Common Materials (Filaments):** - - **PLA (Polylactic Acid):** Biodegradable, easy to print, and affordable. Ideal for prototypes and non-functional parts. - - **ABS (Acrylonitrile Butadiene Styrene):** Strong, durable, and temperature-resistant. Often used for functional parts like car components or phone cases. - - **PETG (Polyethylene Terephthalate Glycol):** A good balance between the ease of printing of PLA and the strength of ABS. It's food-safe and has good chemical resistance. - - **TPU (Thermoplastic Polyurethane):** A flexible, rubber-like material used for creating objects that need to bend or stretch. - -### 2. Stereolithography (SLA) - -SLA was the world's first 3D printing technology. It uses an ultraviolet (UV) laser to cure and solidify a liquid photopolymer resin in a vat, layer by layer. SLA is known for producing parts with extremely high detail and smooth surface finishes. - -- **Common Materials (Resins):** - - **Standard Resin:** Excellent for high-detail prototypes and models. - - **Tough/Durable Resin:** Simulates the properties of ABS plastic, designed for functional parts that can withstand stress. - - **Flexible Resin:** Creates bendable, rubber-like parts. - -### 3. Selective Laser Sintering (SLS) - -SLS uses a high-powered laser to sinter (fuse) small particles of polymer powder. As the laser draws a cross-section of the object onto the powder bed, it fuses the material together. The unfused powder provides support for the object, eliminating the need for dedicated support structures. - -- **Common Materials (Powders):** - - **Nylon (PA 11, PA 12):** The most common material for SLS. It produces strong, durable, and functional parts suitable for end-use applications. - -## The General Workflow - -The process for turning a digital idea into a physical object is consistent across technologies: - -1. **Modeling:** A 3D model is created using CAD (Computer-Aided Design) software or downloaded from an online repository. The final model is typically exported as an STL or STEP file. -2. **Slicing:** The 3D model file is imported into a "slicer" program. This software slices the model into hundreds or thousands of thin, horizontal layers and generates a machine-readable file (like G-code) with instructions for the printer. -3. **Printing:** The instruction file is sent to the 3D printer, which begins building the object layer by layer. -4. **Post-Processing:** After printing, parts often require some form of cleanup. This can include removing support structures (FDM/SLA), washing in a solvent (SLA), curing with UV light (SLA), or cleaning off excess powder (SLS). \ No newline at end of file diff --git a/hardware_guide/Archtecting/CAD/overview.md b/hardware_guide/Archtecting/CAD/overview.md deleted file mode 100644 index 328b13a..0000000 --- a/hardware_guide/Archtecting/CAD/overview.md +++ /dev/null @@ -1,33 +0,0 @@ -# What is CAD? - -Welcome to the world of Computer-Aided Design (CAD)! If you're new to this, don't worry. This guide will give you a basic understanding of what CAD is and why it's essential for our Robotic Arm project. - -## The Basics - -At its core, **CAD is the use of computers to create, modify, analyze, or optimize a design.** Instead of drawing blueprints by hand on a drafting table, we use specialized software to create digital 2D drawings and 3D models. - -Think of it like digital sculpting or building with virtual LEGOs, but with incredible precision and power. - -## Why Do We Use CAD? - -Using CAD offers several key advantages for a hardware project like ours: - -1. **Precision:** We can design parts with exact measurements, ensuring everything fits together perfectly. -2. **Visualization:** A 3D model allows us to see what the robotic arm will look like from every angle before we build anything. We can even simulate its movement to check for collisions or other issues. -3. **Easy Modifications:** If a part doesn't work as expected, we can quickly modify the digital model and 3D print a new version. This is much faster and cheaper than re-making a physical part from scratch. -4. **Collaboration:** Team members can easily share designs and work on different parts of the arm simultaneously. -5. **Manufacturing:** The digital models we create can be directly sent to manufacturing machines, like 3D printers or CNC mills, to create the physical parts. - -## Our CAD Software: Fusion 360 - -For this project, we use **Autodesk Fusion 360**. It's a powerful, cloud-based tool that combines industrial and mechanical design, simulation, collaboration, and machining into a single package. It's a great choice for projects that involve both electronic and mechanical components. - -## What's in this Folder? - -This `CAD` directory is where we store all the digital blueprints for the robotic arm. As you explore, you'll find different types of files, primarily: - -* **`.f3d` / `.f3z`**: These are the native project files for Fusion 360, containing the editable 3D models and assemblies. -* **`.stl`**: These are "mesh" files exported from the models, specifically for 3D printing. -* **`.pdf` / `.dxf`**: These are 2D drawings, useful for manufacturing or documentation. - -Feel free to explore the subdirectories to see how the different components of the arm are organized! diff --git a/hardware_guide/Archtecting/CAD/tutorials.md b/hardware_guide/Archtecting/CAD/tutorials.md deleted file mode 100644 index 25f43bc..0000000 --- a/hardware_guide/Archtecting/CAD/tutorials.md +++ /dev/null @@ -1 +0,0 @@ -[Introduction to Tinkercad Circuits](https://www.youtube.com/watch?v=9RF_BZ1Cg4k) \ No newline at end of file diff --git a/hardware_guide/Components/Buttons/overview.md b/hardware_guide/Components/Buttons/overview.md deleted file mode 100644 index c74f8f9..0000000 --- a/hardware_guide/Components/Buttons/overview.md +++ /dev/null @@ -1,62 +0,0 @@ - -# Buttons and Switches - -A button or switch is a simple component that controls the flow of current in a circuit by opening or closing the connection. - -## How They Work - -- **Normally Open (NO):** This is the most common type of push button. The circuit is disconnected (open) by default. When you press the button, it completes the circuit (closes it), allowing current to flow. -- **Normally Closed (NC):** The circuit is connected (closed) by default. When you press the button, it breaks the circuit (opens it), stopping the current flow. - -## The Problem of Floating Pins - -When you connect a button to a microcontroller's input pin, you need to know its state: is it pressed or not pressed? This corresponds to a digital HIGH or LOW. - -If you just connect a button to an input pin and VCC (e.g., 5V), the pin will be HIGH when pressed. But what about when it's not pressed? The input pin is not connected to anything, which is called a **floating state**. In this state, the pin can randomly read HIGH or LOW due to electrical noise, leading to unreliable behavior. - -To fix this, we must use **pull-up** or **pull-down** resistors. - -## Pull-up and Pull-down Resistors - -These resistors ensure the input pin is always in a known, stable state. - -### 1. Pull-down Resistor - -- **How it works:** A resistor (typically 10kΩ) is connected from the input pin to Ground (GND). -- **Behavior:** - - When the button is **not pressed**, the resistor "pulls" the input pin's voltage down to GND. The pin reads **LOW**. - - When the button **is pressed**, it connects the input pin directly to VCC (5V), overriding the resistor. The pin reads **HIGH**. - -![Pull-down Resistor Diagram](https://www.upesy.com/wp-content/uploads/2021/09/pull-down-resistor-schematic.png) - -### 2. Pull-up Resistor - -- **How it works:** A resistor (typically 10kΩ) is connected from the input pin to VCC (5V). -- **Behavior:** - - When the button is **not pressed**, the resistor "pulls" the input pin's voltage up to VCC. The pin reads **HIGH**. - - When the button **is pressed**, it connects the input pin directly to GND, overriding the resistor. The pin reads **LOW**. - -![Pull-up Resistor Diagram](https://www.upesy.com/wp-content/uploads/2021/09/pull-up-resistor-schematic.png) - -**Note:** The logic is inverted with a pull-up resistor (pressed = LOW). - -## Internal Pull-ups - -Most microcontrollers (including Arduino and Raspberry Pi) have **internal pull-up resistors** that you can enable in your code. This is extremely convenient as it means you don't need to add an external resistor to your circuit. - -**Arduino Example:** -```cpp -// Enables the internal pull-up resistor on pin 2 -pinMode(2, INPUT_PULLUP); -``` - -When using `INPUT_PULLUP`, you simply wire the button between the input pin and GND. The pin will be HIGH when not pressed and LOW when pressed. - -## Debouncing - -When you press a mechanical button, the metal contacts can bounce against each other for a few milliseconds before settling. A microcontroller is fast enough to read these bounces as multiple, separate presses. - -**Debouncing** is the technique used to handle this, ensuring only one press is registered. - -- **Software Debouncing:** The most common method. After detecting a press, you can add a small delay (e.g., 50ms) in your code and then read the button state again to make sure it's still pressed. -- **Hardware Debouncing:** Can be done by adding a small capacitor to the circuit. diff --git a/hardware_guide/Components/Buttons/tutorials.md b/hardware_guide/Components/Buttons/tutorials.md deleted file mode 100644 index 2ae6d44..0000000 --- a/hardware_guide/Components/Buttons/tutorials.md +++ /dev/null @@ -1,3 +0,0 @@ -[How to Use a Button with an Arduino](https://www.youtube.com/watch?v=yBgMJssXqHY) -[How to Use a Slide Switch with an Arduino](https://www.youtube.com/watch?v=0ZXYRU9KPG8) -[Usando Botões de Pressão ](https://www.youtube.com/watch?v=ohZ4pQ6KCPA) \ No newline at end of file diff --git a/hardware_guide/Components/LEDs/overview.md b/hardware_guide/Components/LEDs/overview.md deleted file mode 100644 index f825137..0000000 --- a/hardware_guide/Components/LEDs/overview.md +++ /dev/null @@ -1,62 +0,0 @@ - -# LEDs (Light Emitting Diodes) - -An LED is a semiconductor light source that emits light when current flows through it. They are one of the most common components in electronics, used for everything from simple indicators to lighting. - -## How an LED Works - -- **Diode:** An LED is a type of diode, which means it only allows current to flow in one direction. -- **Polarity:** Because it's a diode, an LED has polarity. It has a positive lead (**anode**) and a negative lead (**cathode**). -- **Anode (Positive):** This is typically the longer leg. -- **Cathode (Negative):** This is typically the shorter leg. The flat edge on the side of the LED also indicates the cathode. - -If you connect an LED backwards, it will not light up and can be damaged. - -![LED Polarity Diagram](https://www.build-electronic-circuits.com/wp-content/uploads/2013/08/led-polarity.png) - -## Why You MUST Use a Resistor with an LED - -An LED has very little internal resistance. If you connect it directly to a voltage source (like a 5V pin on an Arduino), a very large amount of current will flow through it, instantly destroying the LED. This is called thermal runaway. - -To prevent this, you **must** always use a **current-limiting resistor** in series with the LED. - -### How to Calculate the Resistor Value - -You can use Ohm's Law (V = I * R) to find the right resistor value. - -**R = (Vs - Vf) / I** - -- **R:** The resistance you need (in Ohms). -- **Vs:** The voltage of your power source (e.g., 5V for an Arduino). -- **Vf:** The LED's forward voltage. This is the amount of voltage the LED "drops" when it's on. It varies by color (see chart below). -- **I:** The desired current for the LED (in Amperes). A safe and common value for most 5mm LEDs is 20mA, which is **0.020A**. - -### Typical LED Forward Voltages (Vf) - -| Color | Forward Voltage (approx.) | -| :--- | :---: | -| Red | 1.8V - 2.2V | -| Green | 2.0V - 2.4V | -| Blue | 3.0V - 3.4V | -| White | 3.0V - 3.4V | -| Yellow | 2.0V - 2.2V | - -**Example Calculation (Red LED with 5V source):** - -- Vs = 5V -- Vf = 2.0V (average for a red LED) -- I = 0.020A (20mA) - -R = (5V - 2.0V) / 0.020A - -R = 3V / 0.020A - -R = 150 Ω - -The closest standard resistor value is 220Ω, which is a perfect choice as it provides a little extra protection. - -## Types of LEDs - -- **Through-Hole:** The standard LEDs with two legs, common in breadboarding. -- **Surface Mount (SMD):** Tiny LEDs that are soldered directly onto a circuit board. -- **RGB LEDs:** These combine three separate LEDs (Red, Green, and Blue) in a single package. By controlling the brightness of each color, you can create any color in the spectrum. diff --git a/hardware_guide/Components/LEDs/tutorials.md b/hardware_guide/Components/LEDs/tutorials.md deleted file mode 100644 index dc300c3..0000000 --- a/hardware_guide/Components/LEDs/tutorials.md +++ /dev/null @@ -1,2 +0,0 @@ -[How to Blink an LED with Arduino ](https://www.youtube.com/watch?v=FKekzzj5844) -[How to Fade an LED with Arduino analogWrite](https://www.youtube.com/watch?v=QCZISwDi_Qo0) \ No newline at end of file diff --git a/hardware_guide/Components/Motors/overview.md b/hardware_guide/Components/Motors/overview.md deleted file mode 100644 index e7a2024..0000000 --- a/hardware_guide/Components/Motors/overview.md +++ /dev/null @@ -1,40 +0,0 @@ - -# Motors in Electronics - -Motors are essential components in robotics and many electronic projects. They convert electrical energy into mechanical motion. - -## Types of Motors - -There are many different types of motors, each with its own characteristics and best use cases. - -### 1. DC Motors - -- **What they are:** The most common type of motor. They have two terminals, and when you apply a DC voltage, the shaft spins. -- **Control:** The speed is controlled by varying the voltage. The direction is changed by reversing the polarity of the voltage. -- **Use Cases:** Fans, toys, robot wheels. -- **Note:** They are not precise. You can control the speed and direction, but not the exact position of the shaft. - -### 2. Servo Motors - -- **What they are:** A DC motor combined with a position feedback sensor (usually a potentiometer) and a small controller circuit. This allows for precise control of the shaft's angular position. -- **Control:** They are controlled by sending a series of pulses (Pulse Width Modulation, or PWM). The width of the pulse determines the angle of the shaft (e.g., 1ms pulse for 0 degrees, 2ms for 180 degrees). -- **Use Cases:** Robotic arms, steering systems in RC cars, pan-tilt camera mounts. - -### 3. Stepper Motors - -- **What they are:** These motors rotate in discrete steps. The shaft moves a specific number of degrees per step (e.g., 1.8 degrees per step). -- **Control:** They are controlled by energizing internal coils in a specific sequence. This requires a dedicated stepper motor driver (like an A4988 or DRV8825). -- **Use Cases:** 3D printers, CNC machines, scanners, and any application requiring precise, repeatable positioning. - -### 4. Brushless Motors - -- **What they are:** A more advanced type of motor that uses electronic commutation instead of mechanical brushes. This makes them more efficient, durable, and quieter. -- **Control:** Requires a dedicated Electronic Speed Controller (ESC) to operate. -- **Use Cases:** Drones, electric vehicles, high-performance RC cars. - -## Motor Drivers - -A microcontroller (like an Arduino or Raspberry Pi) cannot power a motor directly because motors require more current than the microcontroller's GPIO pins can supply. You **must** use a motor driver. - -- **What it does:** A motor driver is an intermediate circuit that takes a low-current control signal from the microcontroller and delivers a higher-current signal to the motor. -- **Common Examples:** L298N (for DC and stepper motors), A4988 (for stepper motors), DRV8825 (for stepper motors), ESCs (for brushless motors). diff --git a/hardware_guide/Components/Motors/tutorials.md b/hardware_guide/Components/Motors/tutorials.md deleted file mode 100644 index b01e02e..0000000 --- a/hardware_guide/Components/Motors/tutorials.md +++ /dev/null @@ -1,2 +0,0 @@ -[Control a DC Motor with Arduino](https://www.youtube.com/watch?v=XrJ_zLWFGFw) -[How to Use a Vibration Motor with Arduino](https://www.youtube.com/watch?v=3hoBwa0ccys) \ No newline at end of file diff --git a/hardware_guide/Components/Potentiometers/overview.md b/hardware_guide/Components/Potentiometers/overview.md deleted file mode 100644 index e9bde02..0000000 --- a/hardware_guide/Components/Potentiometers/overview.md +++ /dev/null @@ -1,67 +0,0 @@ - -# Potentiometers - -A potentiometer is a three-terminal variable resistor. It acts as a voltage divider and is commonly used to provide a variable analog signal to a microcontroller, for example, to control volume, brightness, or the position of a servo motor. - -## How a Potentiometer Works - -Inside a potentiometer, there is a resistive track and a sliding contact, or **wiper**. As you turn the knob, the wiper moves along the track. - -It has three pins: - -1. **Pin 1 (CCW - Counter-Clockwise):** One end of the resistive track. -2. **Pin 2 (Wiper):** The middle pin, connected to the sliding contact. -3. **Pin 3 (CW - Clockwise):** The other end of the resistive track. - -![Potentiometer Diagram](https://www.build-electronic-circuits.com/wp-content/uploads/2013/09/potentiometer-schematic-symbol-and-breadboard-layout.png) - -## Using a Potentiometer as a Voltage Divider - -This is the most common way to use a potentiometer with a microcontroller. - -1. **Connect the outer pins to power:** - - Connect Pin 1 to Ground (GND). - - Connect Pin 3 to your voltage source (e.g., 5V or 3.3V). - -2. **Connect the center pin to an analog input:** - - Connect Pin 2 (the wiper) to an analog input pin on your microcontroller (e.g., A0 on an Arduino). - -### What Happens? - -- When the knob is turned all the way to the GND side (Pin 1), the wiper is close to GND, and the voltage on the analog pin will be close to 0V. The microcontroller will read a value close to 0. -- When the knob is turned all the way to the VCC side (Pin 3), the wiper is close to VCC, and the voltage on the analog pin will be close to 5V. The microcontroller will read its maximum analog value (e.g., 1023 for a 10-bit ADC on an Arduino). -- At any position in between, the wiper picks up a voltage that is proportional to its position along the resistive track, providing a smooth range of analog values. - -## Reading the Value - -You use the `analogRead()` function on a microcontroller to read the voltage from the wiper pin. - -**Arduino Example:** - -```cpp -// Connect the potentiometer's center pin to A0 -int potPin = A0; - -void setup() { - Serial.begin(9600); -} - -void loop() { - // Read the analog value (from 0 to 1023) - int potValue = analogRead(potPin); - - // Print the value to the Serial Monitor - Serial.println(potValue); - - delay(100); // Wait a bit before the next reading -} -``` - -## Types of Potentiometers - -- **Linear Taper:** The resistance changes linearly as you turn the knob. If you turn the knob 50% of the way, the resistance is 50% of the total. These are used for most sensor control applications. -- **Logarithmic (Audio) Taper:** The resistance changes logarithmically. This is used for audio applications (like volume controls) because human hearing is also logarithmic. - -## Using a Potentiometer as a Rheostat - -A potentiometer can also be used as a simple two-terminal variable resistor (called a rheostat). You do this by using only the wiper (Pin 2) and one of the outer pins (Pin 1 or 3). In this configuration, it can be used to control the current in a circuit, for example, to vary the brightness of an LED. diff --git a/hardware_guide/Components/Potentiometers/tutorials.md b/hardware_guide/Components/Potentiometers/tutorials.md deleted file mode 100644 index 19c0e9e..0000000 --- a/hardware_guide/Components/Potentiometers/tutorials.md +++ /dev/null @@ -1 +0,0 @@ -[How to Use a Potentiometer with Arduino analogRead](https://www.youtube.com/watch?v=Wa8CjGsOFzY) \ No newline at end of file diff --git a/hardware_guide/Components/Power/overview.md b/hardware_guide/Components/Power/overview.md deleted file mode 100644 index 94f4c2d..0000000 --- a/hardware_guide/Components/Power/overview.md +++ /dev/null @@ -1,9 +0,0 @@ -# Power Component Overview - -The power component is a critical part of the robotic arm, providing the necessary energy for all its operations. A well-designed power system ensures stable and reliable performance of the robotic arm. - -## Key Components - -* **Power Source:** This can be a battery pack or a power adapter, depending on the application's requirements for portability and power intensity. -* **Voltage Regulators:** These components ensure that a stable and consistent voltage is supplied to all the electronic components of the robotic arm, such as the microcontroller and sensors. -* **Power Distribution:** This involves the wiring and connections that distribute power from the source to the various components of the robotic arm. \ No newline at end of file diff --git a/hardware_guide/Components/Power/tutorials.md b/hardware_guide/Components/Power/tutorials.md deleted file mode 100644 index c09d240..0000000 --- a/hardware_guide/Components/Power/tutorials.md +++ /dev/null @@ -1 +0,0 @@ -[How to Power an Arduino Project](https://www.youtube.com/watch?v=I7MrL5Q7zvY) \ No newline at end of file diff --git a/hardware_guide/Components/Resistors/overview.md b/hardware_guide/Components/Resistors/overview.md deleted file mode 100644 index c8c5a4f..0000000 --- a/hardware_guide/Components/Resistors/overview.md +++ /dev/null @@ -1,60 +0,0 @@ - -# Resistors - -A resistor is a fundamental passive electronic component that creates resistance in the flow of electric current. Its purpose is to limit current, divide voltage, and in some cases, generate heat. - -## What Does a Resistor Do? - -Imagine electricity flowing through a wire is like water flowing through a pipe. A resistor is like a narrow section of that pipe, which restricts the flow. - -Key functions: - -- **Current Limiting:** This is the most common use. For example, an LED (Light Emitting Diode) can be destroyed if too much current flows through it. A resistor is placed in series with the LED to limit the current to a safe level. -- **Voltage Division:** Two or more resistors can be used to create a voltage divider, which produces a lower, stable voltage from a higher voltage source. This is very useful for providing a specific reference voltage to a component or reading sensors. -- **Pull-up and Pull-down:** In digital logic, resistors are used to ensure that a pin is in a known state (either HIGH or LOW) when it would otherwise be "floating," such as when a button is not being pressed. - -## Units of Resistance - -The unit of electrical resistance is the **Ohm (Ω)**. - -You will commonly see values in: - -- **Ohms (Ω)** -- **Kilo-ohms (kΩ):** 1 kΩ = 1,000 Ω -- **Mega-ohms (MΩ):** 1 MΩ = 1,000,000 Ω - -## How to Read a Resistor (Color Codes) - -Through-hole resistors are too small to have their value printed on them. Instead, they use a system of colored bands. - -![Resistor Color Code Chart](https://www.build-electronic-circuits.com/wp-content/uploads/2011/11/4-band-resistor-color-code-chart.png) - -### 4-Band Resistors: - -- **Band 1:** First digit of the resistance value. -- **Band 2:** Second digit of the resistance value. -- **Band 3:** Multiplier (the number of zeros to add). -- **Band 4:** Tolerance (how accurate the resistor's value is). Gold is ±5%, Silver is ±10%. - -**Example:** - -A resistor has the colors: **Brown, Black, Red, Gold** - -1. **Brown:** 1 -2. **Black:** 0 -3. **Red:** x 100 (or add two zeros) -4. **Gold:** ±5% tolerance - -So, the value is **10** followed by **two zeros** = **1000 Ω** or **1 kΩ**, with a ±5% tolerance. - -## Ohm's Law - -The relationship between voltage (V), current (I), and resistance (R) is defined by Ohm's Law: - -**V = I * R** - -- **V:** Voltage (in Volts) -- **I:** Current (in Amperes) -- **R:** Resistance (in Ohms) - -This is the most important formula in basic electronics. You can use it to calculate the correct resistor value needed for a specific application, like protecting an LED. diff --git a/hardware_guide/Components/Resistors/tutorials.md b/hardware_guide/Components/Resistors/tutorials.md deleted file mode 100644 index efc62e5..0000000 --- a/hardware_guide/Components/Resistors/tutorials.md +++ /dev/null @@ -1,2 +0,0 @@ -[Como Funciona e Como é Construído um Resistor](https://www.youtube.com/watch?v=vrBben_xty8) -[Como Funcionam os Resistores e Capacitores?](https://www.youtube.com/watch?v=e_hU6sAON2U) \ No newline at end of file diff --git a/hardware_guide/Components/Screens/overview.md b/hardware_guide/Components/Screens/overview.md deleted file mode 100644 index e9acb7c..0000000 --- a/hardware_guide/Components/Screens/overview.md +++ /dev/null @@ -1,29 +0,0 @@ -# Screens in Robotics - -Screens are an essential component in many robotics projects, providing a visual interface for users to interact with and monitor the robot's status. They can display a wide range of information, from simple text and sensor readings to complex graphics and video feeds. - -## Why Use a Screen? - -- **User Interface:** Screens provide a user-friendly way to control and interact with a robot. This can range from simple menus and buttons to complex graphical user interfaces (GUIs). -- **Data Visualization:** Screens can be used to display data from sensors, such as distance, temperature, and motor speed. This information can be used to monitor the robot's performance and diagnose problems. -- **Debugging:** During development, screens can be used to display debugging information, such as variable values and program flow. This can be invaluable for identifying and fixing bugs in the robot's code. -- **Status Updates:** Screens can provide real-time status updates, such as battery level, network connectivity, and current task. This allows users to quickly and easily monitor the robot's condition. - -## Types of Screens - -There are many different types of screens available for robotics projects, each with its own advantages and disadvantages. Some of the most common types include: - -- **LCD Screens:** Liquid crystal displays (LCDs) are a popular choice for robotics projects due to their low cost and low power consumption. They are available in a wide range of sizes and resolutions, from small character displays to large graphical displays. -- **OLED Screens:** Organic light-emitting diode (OLED) screens offer several advantages over LCDs, including higher contrast, wider viewing angles, and faster response times. However, they are typically more expensive and have a shorter lifespan. -- **Touch Screens:** Touch screens allow users to interact with the robot by directly touching the screen. This can be a more intuitive and user-friendly way to control the robot than using buttons or other input devices. - -## Choosing a Screen - -When choosing a screen for a robotics project, there are several factors to consider: - -- **Size and Resolution:** The size and resolution of the screen will determine how much information can be displayed and how easy it is to read. -- **Power Consumption:** The power consumption of the screen is an important consideration for battery-powered robots. -- **Interface:** The interface of the screen will determine how it is connected to the robot's microcontroller. Common interfaces include SPI, I2C, and UART. -- **Cost:** The cost of the screen can vary widely depending on the type, size, and features. - -By carefully considering these factors, you can choose the best screen for your robotics project and create a more user-friendly and effective robot. \ No newline at end of file diff --git a/hardware_guide/Components/Screens/tutorials.md b/hardware_guide/Components/Screens/tutorials.md deleted file mode 100644 index 59515f7..0000000 --- a/hardware_guide/Components/Screens/tutorials.md +++ /dev/null @@ -1 +0,0 @@ -[How to Use an LCD Screen with an Arduino](https://www.youtube.com/watch?v=s_-nIgo71_w) \ No newline at end of file diff --git a/hardware_guide/Components/Sensors/overview.md b/hardware_guide/Components/Sensors/overview.md deleted file mode 100644 index 6c04d6a..0000000 --- a/hardware_guide/Components/Sensors/overview.md +++ /dev/null @@ -1,18 +0,0 @@ -# Sensors Overview - -This document provides an overview of the sensors used in the robotic arm project. - -## Sensor Types - -The robotic arm utilizes various sensors to perceive its environment and internal state. These sensors can be broadly categorized into: - -* **Position Sensors:** These sensors provide information about the angular position of the joints. Common types include encoders and potentiometers. Encoders provide digital feedback, while potentiometers provide analog feedback. -* **Force/Torque Sensors:** These sensors measure the forces and torques exerted by the arm. This information is crucial for tasks that require delicate manipulation or interaction with the environment. Strain gauges are a common type of force/torque sensor. -* **Proximity Sensors:** These sensors detect the presence of objects near the gripper without physical contact. Common types include infrared (IR) sensors and ultrasonic sensors. -* **Other Common Sensors:** - * **Inertial Measurement Units (IMUs):** These sensors combine accelerometers and gyroscopes to measure the orientation and angular velocity of the arm. - * **Cameras:** Cameras provide visual feedback, enabling the robotic arm to perform tasks like object recognition and tracking. - -## Sensor Details - -For detailed information on each sensor, including datasheets, tutorials, and integration guides, please refer to the specific documentation within this directory. diff --git a/hardware_guide/Components/Sensors/tutorials.md b/hardware_guide/Components/Sensors/tutorials.md deleted file mode 100644 index ba9b5b6..0000000 --- a/hardware_guide/Components/Sensors/tutorials.md +++ /dev/null @@ -1,5 +0,0 @@ -[How to Use a Flex Sensor with an Arduino](https://www.youtube.com/watch?v=_tXWoplbqWo) -[How to Use a Force Sensor with an Arduino](https://www.youtube.com/watch?v=r7oWtcE6QQc) -[How to Use a Photoresistor](https://www.youtube.com/watch?v=XwJQJnY6iUs) -[How to Use a TCS3200 Color Sensor with Arduino](https://www.youtube.com/watch?v=oPFQrKC0nSg) -[Sensor de distância ultrassônico HC-SR04 e Arduino](https://www.youtube.com/watch?v=n-gJ00GTsNg) \ No newline at end of file diff --git a/hardware_guide/Components/Servos/overview.md b/hardware_guide/Components/Servos/overview.md deleted file mode 100644 index ab39c73..0000000 --- a/hardware_guide/Components/Servos/overview.md +++ /dev/null @@ -1,21 +0,0 @@ -# Servos - -Servos are essential components in robotics, providing precise control over angular or linear position. They are fundamental for creating articulated and responsive robotic systems. - -## Key Features - -- **Positional Control:** Unlike continuous rotation motors, servos can be commanded to move to a specific angle and hold that position. -- **High Torque:** Servos can provide significant torque for their size, making them suitable for lifting and moving objects. -- **Integrated System:** A servo is a self-contained unit that includes a motor, a feedback sensor (like a potentiometer), and control electronics. -- **Simple Interface:** They are typically controlled using a Pulse Width Modulation (PWM) signal, which is easy to generate with most microcontrollers. - -## How They Work - -A servo motor operates on a closed-loop control system. The control circuit receives a PWM signal that represents the desired position. This signal is compared to the current position of the motor, which is read by the feedback sensor. If there is a difference, the control circuit powers the motor to move it to the correct position. - -## Common Applications - -- **Robotic Arms:** Each joint in a robotic arm is often controlled by a servo, allowing for precise and repeatable movements. -- **Grippers:** Servos are used to open and close grippers, enabling a robot to interact with objects. -- **Steering Systems:** In mobile robots, servos are used for steering. -- **Camera Platforms:** Servos can be used to create pan-and-tilt platforms for cameras and sensors. diff --git a/hardware_guide/Components/Servos/practice.md b/hardware_guide/Components/Servos/practice.md deleted file mode 100644 index 771b365..0000000 --- a/hardware_guide/Components/Servos/practice.md +++ /dev/null @@ -1,90 +0,0 @@ -# Servo Tutorials - -This section provides tutorials for using servo motors in your robotics projects. - -## 1. Basic Servo Control with Arduino - -This tutorial demonstrates how to control a servo motor using an Arduino board. - -### Components - -- Arduino Uno -- Standard Servo Motor -- Jumper Wires - -### Circuit - -1. Connect the servo's **GND** (brown or black wire) to the Arduino's **GND** pin. -2. Connect the servo's **VCC** (red wire) to the Arduino's **5V** pin. -3. Connect the servo's **Signal** (orange or yellow wire) to a PWM-capable pin on the Arduino, such as pin 9. - -### Code - -```cpp -#include - -Servo myServo; - -void setup() { - myServo.attach(9); // Attaches the servo on pin 9 to the servo object -} - -void loop() { - myServo.write(0); // Move the servo to 0 degrees - delay(1000); // Wait for a second - myServo.write(90); // Move the servo to 90 degrees - delay(1000); // Wait for a second - myServo.write(180); // Move the servo to 180 degrees - delay(1000); // Wait for a second -} -``` - -### Instructions - -1. Upload the code to your Arduino board. -2. The servo will sweep back and forth between 0, 90, and 180 degrees. - -## 2. Controlling a Servo with a Potentiometer - -This tutorial shows how to control the position of a servo motor using a potentiometer. - -### Components - -- Arduino Uno -- Standard Servo Motor -- 10kΩ Potentiometer -- Jumper Wires - -### Circuit - -1. Connect the servo as described in the previous tutorial. -2. Connect one of the potentiometer's outer pins to **GND**. -3. Connect the other outer pin to **5V**. -4. Connect the center pin to an analog input pin on the Arduino, such as **A0**. - -### Code - -```cpp -#include - -Servo myServo; -int potPin = A0; -int potValue; -int angle; - -void setup() { - myServo.attach(9); -} - -void loop() { - potValue = analogRead(potPin); - angle = map(potValue, 0, 1023, 0, 180); - myServo.write(angle); - delay(15); -} -``` - -### Instructions - -1. Upload the code to your Arduino board. -2. Turn the potentiometer to control the position of the servo motor. diff --git a/hardware_guide/Components/Servos/tutorials.md b/hardware_guide/Components/Servos/tutorials.md deleted file mode 100644 index 78574b5..0000000 --- a/hardware_guide/Components/Servos/tutorials.md +++ /dev/null @@ -1,2 +0,0 @@ -[Continuous Rotation Servo Motors and Arduino](https://www.youtube.com/watch?v=NV6YHZ2RAqc) -[Control a Positional Servo Motor with an Arduino](https://www.youtube.com/watch?v=qJC1nt_eJZs) \ No newline at end of file diff --git a/hardware_guide/MicroControllers_Computers/Arduino/arduinoUno/.keep b/hardware_guide/MicroControllers_Computers/Arduino/arduinoUno/.keep deleted file mode 100644 index e69de29..0000000 diff --git a/hardware_guide/MicroControllers_Computers/Arduino/arduinoUno/basicExemples.md/examples.md b/hardware_guide/MicroControllers_Computers/Arduino/arduinoUno/basicExemples.md/examples.md deleted file mode 100644 index 0d6b682..0000000 --- a/hardware_guide/MicroControllers_Computers/Arduino/arduinoUno/basicExemples.md/examples.md +++ /dev/null @@ -1,85 +0,0 @@ - -# Arduino Uno Basic Examples - -Here are some basic examples to get you started with the Arduino Uno. - -## 1. Blink - -This is the "Hello, World!" of microcontrollers. It blinks the built-in LED on the Arduino board. - -```cpp -void setup() { - pinMode(LED_BUILTIN, OUTPUT); -} - -void loop() { - digitalWrite(LED_BUILTIN, HIGH); - delay(1000); - digitalWrite(LED_BUILTIN, LOW); - delay(1000); -} -``` - -## 2. Fading an LED - -This example shows how to fade an LED on and off using one of the PWM pins. - -```cpp -int led = 9; -int brightness = 0; -int fadeAmount = 5; - -void setup() { - pinMode(led, OUTPUT); -} - -void loop() { - analogWrite(led, brightness); - brightness = brightness + fadeAmount; - if (brightness <= 0 || brightness >= 255) { - fadeAmount = -fadeAmount; - } - delay(30); -} -``` - -## 3. Reading a Sensor - -This example shows how to read the value from an analog sensor, such as a potentiometer or a photoresistor. - -```cpp -void setup() { - Serial.begin(9600); -} - -void loop() { - int sensorValue = analogRead(A0); - Serial.println(sensorValue); - delay(1); -} -``` - -## 4. Button - -This example shows how to read a pushbutton press. - -```cpp -const int buttonPin = 2; -const int ledPin = 13; - -int buttonState = 0; - -void setup() { - pinMode(ledPin, OUTPUT); - pinMode(buttonPin, INPUT); -} - -void loop() { - buttonState = digitalRead(buttonPin); - if (buttonState == HIGH) { - digitalWrite(ledPin, HIGH); - } else { - digitalWrite(ledPin, LOW); - } -} -``` diff --git a/hardware_guide/MicroControllers_Computers/Arduino/arduinoUno/basicExemples.md/media/circuitDiagram.png b/hardware_guide/MicroControllers_Computers/Arduino/arduinoUno/basicExemples.md/media/circuitDiagram.png deleted file mode 100644 index 4341dee..0000000 Binary files a/hardware_guide/MicroControllers_Computers/Arduino/arduinoUno/basicExemples.md/media/circuitDiagram.png and /dev/null differ diff --git a/hardware_guide/MicroControllers_Computers/Arduino/arduinoUno/basicExemples.md/tutorials.md b/hardware_guide/MicroControllers_Computers/Arduino/arduinoUno/basicExemples.md/tutorials.md deleted file mode 100644 index 106e42d..0000000 --- a/hardware_guide/MicroControllers_Computers/Arduino/arduinoUno/basicExemples.md/tutorials.md +++ /dev/null @@ -1,97 +0,0 @@ - -# Arduino Uno Tutorials - -These tutorials guide you through common beginner projects with the Arduino Uno. - -## Tutorial 1: Controlling an LED with a Potentiometer - -This project uses a potentiometer to control the brightness of an LED. - -**Hardware Needed:** -- 1 x Arduino Uno -- 1 x Breadboard -- 1 x LED -- 1 x 220Ω Resistor -- 1 x 10kΩ Potentiometer -- Jumper Wires - -**Circuit:** -1. Connect the LED to the breadboard. Connect its longer leg (anode) to the 220Ω resistor. -2. Connect the other end of the resistor to Arduino pin 9. -3. Connect the LED's shorter leg (cathode) to Arduino GND. -4. Connect the potentiometer to the breadboard. -5. Connect one outer pin of the potentiometer to 5V. -6. Connect the other outer pin to GND. -7. Connect the center pin to Arduino analog pin A0. - -![Circuit Diagram](media/circuitDiagram.png) - -**Code:** -```cpp -const int ledPin = 9; // The pin the LED is connected to -const int potPin = A0; // The pin the potentiometer is connected to - -void setup() { - pinMode(ledPin, OUTPUT); -} - -void loop() { - // Read the potentiometer value (0-1023) - int potValue = analogRead(potPin); - - // Map the potentiometer value to the LED's PWM range (0-255) - int brightness = map(potValue, 0, 1023, 0, 255); - - // Set the LED brightness - analogWrite(ledPin, brightness); - - delay(10); -} -``` - -**How it Works:** -The Arduino reads the analog voltage from the potentiometer, which gives a value between 0 and 1023. The `map()` function scales this value to the 0-255 range required by the `analogWrite()` function to control the LED's brightness using PWM. - ---- - -## Tutorial 2: Controlling a Servo Motor - -This project shows how to sweep a servo motor back and forth. - -**Hardware Needed:** -- 1 x Arduino Uno -- 1 x Servo Motor (e.g., SG90) -- Jumper Wires - -**Circuit:** -- **Red wire (Power):** Connect to the 5V pin on the Arduino. -- **Brown/Black wire (Ground):** Connect to the GND pin on the Arduino. -- **Orange/Yellow wire (Signal):** Connect to digital pin 9 on the Arduino. - -**Code:** -```cpp -#include - -Servo myServo; // Create a servo object - -void setup() { - myServo.attach(9); // Attaches the servo on pin 9 to the servo object -} - -void loop() { - // Sweep from 0 degrees to 180 degrees - for (int pos = 0; pos <= 180; pos += 1) { - myServo.write(pos); // Tell servo to go to position in variable 'pos' - delay(15); // Waits 15ms for the servo to reach the position - } - - // Sweep from 180 degrees back to 0 degrees - for (int pos = 180; pos >= 0; pos -= 1) { - myServo.write(pos); - delay(15); - } -} -``` - -**How it Works:** -The `Servo.h` library makes it easy to control servo motors. The `myServo.write()` function sends the correct PWM signal to the servo to move it to the specified angle. diff --git a/hardware_guide/MicroControllers_Computers/Arduino/arduinoUno/overview.md b/hardware_guide/MicroControllers_Computers/Arduino/arduinoUno/overview.md deleted file mode 100644 index ca4c820..0000000 --- a/hardware_guide/MicroControllers_Computers/Arduino/arduinoUno/overview.md +++ /dev/null @@ -1,35 +0,0 @@ - -# Arduino Uno Overview - -The Arduino Uno is the most popular and widely used board in the Arduino family. It's a great choice for beginners and experienced users alike. - -## Key Features - -- **Microcontroller:** ATmega328P -- **Operating Voltage:** 5V -- **Input Voltage (recommended):** 7-12V -- **Digital I/O Pins:** 14 (of which 6 provide PWM output) -- **Analog Input Pins:** 6 -- **DC Current per I/O Pin:** 20 mA -- **Flash Memory:** 32 KB -- **SRAM:** 2 KB -- **EEPROM:** 1 KB -- **Clock Speed:** 16 MHz - -## Pinout - -![Arduino Uno Pinout](https://microcontrollerslab.com/wp-content/uploads/2018/10/Arduino-Uno-pinout-diagram.jpg) - -## Power - -The Arduino Uno can be powered via the USB connection or with an external power supply. The power source is selected automatically. - -External (non-USB) power can come either from an AC-to-DC adapter (wall-wart) or a battery. The adapter can be connected by plugging a 2.1mm center-positive plug into the board's power jack. Leads from a battery can be inserted in the Gnd and Vin pin headers of the POWER connector. - -## Communication - -The Arduino Uno has a number of facilities for communicating with a computer, another Arduino, or other microcontrollers. - -- **Serial:** The ATmega328P provides UART TTL (5V) serial communication, which is available on digital pins 0 (RX) and 1 (TX). -- **I2C:** The board has a dedicated I2C bus, which is available on pins A4 (SDA) and A5 (SCL). -- **SPI:** The board has a dedicated SPI bus, which is available on pins 10 (SS), 11 (MOSI), 12 (MISO), and 13 (SCK). diff --git a/hardware_guide/MicroControllers_Computers/Arduino/howToProgram.md b/hardware_guide/MicroControllers_Computers/Arduino/howToProgram.md deleted file mode 100644 index 535a762..0000000 --- a/hardware_guide/MicroControllers_Computers/Arduino/howToProgram.md +++ /dev/null @@ -1,44 +0,0 @@ - -# How to Program an Arduino - -Programming an Arduino is done using the Arduino IDE (Integrated Development Environment), a free software that runs on your computer. - -## 1. Download and Install the Arduino IDE - -- Go to the official Arduino website: [https://www.arduino.cc/en/software](https://www.arduino.cc/en/software) -- Download the version of the IDE that is compatible with your operating system (Windows, macOS, or Linux). -- Follow the installation instructions. - -## 2. Connect the Arduino to Your Computer - -- Use a USB cable to connect your Arduino board to your computer. -- The green power LED on the board should light up. - -## 3. Configure the Arduino IDE - -- **Select your board:** Go to `Tools > Board` and select the type of Arduino board you are using (e.g., "Arduino Uno"). -- **Select the port:** Go to `Tools > Port` and select the serial port that your Arduino is connected to. This will usually be a COM port on Windows or a `/dev/tty.usbmodem` port on macOS. - -## 4. Write Your First Sketch (Program) - -An Arduino program is called a "sketch." Here is a simple example that blinks the built-in LED on the board: - -```cpp -void setup() { - // initialize digital pin LED_BUILTIN as an output. - pinMode(LED_BUILTIN, OUTPUT); -} - -void loop() { - digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level) - delay(1000); // wait for a second - digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW - delay(1000); // wait for a second -} -``` - -## 5. Upload the Sketch to the Arduino - -- Click the "Upload" button (the right-arrow icon) in the Arduino IDE. -- The IDE will compile the sketch and upload it to your Arduino board. -- You should see the built-in LED on your board start to blink. diff --git a/hardware_guide/MicroControllers_Computers/Arduino/intro.md b/hardware_guide/MicroControllers_Computers/Arduino/intro.md deleted file mode 100644 index 6832538..0000000 --- a/hardware_guide/MicroControllers_Computers/Arduino/intro.md +++ /dev/null @@ -1,21 +0,0 @@ - -# Introduction to Arduino - -Arduino is an open-source electronics platform based on easy-to-use hardware and software. It's intended for anyone making interactive projects. - -## What is Arduino? - -An Arduino board is a microcontroller, which is a small computer that can be programmed to control electronic devices. It's designed to be simple and accessible, so that even beginners can get started with electronics and programming. - -## Why Use Arduino? - -- **Simplicity:** The Arduino IDE (Integrated Development Environment) is easy to use and the programming language is a simplified version of C++. -- **Cost-effective:** Arduino boards are relatively inexpensive. -- **Large Community:** There is a large online community of Arduino users who share code, tutorials, and solutions to common problems. -- **Extensible:** Arduino boards can be extended with "shields," which are add-on boards that provide additional functionality (e.g., motor control, GPS, Ethernet). - -## Common Arduino Boards - -- **Arduino Uno:** The most popular and well-documented board, great for beginners. -- **Arduino Nano:** A smaller version of the Uno, ideal for projects with limited space. -- **Arduino Mega:** A larger board with more pins and memory, suitable for more complex projects. diff --git a/hardware_guide/MicroControllers_Computers/Arduino/tutorials/tutorials.md b/hardware_guide/MicroControllers_Computers/Arduino/tutorials/tutorials.md deleted file mode 100644 index 700456e..0000000 --- a/hardware_guide/MicroControllers_Computers/Arduino/tutorials/tutorials.md +++ /dev/null @@ -1 +0,0 @@ -[SparkFun Arduino Comparison Guide](https://www.youtube.com/watch?v=hjRSwBcLcSU&t=27s) \ No newline at end of file diff --git a/hardware_guide/MicroControllers_Computers/ESP32/ESP32CAM/conections.md b/hardware_guide/MicroControllers_Computers/ESP32/ESP32CAM/conections.md deleted file mode 100644 index 7feaaeb..0000000 --- a/hardware_guide/MicroControllers_Computers/ESP32/ESP32CAM/conections.md +++ /dev/null @@ -1,49 +0,0 @@ - -# ESP32-CAM Connections - -Connecting the ESP32-CAM to other components and programming it requires a few specific connections. - -## Programming Connections (using an FTDI Programmer) - -To upload code to the ESP32-CAM, you need an FTDI (Future Technology Devices International) programmer, which is a USB-to-serial converter. - -Here are the necessary connections: - -| ESP32-CAM Pin | FTDI Programmer Pin | -| :---: | :---: | -| 5V | VCC (5V) | -| GND | GND | -| U0TXD | RXD | -| U0RXD | TXD | - -**Crucial Step for Uploading:** Before you can upload a sketch, you must connect the `GPIO 0` pin to `GND`. This action puts the ESP32-CAM into flashing mode. - -### Uploading Procedure: - -1. Make the connections listed in the table above. -2. Connect `GPIO 0` to `GND`. -3. Connect the FTDI programmer to your computer via USB. -4. Open your programming environment (e.g., Arduino IDE). -5. Select the correct board (`AI Thinker ESP32-CAM`) and COM port. -6. Press the "Upload" button. -7. Once the upload is complete, **disconnect `GPIO 0` from `GND`**. -8. Press the onboard reset (RST) button to start running your new program. - -## Powering the ESP32-CAM - -While you can power the board through the FTDI programmer during development, for standalone projects, it's highly recommended to use a dedicated 5V power supply. - -- **Using the 5V Pin:** Connect a stable 5V power source to the `5V` and `GND` pins. The power supply should be able to provide at least 2A, especially when the camera and Wi-Fi are active, to prevent brownouts and instability. - -## MicroSD Card Connections - -The ESP32-CAM has a built-in MicroSD card slot. The connections are internal, so you just need to insert a formatted MicroSD card (up to 4GB is officially supported, but larger cards may work). - -The following GPIO pins are used by the MicroSD card reader: - -- **GPIO 14:** CLK -- **GPIO 15:** CMD -- **GPIO 2:** Data0 -- **GPIO 4:** Data1 (also used for the onboard flash LED) -- **GPIO 12:** Data2 -- **GPIO 13:** Data3 diff --git a/hardware_guide/MicroControllers_Computers/ESP32/ESP32CAM/overview.md b/hardware_guide/MicroControllers_Computers/ESP32/ESP32CAM/overview.md deleted file mode 100644 index 56a9ec5..0000000 --- a/hardware_guide/MicroControllers_Computers/ESP32/ESP32CAM/overview.md +++ /dev/null @@ -1,30 +0,0 @@ - -# ESP32-CAM Overview - -The ESP32-CAM is a small, low-cost development board that combines an ESP32-S microcontroller with a 2-megapixel OV2640 camera. It's an excellent choice for projects that require video streaming, image capture, or computer vision. - -## Key Features - -- **Microcontroller:** ESP32-S -- **Camera:** OV2640 (2MP) -- **Flash Memory:** 4MB -- **RAM:** 520KB SRAM + 4MB PSRAM -- **Wi-Fi:** 802.11 b/g/n -- **Bluetooth:** v4.2 BR/EDR and BLE -- **GPIO:** 9 available GPIO pins -- **Storage:** MicroSD card slot (up to 4GB) -- **Power:** 5V input - -## Pinout - -![ESP32-CAM Pinout](https://lastminuteengineers.com/wp-content/uploads/iot/ESP32-CAM-Pinout.png) - -## Getting Started - -To use the ESP32-CAM, you'll need an FTDI programmer to upload code. The board does not have a built-in USB-to-serial converter. - -**Important:** Before uploading code, you must connect the `GPIO 0` pin to `GND`. This puts the board into flashing mode. After the code is uploaded, disconnect `GPIO 0` from `GND` and press the reset button to run the new sketch. - -## Powering the ESP32-CAM - -The board can be powered through the 5V pin. It's recommended to use an external 5V power supply that can provide at least 2A, especially when using the camera, as it can be power-hungry. diff --git a/hardware_guide/MicroControllers_Computers/ESP32/basicExemples.md/.keep b/hardware_guide/MicroControllers_Computers/ESP32/basicExemples.md/.keep deleted file mode 100644 index e69de29..0000000 diff --git a/hardware_guide/MicroControllers_Computers/ESP32/basicExemples.md/examples.md b/hardware_guide/MicroControllers_Computers/ESP32/basicExemples.md/examples.md deleted file mode 100644 index cef7129..0000000 --- a/hardware_guide/MicroControllers_Computers/ESP32/basicExemples.md/examples.md +++ /dev/null @@ -1,82 +0,0 @@ - -# ESP32 Basic Examples - -Here are some basic examples to get you started with the ESP32. - -## 1. Wi-Fi Scan - -This example shows how to scan for available Wi-Fi networks. - -```cpp -#include "WiFi.h" - -void setup() { - Serial.begin(115200); - - // Set WiFi to station mode and disconnect from an AP if it was previously connected - WiFi.mode(WIFI_STA); - WiFi.disconnect(); - delay(100); - - Serial.println("Setup done"); -} - -void loop() { - Serial.println("Scan start"); - - // WiFi.scanNetworks will return the number of networks found - int n = WiFi.scanNetworks(); - Serial.println("Scan done"); - if (n == 0) { - Serial.println("no networks found"); - } else { - Serial.print(n); - Serial.println(" networks found"); - for (int i = 0; i < n; ++i) { - // Print SSID and RSSI for each network found - Serial.print(i + 1); - Serial.print(": "); - Serial.print(WiFi.SSID(i)); - Serial.print(" ("); - Serial.print(WiFi.RSSI(i)); - Serial.print(")"); - Serial.println((WiFi.encryptionType(i) == WIFI_AUTH_OPEN) ? " " : "*"); - delay(10); - } - } - Serial.println(""); - - // Wait a bit before scanning again - delay(5000); -} -``` - -## 2. Bluetooth Serial - -This example shows how to use Bluetooth to send and receive data. - -```cpp -#include "BluetoothSerial.h" - -#if !defined(CONFIG_BT_ENABLED) || !defined(CONFIG_BLUEDROID_ENABLED) -#error Bluetooth is not enabled! Please run `make menuconfig` to and enable it -#endif - -BluetoothSerial SerialBT; - -void setup() { - Serial.begin(115200); - SerialBT.begin("ESP32test"); //Bluetooth device name - Serial.println("The device started, now you can pair it with bluetooth!"); -} - -void loop() { - if (Serial.available()) { - SerialBT.write(Serial.read()); - } - if (SerialBT.available()) { - Serial.write(SerialBT.read()); - } - delay(20); -} -``` diff --git a/hardware_guide/MicroControllers_Computers/ESP32/howToProgram.md b/hardware_guide/MicroControllers_Computers/ESP32/howToProgram.md deleted file mode 100644 index 14ff658..0000000 --- a/hardware_guide/MicroControllers_Computers/ESP32/howToProgram.md +++ /dev/null @@ -1,56 +0,0 @@ - -# How to Program an ESP32 - -Programming the ESP32 is similar to programming an Arduino. You can use the Arduino IDE with an extension, or you can use other development environments like PlatformIO or the official Espressif IDF (IoT Development Framework). - -## Using the Arduino IDE - -This is the most common method for beginners. - -### 1. Install the Arduino IDE - -If you haven't already, download and install the Arduino IDE from the [official website](https://www.arduino.cc/en/software). - -### 2. Add ESP32 Board Support to Arduino IDE - -- Open the Arduino IDE. -- Go to `File > Preferences`. -- In the "Additional Board Manager URLs" field, enter the following URL: - ``` - https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json - ``` -- Click "OK". -- Go to `Tools > Board > Boards Manager...`. -- Search for "esp32" and install the "esp32 by Espressif Systems" package. - -### 3. Configure the IDE for Your ESP32 Board - -- Connect your ESP32 board to your computer with a USB cable. -- Go to `Tools > Board` and select your specific ESP32 board (e.g., "ESP32 Dev Module"). -- Go to `Tools > Port` and select the correct serial port. - -### 4. Write and Upload a Sketch - -Now you can write code just like you would for an Arduino. Here's a "Hello, World!" example for the ESP32, which prints to the Serial Monitor. - -```cpp -void setup() { - Serial.begin(115200); -} - -void loop() { - Serial.println("Hello from ESP32!"); - delay(1000); -} -``` - -- Click the "Upload" button to flash the code onto your ESP32. -- Open the Serial Monitor (`Tools > Serial Monitor`) and set the baud rate to 115200 to see the output. - -## Using PlatformIO - -PlatformIO is a more advanced, cross-platform build system that integrates with code editors like VS Code. It offers better library management and is preferred for larger projects. - -- **Installation:** Install Visual Studio Code and then install the PlatformIO IDE extension from the marketplace. -- **Project Setup:** Create a new PlatformIO project and select your ESP32 board. -- **Programming:** Write your code in the `src/main.cpp` file and use the PlatformIO interface to build and upload. diff --git a/hardware_guide/MicroControllers_Computers/ESP32/intro.md b/hardware_guide/MicroControllers_Computers/ESP32/intro.md deleted file mode 100644 index 50e695b..0000000 --- a/hardware_guide/MicroControllers_Computers/ESP32/intro.md +++ /dev/null @@ -1,22 +0,0 @@ - -# Introduction to ESP32 - -The ESP32 is a series of low-cost, low-power system on a chip microcontrollers with integrated Wi-Fi and dual-mode Bluetooth. It is the successor to the ESP8266 and is developed by Espressif Systems. - -## What is an ESP32? - -The ESP32 is a powerful microcontroller that is well-suited for a wide range of applications, including IoT (Internet of Things), home automation, and robotics. It has a number of features that make it a popular choice for hobbyists and professionals alike. - -## Why Use ESP32? - -- **Wi-Fi and Bluetooth:** The ESP32 has built-in Wi-Fi and Bluetooth, which makes it easy to connect to the internet and other devices. -- **Dual-Core Processor:** The ESP32 has a dual-core processor, which allows it to perform multiple tasks at the same time. -- **Low Power Consumption:** The ESP32 is designed to be low-power, which makes it ideal for battery-powered applications. -- **Cost-effective:** ESP32 boards are very affordable. -- **Large Community:** There is a large and active community of ESP32 users who provide support and share projects. - -## Common ESP32 Boards - -- **ESP32-WROOM-32:** A popular and versatile module that can be found on many development boards. -- **ESP32-CAM:** A small board with a built-in camera, ideal for video streaming and image processing projects. -- **ESP32-S3:** A newer version of the ESP32 with more features, including a more powerful processor and more memory. diff --git a/hardware_guide/MicroControllers_Computers/ESP32/tutorials/tutorials.md b/hardware_guide/MicroControllers_Computers/ESP32/tutorials/tutorials.md deleted file mode 100644 index e382ee9..0000000 --- a/hardware_guide/MicroControllers_Computers/ESP32/tutorials/tutorials.md +++ /dev/null @@ -1,5 +0,0 @@ -[Arduino To ESP32: How to Get Started!](https://www.youtube.com/watch?v=RiYnucfy_rs) -[ESP32-Cam Complete Guide](https://www.youtube.com/watch?v=hSr557hppwY) -[ESP8266, ESP32, ESP32-C3 e ESP32-S3: Qual a Diferença?](https://www.youtube.com/watch?v=0zutyYWWRHA) - -https://github.com/yoursunny/esp32cam \ No newline at end of file diff --git a/hardware_guide/MicroControllers_Computers/RaspberryPi/Raspberry Pi 4 Model B/basicExemples.md/examples.md b/hardware_guide/MicroControllers_Computers/RaspberryPi/Raspberry Pi 4 Model B/basicExemples.md/examples.md deleted file mode 100644 index 6b589b9..0000000 --- a/hardware_guide/MicroControllers_Computers/RaspberryPi/Raspberry Pi 4 Model B/basicExemples.md/examples.md +++ /dev/null @@ -1,110 +0,0 @@ - -# Raspberry Pi Basic Examples (Python) - -These examples use the `gpiozero` library, which is a friendly and intuitive way to interact with the GPIO pins on a Raspberry Pi. - -## 1. Blinking an LED - -This is the fundamental "Hello, World!" of physical computing. - -**Hardware:** -- 1 x LED -- 1 x 330Ω Resistor -- Connect the longer leg (anode) of the LED to GPIO pin 17. -- Connect the shorter leg (cathode) to the resistor, and the other end of the resistor to a Ground (GND) pin. - -**Code (`blink.py`):** -```python -from gpiozero import LED -from time import sleep - -# Initialize the LED on GPIO pin 17 -led = LED(17) - -print("LED will blink. Press Ctrl+C to exit.") - -try: - while True: - led.on() # Turn the LED on - sleep(1) # Wait for 1 second - led.off() # Turn the LED off - sleep(1) # Wait for 1 second -except KeyboardInterrupt: - print("\nExiting program.") - led.off() # Ensure LED is off when program exits -``` - -**To Run:** -```bash -python blink.py -``` - -## 2. Reading a Button Press - -This example shows how to get digital input from a push button. - -**Hardware:** -- 1 x Push Button -- Connect one leg of the button to GPIO pin 2. -- Connect the other leg to a Ground (GND) pin. - -**Code (`button_test.py`):** -```python -from gpiozero import Button -from time import sleep - -# Initialize the Button on GPIO pin 2 -# The internal pull-up resistor is enabled by default -button = Button(2) - -print("Press the button. Press Ctrl+C to exit.") - -try: - while True: - if button.is_pressed: - print("Button is pressed") - else: - print("Button is not pressed") - sleep(0.1) -except KeyboardInterrupt: - print("\nExiting program.") -``` - -**To Run:** -```bash -python button_test.py -``` - -## 3. Button-Controlled LED - -This combines the previous two examples. - -**Hardware:** -- Same as the LED and Button examples above. - -**Code (`button_led.py`):** -```python -from gpiozero import LED, Button -from signal import pause - -led = LED(17) -button = Button(2) - -print("Press the button to turn the LED on/off. Press Ctrl+C to exit.") - -# The following lines link the button's state to the LED's state -# button.when_pressed = led.on -# button.when_released = led.off - -# A more direct way to do the same thing: -led.source = button.values - -# pause() keeps the script running until you exit with Ctrl+C -pause() -``` - -**To Run:** -```bash -python button_led.py -``` - diff --git a/hardware_guide/MicroControllers_Computers/RaspberryPi/Raspberry Pi 4 Model B/overview.md b/hardware_guide/MicroControllers_Computers/RaspberryPi/Raspberry Pi 4 Model B/overview.md deleted file mode 100644 index 92dd710..0000000 --- a/hardware_guide/MicroControllers_Computers/RaspberryPi/Raspberry Pi 4 Model B/overview.md +++ /dev/null @@ -1,33 +0,0 @@ - -# Raspberry Pi 4 Model B Overview - -The Raspberry Pi 4 Model B is a significant upgrade from its predecessors, offering desktop performance in a tiny, affordable package. It's the most powerful and versatile board in the Raspberry Pi lineup, making it ideal for a huge range of projects, from home servers to complex robotics. - -## Key Features - -- **Processor:** Broadcom BCM2711, Quad core Cortex-A72 (ARM v8) 64-bit SoC @ 1.5GHz (can be overclocked). -- **RAM:** Available in 1GB, 2GB, 4GB, or 8GB LPDDR4-3200 SDRAM options. -- **Connectivity:** - - 2.4 GHz and 5.0 GHz IEEE 802.11ac wireless LAN, Bluetooth 5.0, BLE. - - Gigabit Ethernet. - - 2 × USB 3.0 ports; 2 × USB 2.0 ports. -- **Video & Sound:** - - 2 × micro-HDMI ports (supports up to 4kp60). - - 4-pole stereo audio and composite video port. -- **GPIO:** Standard 40-pin GPIO header (fully backwards compatible with previous boards). -- **Storage:** MicroSD card slot for loading operating system and data storage. -- **Power:** 5V DC via USB-C connector (minimum 3A recommended). - -## Pinout - -The Raspberry Pi 4 maintains the same standard 40-pin GPIO header as previous models, ensuring compatibility with most existing HATs and add-on boards. - -![Raspberry Pi 4 Pinout](https://www.raspberrypi.com/documentation/computers/images/GPIO-Pinout-Diagram-2.png) - -## Key Differences from Previous Models - -- **CPU Performance:** A major leap in processing power. -- **RAM Options:** The first Pi to offer up to 8GB of RAM, making it a true desktop replacement. -- **Dual Monitor Support:** Two micro-HDMI ports allow for a dual-screen setup. -- **USB 3.0:** Faster data transfer with two USB 3.0 ports. -- **Power Connector:** Moved to USB-C to support the higher power requirements. diff --git a/hardware_guide/MicroControllers_Computers/RaspberryPi/howToProgram.md b/hardware_guide/MicroControllers_Computers/RaspberryPi/howToProgram.md deleted file mode 100644 index 9220c7b..0000000 --- a/hardware_guide/MicroControllers_Computers/RaspberryPi/howToProgram.md +++ /dev/null @@ -1,66 +0,0 @@ - -# How to Program a Raspberry Pi - -Programming a Raspberry Pi is different from programming a microcontroller. Since the Raspberry Pi is a full computer running an operating system (like Raspberry Pi OS), you write and run code directly on the device itself. - -## 1. Setting Up Your Raspberry Pi - -First, you need to get your Raspberry Pi running. - -- **Install Raspberry Pi OS:** Download the Raspberry Pi Imager from the [official website](https://www.raspberrypi.com/software/) and use it to flash the Raspberry Pi OS onto a microSD card. -- **Initial Boot:** Insert the microSD card into your Pi, connect a monitor, keyboard, mouse, and power supply, and turn it on. -- **Complete Setup:** Follow the on-screen instructions to set up your location, password, and connect to Wi-Fi. - -## 2. Accessing Your Raspberry Pi - -You have two main ways to work with your Raspberry Pi: - -- **Desktop Environment:** Use it like a regular computer with the connected monitor, keyboard, and mouse. -- **Headless (Remote Access):** Access your Pi from another computer over the network using SSH (for a command-line interface) or VNC (for the full graphical desktop). This is very common for robotics and embedded projects. - -To enable SSH and VNC, open the Raspberry Pi Configuration tool (`Menu > Preferences > Raspberry Pi Configuration > Interfaces`) and enable them. - -## 3. Programming Languages - -Python is the most popular and officially recommended language for programming on the Raspberry Pi. Raspberry Pi OS comes with Python and several useful libraries pre-installed. - -### Writing and Running a Python Script - -1. **Open a Code Editor:** You can use the pre-installed **Thonny IDE**, which is excellent for beginners, or any other text editor like VS Code (which can be installed on the Pi). -2. **Write Your Code:** Create a new file and write your Python code. For example, a simple "Hello, World!" script named `hello.py`: - ```python - print("Hello from the Raspberry Pi!") - ``` -3. **Save the File:** Save the script in your home directory or a project folder. -4. **Run from the Terminal:** - - Open the **Terminal** application. - - Navigate to the directory where you saved your file using the `cd` command (e.g., `cd my_project`). - - Run the script using the python interpreter: - ```bash - python hello.py - ``` - -## 4. Controlling GPIO Pins - -The real power for physical computing comes from the GPIO (General-Purpose Input/Output) pins. You can use Python libraries to control them. - -- **gpiozero:** A modern, beginner-friendly library for controlling GPIO devices. -- **RPi.GPIO:** The classic, more traditional library for GPIO control. - -### Example: Blinking an LED with `gpiozero` - -1. **Connect the Hardware:** Connect an LED to GPIO pin 17 and a ground pin on the Raspberry Pi (don't forget a resistor!). -2. **Write the Python Script:** - ```python - from gpiozero import LED - from time import sleep - - led = LED(17) - - while True: - led.on() - sleep(1) - led.off() - sleep(1) - ``` -3. **Run the Script:** Save the code and run it from the terminal (`python blink.py`). The LED should start blinking. diff --git a/hardware_guide/MicroControllers_Computers/RaspberryPi/intro.md b/hardware_guide/MicroControllers_Computers/RaspberryPi/intro.md deleted file mode 100644 index 9c6c384..0000000 --- a/hardware_guide/MicroControllers_Computers/RaspberryPi/intro.md +++ /dev/null @@ -1,27 +0,0 @@ - -# Introduction to Raspberry Pi - -The Raspberry Pi is a low-cost, credit-card-sized computer that plugs into a computer monitor or TV, and uses a standard keyboard and mouse. It is a capable little device that enables people of all ages to explore computing, and to learn how to program in languages like Scratch and Python. - -## What is a Raspberry Pi? - -Unlike a microcontroller like an Arduino or ESP32, a Raspberry Pi is a full-fledged single-board computer (SBC). This means it runs a complete operating system (typically a version of Linux called Raspberry Pi OS) and can do most things a desktop computer can do, like browsing the internet, playing videos, and running software. - -## Why Use a Raspberry Pi? - -- **Versatility:** It can be used as a desktop computer, a web server, a home automation hub, a retro gaming console, a robot brain, and much more. -- **Linux Operating System:** Running a full OS gives you immense power and flexibility. You can install a vast range of open-source software and tools. -- **Processing Power:** Modern Raspberry Pi models have multi-core processors and significant RAM, making them suitable for more computationally intensive tasks than microcontrollers. -- **Connectivity:** They come with USB ports, Ethernet, Wi-Fi, Bluetooth, and HDMI, making it easy to connect peripherals. -- **GPIO Pins:** Like microcontrollers, the Raspberry Pi has a row of General-Purpose Input/Output (GPIO) pins that allow it to control electronic components like LEDs, motors, and sensors. - -## Common Raspberry Pi Models - -- **Raspberry Pi 4 Model B:** A powerful and popular model with different RAM options (2GB, 4GB, 8GB), dual-monitor support, and USB 3.0 ports. -- **Raspberry Pi Zero 2 W:** A tiny, low-cost Pi with wireless connectivity, ideal for small, embedded projects. -- **Raspberry Pi Pico:** This is an exception! The Pico is a **microcontroller**, not a single-board computer. It's designed by the Raspberry Pi Foundation to compete with Arduino and is programmed in C/C++ or MicroPython. - -## Raspberry Pi vs. Arduino/ESP32 - -- **Choose a Raspberry Pi when:** You need a full operating system, networking, significant processing power, or want to run complex applications (e.g., a web server, machine learning inference, a media center). -- **Choose an Arduino/ESP32 when:** You need to perform simple, repetitive tasks with low power consumption, read sensors, and control motors in a very reliable and real-time manner. diff --git a/hardware_guide/MicroControllers_Computers/RaspberryPi/raspberryPi4/basicExemples.md/tutorials.md b/hardware_guide/MicroControllers_Computers/RaspberryPi/raspberryPi4/basicExemples.md/tutorials.md deleted file mode 100644 index 51ca47e..0000000 --- a/hardware_guide/MicroControllers_Computers/RaspberryPi/raspberryPi4/basicExemples.md/tutorials.md +++ /dev/null @@ -1,129 +0,0 @@ -# Raspberry Pi 4 Tutorials - -These tutorials use Python and the `gpiozero` library to interact with hardware. - -## Tutorial 1: Reading a Temperature and Humidity Sensor (DHT11/DHT22) - -This project reads environmental data from a popular DHT sensor and prints it to the console. - -**Hardware Needed:** -- 1 x Raspberry Pi 4 -- 1 x DHT11 (blue) or DHT22 (white) sensor -- Jumper Wires - -**Circuit:** -- **DHT Pin 1 (VCC):** Connect to 3.3V on the Raspberry Pi. -- **DHT Pin 2 (Data):** Connect to GPIO 4 on the Raspberry Pi. -- **DHT Pin 4 (GND):** Connect to a GND pin on the Raspberry Pi. -(Pin 3 is not used). - -**Software Setup:** -You need to install the Adafruit CircuitPython DHT library. - -```bash -sudo apt-get update -sudo apt-get install python3-pip -sudo pip3 install adafruit-circuitpython-dht -sudo apt-get install libgpiod2 -``` - -**Code (`temp_reader.py`):** -```python -import time -import board -import adafruit_dht - -# Initialize the dht device, with data pin connected to: -dhtDevice = adafruit_dht.DHT22(board.D4) # Use DHT22 for DHT22, or DHT11 for DHT11 - -while True: - try: - # Print the values to the serial port - temperature_c = dhtDevice.temperature - temperature_f = temperature_c * (9 / 5) + 32 - humidity = dhtDevice.humidity - print( - "Temp: {:.1f} F / {:.1f} C Humidity: {}%".format( - temperature_f, temperature_c, humidity - ) - ) - - except RuntimeError as error: - # Errors happen fairly often, DHT's are tricky that way! - print(error.args[0]) - time.sleep(2.0) - continue - except Exception as error: - dhtDevice.exit() - raise error - - time.sleep(2.0) - -``` - -**How it Works:** -The `adafruit_circuitpython_dht` library handles the complex timing required to read data from the DHT sensor. The script initializes the sensor on the specified GPIO pin and then enters a loop, reading the temperature and humidity every 2 seconds. - ---- - -## Tutorial 2: Controlling a DC Motor with an L298N Driver - -This project shows how to control the speed and direction of a simple DC motor. - -**Hardware Needed:** -- 1 x Raspberry Pi 4 -- 1 x L298N Motor Driver -- 1 x DC Motor -- An external power supply for the motor (e.g., a 9V battery or a 5V-12V power adapter). **Do not power the motor from the Pi!** -- Jumper Wires - -**Circuit:** -1. Connect the L298N's `VCC` and `GND` to your external power supply. -2. Connect the motor to the `OUT1` and `OUT2` terminals on the L298N. -3. Connect the L298N's `IN1` to Raspberry Pi GPIO 24. -4. Connect the L298N's `IN2` to Raspberry Pi GPIO 23. -5. Connect the L298N's `ENA` (Enable A) to Raspberry Pi GPIO 25. -6. **Crucially, connect one of the Raspberry Pi's GND pins to the L298N's GND pin.** This creates a common ground, which is essential for the circuit to work. - -**Code (`motor_control.py`):** -```python -from gpiozero import Motor, PWMOutputDevice -from time import sleep - -# The Motor class uses two pins for direction -motor = Motor(forward=24, backward=23) - -# The PWMOutputDevice is used for speed control -speed_control = PWMOutputDevice(25) - -print("Motor test starting...") - -try: - while True: - print("Full speed forward") - motor.forward() - speed_control.value = 1.0 # Full speed (0.0 to 1.0) - sleep(2) - - print("Half speed forward") - speed_control.value = 0.5 - sleep(2) - - print("Full speed backward") - motor.backward() - speed_control.value = 1.0 - sleep(2) - - print("Stopping") - motor.stop() - sleep(2) - -except KeyboardInterrupt: - print("\nExiting program.") - motor.stop() - -``` - -**How it Works:** -The `gpiozero` `Motor` class simplifies motor control. It uses one pin for forward and another for backward. The `PWMOutputDevice` is used on the L298N's "Enable" pin to control the motor's speed. A `value` of 1.0 is full speed, and 0.0 is stopped. - diff --git a/hardware_guide/MicroControllers_Computers/RaspberryPi/raspberryPiZero2W/overview.md b/hardware_guide/MicroControllers_Computers/RaspberryPi/raspberryPiZero2W/overview.md deleted file mode 100644 index 121f28e..0000000 --- a/hardware_guide/MicroControllers_Computers/RaspberryPi/raspberryPiZero2W/overview.md +++ /dev/null @@ -1,41 +0,0 @@ - -# Raspberry Pi Zero 2 W Overview - -The Raspberry Pi Zero 2 W is a tiny, low-cost, and yet surprisingly powerful member of the Raspberry Pi family. It packs the processing power of the Raspberry Pi 3 into the miniature form factor of the original Pi Zero, making it an ideal choice for compact and low-power projects that require wireless connectivity. - -## Key Features - -- **Processor:** Broadcom BCM2710A1, Quad-core 64-bit SoC (ARM Cortex-A53 @ 1GHz). This is the same family as the Raspberry Pi 3. -- **RAM:** 512MB LPDDR2 SDRAM. -- **Connectivity:** - - 2.4GHz IEEE 802.11b/g/n wireless LAN. - - Bluetooth 4.2, Bluetooth Low Energy (BLE). -- **Form Factor:** Incredibly small, measuring just 65mm x 30mm. -- **Video & Sound:** - - Mini HDMI port. - - Composite video and reset pins via solder test points. -- **Camera Interface:** CSI-2 camera connector. -- **GPIO:** 40-pin GPIO header (unpopulated, requires soldering). -- **Storage:** MicroSD card slot. -- **Power:** 5V DC via micro USB connector. - -## Pinout - -The Raspberry Pi Zero 2 W uses the standard 40-pin GPIO layout, but the header is unpopulated to save space. You will need to solder on a pin header to use the GPIO pins with breadboards or HATs. - -![Raspberry Pi Zero 2 W Pinout](https://www.raspberrypi.com/documentation/computers/images/GPIO-Pinout-Diagram-2.png) - -## Key Differences - -- **vs. Pi Zero W:** The Zero 2 W is a major performance upgrade, with a quad-core processor that is roughly 5 times faster for multi-threaded tasks. This makes it much more capable for running applications beyond simple scripts. -- **vs. Pi 4:** The Pi 4 is significantly more powerful, has much more RAM, USB 3.0, Gigabit Ethernet, and dual 4K monitor support. The Zero 2 W is designed for projects where size, cost, and power consumption are the primary concerns, while the Pi 4 is a true desktop replacement. - -## Common Use Cases - -The small size and wireless capabilities of the Zero 2 W make it perfect for: - -- **IoT Devices:** Smart home sensors, weather stations. -- **Portable Projects:** Handheld retro gaming consoles (like Pi-hole). -- **Robotics:** The brain for a small robot where space is tight. -- **Security Cameras:** A tiny, discreet network security camera. -- **Wearables:** Projects that need to be embedded in clothing or accessories. diff --git a/hardware_guide/MicroControllers_Computers/RaspberryPi/raspberryPiZero2W/tutorials.md b/hardware_guide/MicroControllers_Computers/RaspberryPi/raspberryPiZero2W/tutorials.md deleted file mode 100644 index 8a75879..0000000 --- a/hardware_guide/MicroControllers_Computers/RaspberryPi/raspberryPiZero2W/tutorials.md +++ /dev/null @@ -1,112 +0,0 @@ - - -# Raspberry Pi Zero 2 W Tutorials - -Programming the Pi Zero 2 W is identical to any other Raspberry Pi. These tutorials focus on projects that are well-suited to its small size and lower power consumption. - -## Tutorial 1: Creating a Wireless Network Scanner - -This project turns your Pi Zero 2 W into a portable device that can scan for Wi-Fi networks and display their details. This is great for a "headless" (no monitor) setup. - -**Hardware Needed:** -- 1 x Raspberry Pi Zero 2 W -- A power source (e.g., a USB power bank) - -**Software Setup:** -This project uses standard Python libraries that come with Raspberry Pi OS. - -**Code (`wifi_scanner.py`):** -```python -import subprocess -import time - -def scan_wifi(): - """Scans for Wi-Fi networks and returns a list of SSIDs.""" - try: - # Use the nmcli tool to scan for networks - scan_result = subprocess.check_output(['nmcli', 'dev', 'wifi'], text=True) - networks = [] - for line in scan_result.split('\n'): - if line.strip().startswith('*'): - # This is the currently connected network - continue - if len(line.strip()) > 0 and not line.startswith('IN-USE'): - parts = line.strip().split() - if len(parts) > 1: - ssid = parts[1] - if ssid != '--': - networks.append(ssid) - return list(set(networks)) # Return unique SSIDs - except (subprocess.CalledProcessError, FileNotFoundError): - print("Could not execute nmcli. Make sure it's installed.") - return [] - -if __name__ == "__main__": - print("Starting Wi-Fi scan... Press Ctrl+C to stop.") - try: - while True: - print("\n--- New Scan ---") - found_networks = scan_wifi() - if found_networks: - for network in found_networks: - print(f"Found network: {network}") - else: - print("No networks found.") - time.sleep(10) # Wait 10 seconds before scanning again - except KeyboardInterrupt: - print("\nScan stopped.") - -``` - -**How to Run (Headless):** -1. Save this script on your Pi Zero 2 W. -2. SSH into your Pi from another computer. -3. Run the script: `python wifi_scanner.py` -4. The Pi will continuously scan for and display the names (SSIDs) of nearby Wi-Fi networks. - ---- - -## Tutorial 2: Headless Button-Controlled LED - -This project shows how to control an LED with a button without needing a monitor. It's a perfect example of a simple, embedded application for the Zero 2 W. - -**Hardware Needed:** -- 1 x Raspberry Pi Zero 2 W (with soldered GPIO header) -- 1 x Breadboard -- 1 x LED -- 1 x 330Ω Resistor -- 1 x Push Button -- Jumper Wires - -**Circuit:** -1. **LED:** Connect the longer leg to a 330Ω resistor, and the other end of the resistor to GPIO 17. Connect the shorter leg to GND. -2. **Button:** Connect one leg to GPIO 2 and the other leg to GND. - -**Code (`headless_button.py`):** -```python -from gpiozero import LED, Button -from signal import pause - -# Initialize the LED on GPIO 17 -led = LED(17) - -# Initialize the Button on GPIO 2 -# The internal pull-up resistor is enabled by default -button = Button(2, pull_up=True) - -print("Program is running. Press the button to toggle the LED.") -print("Press Ctrl+C in the terminal to exit.") - -# The toggle() function flips the state of the LED -button.when_pressed = led.toggle - -# pause() keeps the script running in the background -pause() -``` - -**How it Works:** -1. SSH into your Pi Zero 2 W. -2. Run the script: `python headless_button.py` -3. The script will run in the foreground. You can now press the physical button connected to your Pi, and the LED will turn on and off. The `pause()` function is essential for keeping the script alive to listen for button presses. - -``` \ No newline at end of file diff --git a/hardware_guide/README.md b/hardware_guide/README.md deleted file mode 100644 index a663e7b..0000000 --- a/hardware_guide/README.md +++ /dev/null @@ -1,32 +0,0 @@ -# Hardware Guide for the Atom Project - -Welcome to the hardware guide for the Atom Project! This guide is designed to help newcomers understand the basic concepts of the electronic components, microcontrollers, and computers we use in this project. - -## Components - -Here is a list of the components you will encounter in this project. Each link will take you to an overview of the component. - -* **[Buttons](./Components/Buttons/overview.md):** Learn about the different types of buttons and how they are used as simple input devices. -* **[LEDs](./Components/LEDs/overview.md):** Understand how Light Emitting Diodes (LEDs) work and how to use them as visual indicators. -* **[Motors](./Components/Motors/overview.md):** Get an overview of the different types of motors used to create movement in our projects. -* **[Potentiometers](./Components/Potentiometers/overview.md):** Learn how potentiometers can be used as analog input devices to control things like volume or speed. -* **[Power](./Components/Power/overview.md):** Understand the basics of power supplies and how to safely power your projects. -* **[Resistors](./Components/Resistors/overview.md):** Learn why resistors are essential components in electronic circuits. -* **[Screens](./Components/Screens/overview.md):** Get an overview of the different types of screens we use to display information. -* **[Sensors](./Components/Sensors/overview.md):** Explore the world of sensors and how they allow our projects to interact with the environment. -* **[Servos](./Components/Servos/overview.md):** Understand how servo motors work and how to control their precise movements. - -## Microcontrollers and Computers - -These are the brains of our projects. Here you can learn more about the different microcontrollers and single-board computers we use. - -* **[Arduino](./MicroControllers_Computers/Arduino/intro.md):** An introduction to the Arduino platform, known for its simplicity and extensive community support. -* **[ESP32](./MicroControllers_Computers/ESP32/intro.md):** Learn about the ESP32, a powerful microcontroller with built-in Wi-Fi and Bluetooth. -* **[Raspberry Pi](./MicroControllers_Computers/RaspberryPi/intro.md):** An introduction to the Raspberry Pi, a versatile single-board computer that can run a full-fledged operating system. - -## Architecting - -This section covers the tools and techniques we use to design and build the physical parts of our projects. - -* **[3D Printing](./Archtecting/3D%20Printing/overview.md):** An overview of 3D printing and how we use it to create custom parts and enclosures. -* **[CAD](./Archtecting/CAD/overview.md):** Learn about Computer-Aided Design (CAD) and the software we use to design our 3D models.