This shows you the differences between two versions of the page.
|
pm:prj2026:bianca.popa1106:matei.belciug [2026/05/25 15:32] matei.belciug |
pm:prj2026:bianca.popa1106:matei.belciug [2026/05/25 15:38] (current) matei.belciug |
||
|---|---|---|---|
| Line 164: | Line 164: | ||
| Last but not least, if the user's app is connected to a device and the user selected a picture, pressing upload will send the picture to the desired destination via WIFI. | Last but not least, if the user's app is connected to a device and the user selected a picture, pressing upload will send the picture to the desired destination via WIFI. | ||
| + | |||
| + | ==== The base Arduino code ==== | ||
| + | |||
| + | This code acts as the central controller for the project's stationary base, managing the power delivery and the user interface. | ||
| + | |||
| + | Key Functions: | ||
| + | |||
| + | Battery Monitoring (ADC): The code reads the analog signal from a voltage divider connected to the 7.4V battery pack. It converts this signal into a human-readable voltage value (e.g., 8.2V) and displays it on the first line of the LCD. This allows the user to monitor battery health in real-time. | ||
| + | |||
| + | Manual Speed Selection (ADC): The code monitors the position of the slide potentiometer. It divides the slider's physical travel into four equal segments, representing "Speed 1" through "Speed 4." | ||
| + | |||
| + | Motor Power Regulation (PWM): Based on the selected speed level, the Arduino generates a Pulse Width Modulation (PWM) signal on Pin 9. This signal controls the MOSFET, which acts as a high-speed switch to regulate the motor's rotation. The code is calibrated so that "Speed 4" provides just enough power to reach the target of 2400 RPM without overstressing the 3D-printed arm. | ||
| + | |||
| + | Visual Feedback (I2C): On the second line of the LCD, the code displays the current speed level (1–4) and a visual progress bar. It uses the I2C communication protocol to send this data to the display using only two wires, keeping the wiring clean. | ||
| ===== Results ===== | ===== Results ===== | ||