🚢

Initial Task

đź’ˇ
Burning Bootloader

Steps to be followed initially

This guide is for arduino based bootloader
Install arduino IDE
Install CP210x USB to serial driver
Install Spresense Arduino Library 1. Open Arduino IDE 2. Open the preferences in [File→Preferences].
notion image
Copy and paste the following URL into the field called Additional Boards Managers URLs:
https://github.com/sonydevworld/spresense-arduino-compatible/releases/download/generic/package_spresense_index.json
notion image
Open the Boards Manager [Tools→Board→Boards Manager].
notion image
Search for Spresense. Once found in the list, select it and click install.
Package is around 150mb
Package is around 150mb
The Spresense Arduino Library is now installed.

Setting up the environment

Identify serial port used by spresense
Connect your PC to the Spresense main board USB connector and check that the power LED turns on. The serial port driver may install at this point if it has not done so already.
Connect your PC to the Spresense main board USB connector and check that the power LED turns on. The serial port driver may install at this point if it has not done so already.

Install Bootloader

Follow these steps carefully otherwise your device might be bricked!
Select the Spresense board in the [Tools→Boards→Spresense] menu.
notion image
Select the serial port used by Spresense from the menu [Tools→Port]. If there is more than one port see Identify the serial port used by Spresense board for more info.
notion image
If you are using the Spresense board for the first time, or if you are using an updated version of the Spresense Arduino Library, update the boot loader by selecting [Tools→Programmer→Spresense Firmware Updater].
notion image
Then select [Tools→Programmer→Burn Bootloader].
notion image
Review and accept the EULA by following the dialog.
notion image
Once the upload completes, this is how it should look like:
notion image
Congrats 🎉 Bootloader is successfully flashed!

Example sketch to verify installation

You have now finished setting up the board. To verify the setup is correct, copy and paste the following example LED test code into a new sketch:
void setup() { pinMode(LED0, OUTPUT); pinMode(LED1, OUTPUT); pinMode(LED2, OUTPUT); pinMode(LED3, OUTPUT); } void loop() { digitalWrite(LED0, HIGH); delay(100); digitalWrite(LED1, HIGH); delay(100); digitalWrite(LED2, HIGH); delay(100); digitalWrite(LED3, HIGH); delay(1000); digitalWrite(LED0, LOW); delay(100); digitalWrite(LED1, LOW); delay(100); digitalWrite(LED2, LOW); delay(100); digitalWrite(LED3, LOW); delay(1000); }
Build and upload the LED test sketch by clicking Upload.
notion image
Wait for the upload to complete.
notion image
Your sketch should run automatically. When the LEDs on the main board are flashing, congratulations! Your setup is now complete!
đź’ˇ
Testing Camera

Testing camera module is very important task and follow some critical hardware connections:

Fit camera into case slot carefully.
notion image
Make sure your main board is correctly placed on extension board
  • High density connector of both extension board and main board should snugly fit into each other.
  • There will be a click sound, if it does not fit properly remove carefully in one direction and try again.
  • Do not put large amount of force!
    • notion image
  • SD card, microphone, speaker might not work in case of connection are loose.
Next step is to connect camera
notion image
  • Connect carefully according to side mentioned above
  • Insert cable into the slot slowly until you feel sliding motion
  • Do not put extra force on cable and make sure you are applying force equally from both side
Power main board to use both main board and extension board.

Flashing example camera code in arduino

File → Examples → Camera → camera
notion image
Change number of pictures taken in line 196 from 100 to something 10-20
if (take_picture_count < 100)
You can also add some inbuilt LED functions to know current status.
Upload on spresense board similarly
You can now insert SD card into the slot and open serial monitor to show output of code.
In case you get Insert SD card error repeatedly double check your main board and extension board connection.
Once code running is stopped you can insert SD card into your PC and check images.
SAMPLE IMAGE
SAMPLE IMAGE

Add Microphone

 
Using analog microphone [MEMS microphone / electret microphone]
notion image
Identify GND and output of microphone [GND have a line]
notion image
Solder carefully and attach long enough wires
To make microphone work certain bias resistor is required to be soldered on extension board [as in figure below] but there is workaround which is in next step.
notion image
Take female berg and attach on the connectors and follow this schematic to solder or attach microphone and bias resistor [2.2kΩ]
notion image
notion image
đź’ˇ
In case there is any IO confusion test with continuity with help of multimeter
notion image
Final solution should look like this
Final solution should look like this
Prepare DSP files [Download these files] → MP3DEC → MP3ENC → WAVDEC → SRC
Format SD card with FAT32 format and make a folder BIN, final it should look like this → SD_Card → BIN → MP3DEC → MP3ENC → WAVDEC → SRC
Â