Visit https://www.arduino.cc/en/software to download and install Arduino IDE software on your computer.
After you have installed Arduino IDE on your computer, you will need to install the ESP32 board library in Arduino IDE before uploading code to the ESP32 board.
2.1 Launch Arduino IDE and go to Files > Preferences.
2.2 In Additional Boards Manager URLs, paste the following link:
https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json
2.3 In Tools > Board > Boards Manager or click the Boards Manager icon on the left bar, search ESP32 and install with version 1.0.6.
In Tools > Manage Libraries... or click the Library Manager icon on the left bar, install the following three libraries with the latest version.
- 3.1 WiFiManager by tzapu
- 3.2 Adafruit SSD1306 by Adafruit
- 3.3 Adafruit GFX Library by Adafruit
4.1 Open the file ESP32-CAM.ino
in the folder Software/ESP32-CAM
with Arduino IDE.
4.2 Turn off the CubeSat by sliding the power switch on the battery box to the OFF side.
4.3 Plug in the mini USB wire to the mainboard and connect to your PC.
4.4 In your Arduino IDE, go to Tools > Board > esp32 > select ESP32 Wrover Module.
4.5 In Tools, select the upload configuration as follows:
- Port: COMX (Try different COM port one by one if multiple COM ports appear)
- Core Debug Level: None
- Flash Frequency: 80MHz
- Flash Mode: QIO
- Partition Scheme: Huge App (3MB No OTA)
- Upload Speed: 921600
4.6 Click the Upload arrow icon on the top left corner to start compile and upload the code to ESP32-CAM.
During uploading, the message "Writing at 0x00000000... (xx%)" will be shown up in the Output window at the botton of Arduino IDE.
Please do not unplug the USB wire during this process.
If the message "Leaving... Hard resetting via RIS Pin..." shows up, the upload is completed and the Mini USB wire can be unplugged.
5.1 Plug the Mini USB connected to your PC to Arduino Nano.
5.2 In Tools > Board > Arduino AVR Boards > select Arduino Nano.
In Tools > Processor > select ATmega328P (Old Bootloader). (If the upload failed, try different processor since the processor varies across different manufracturers.)
5.3 Click the Upload arrow icon on the top left corner to start compile and upload the code.
If completed, the message "Done Uploading" will be shown and the Mini USB wire can be unplugged.
6.1 Turn on the power switch by sliding the switch to the ON side. If the OLED doesn't show up any message, press the ESP reset button.
6.2 The message "Searching WiFi..." will be shown on the OLED diplay and the ESP32-CAM will search for the saved WiFi credentials in the board, which is the SSID and the password of a hotspot.
6.3 If the LED on the ESP32-CAM will flash multiple times, the ESP32-CAM is connected to the WiFi network and its IP adress will be shown on the display.
If the message "SSID not found. Entered config mode." is shown on the display, the ESP32-CAM cannot found its saved WiFi network. See Sec. 6.5 for changing its WiFi configurations.
6.4 Connect your device (PC, laptop, mobile phone, or tablet) to the same WiFi network that the CubeSat is connected to. Open the browser and search with the IP address. A web page of CubeSat's control panel will be shown. Go to Sec. 7 to see how to control the CubeSat.
6.5 If the saved WiFi credentials is not found, the CubeSat will turn into Config mode and display its SSID name on the OLED display.
6.6 Use any device with WiFi connectivity to search SSID name of the CubeSat.
6.7 After your device is connected to the CubeSat through the SSID, the WiFi Manager page will show up on your device. Click configure WiFi > select the WiFi network that you want your CubeSat to connect or type the SSID and password in the box below.
6.8 Click save and close the WiFi Manager page on your device. Turn off power of your CubeSat and turn on again to reset. Repeat Sec. 6.1 to try the new WiFi connection.
6.9 If you want to erase the saved WiFi credentials to reconfigure the WiFi settings, you can press the hold the WiFi Reset button while pressing the ESP Reset button once. This can force the ESP32-CAM entering the Config mode.
After the successful WiFi connection, a control panel shown below can be access by searching the CubeSat's IP address on the browser.
7.1 Camera Live Stream
Press the green Start Stream button to start the video stream. Press the red Rotate Stream button to rotate the video image if the orientation is wrong. The two sliding bar below are used to increase video resolution and video quilty.
7.2 Solar Panel Deploy
The Deploy button is used to release the spring-loaded solar panels by activating the solenoids.
7.3 Reaction Wheel Control
The third sliding bar is used to control the motor coupled to the reaction wheel. Drag the slider to control the motor rotate left and right. Press the Stop Motor button below to stop the motor.
7.4 Light Sensor Readings
The CubeSat has four ports to install the light sensors. They are located at the left and right sides after the solar panels deployed.
After plugging the light sensors to the ports, the readings will be shown on the control panel.
7.5 Battery Meter
The top left green bar is the battery meter. The four LEDs on the mainboard are also showing the battery percentage:
- 4 LEDs ON: 75-100%
- 3 LEDs ON: 50-75%
- 2 LEDs ON: 25-50%
- 1 LED ON: 0-25%. Need Charging: take out the batteries and put it in the charger.
7.6 CubeSat LED Flash
The Flash LED button will flash the LED located on the ESP32-CAM.
7.7 Auto Light Tracking
The Light Tracking button will turn on an auto light tracking mode by comparing the light sensors values located at the left and right side. The CubeSat will rotate the reaction wheel to change its orientation for facing its solar panels to the brightest direction.