How to setup Maggy from a Linux session at the lab
Maggy Setup Instructions
Maggy Setup Instructions
Step 0: Remove the levitating magnet before uploading any new code. The controller needs to self-calibrate sensors, and failure to remove the magnet will disrupt calibration.
Step 1: Open a Linux terminal (win button, then type cmd, then press Enter).
Step 2: Run the setup script: run_arduino_ide_setup.sh and confirm the warning with Y (uppercase)
Step 3: Wait up to ~3 minutes for the script to complete. Messages about "removing existing directories" and "untar archives" will appear.
Step 4: The previous script should automatically launch the Arduino IDE. If not, open another shell and launch it with: arduino-ide. If prompted for updates, press "Skip".
Step 5: Clone the internet repository with the following commands on yet another shell:
mkdir Maggy
cd Maggy
git clone https://github.com/Hansolini/Take-home-Maglev-lab.git
mkdir Maggy
cd Maggy
git clone https://github.com/Hansolini/Take-home-Maglev-lab.git
Step 6: After the download, open the .ino file in the Arduino IDE:
Maggy/physical_system/software/V4x_PD_example/V4x_PD_example.ino
Maggy/physical_system/software/V4x_PD_example/V4x_PD_example.ino
Step 7: Install the TCA9548 and Tlv493.d libraries in the Arduino IDE using the Library Manager.
Step 8: Connect the USB-C port to the power transformer. Wait for the 12V LED to turn on. If it doesn’t, notify the instructor.
Step 9: Connect the USB-2 port to the lab PC.
Step 10: In the Arduino IDE, select the board "teensy" from the top ribbon and upload the .ino file (Sketch → Upload).
Step 11: Wait for the upload to complete (check the output terminal).
Step 12: Open the Serial Monitor (magnifying glass icon in the IDE). You should see a stream of numbers.
Step 13: Open the Serial Plotter (heartbeat icon).
Step 14: Uncheck "realSamplingFreq" in the Serial Monitor window to visualize the Hall sensor data graphically.
Step 15: Place the levitating magnet and observe stabilization. If successful, Maggy will levitate.
Step 16: To turn off Maggy:
- Remove the levitating magnet.
- Disconnect the USB-2 connector.
- Disconnect the USB-C connector.
- Place the magnet back on the board for storage.
Ultime modifiche: venerdì, 11 aprile 2025, 14:37