How to upload code to BlueSaab (SAAB-CDC) module using Arduino IDE

Previous Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

How to upload code to BlueSaab (SAAB-CDC) module using Arduino IDE

Karlis
Administrator
This post was updated on .
Here's how to upload the code using Arduino IDE

Background

    *) BlueSaab module is based on Arduino framework
    *) There are three main components:
        - Main ATMEGA328P-PU chip that controls the whole lot.
        - MCP2515 chip: controls “conversations” between the car and BlueSaab module.
        - RN52 bluetooth module: controls the communications between BlueSaab module and audio source.
        - ATMEGA328P-PU controls everything. RN52 and MCP2515 are not aware of each others existence. They just don’t care…

Pre-requisites

    *) A PC running Windows 7 (or later) or Mac running OSX 10.9 (or later).
    *) Latest version of Arduino IDE (at the time of this post it is 1.6.7). Download and install it.
    *) An USB->FTDI cable. You can get one here or here.

Prepare for the code upload

Open Arduino IDE.
    *) Download the latest code from the forum. It will come in .zip format. Unzip it. You will find the following: SAAB-CDC.ino, CAN.zip, CDC.zip, Event.zip, RN52.zip, SoftwareSerial.zip, Timer.zip.
    *) Open the SAAB-CDC.ino file.
    *) Import the .zip libraries:
    *) On both Windows/Mac: "Sketch -> Include Library -> Add .ZIP Library…"
    *) Repeat this for all libraries
    *) Connect the module to your computer via USB -> FTDI cable. Mind the pin order! GND goes to GND (usually black wire), 3.3V to 3.3V etc...
    *) Make sure that “Arduino/Genuino Uno” is selected as the board under "Tools -> Board".
    *) Make sure to select the correct COM (Windows) or TTY (Mac) port under "Tools -> Port" to which your module is connected to.

Upload the code

    *) Click “Verify”. This will check if you have all the prerequisites in place.
    *) Click “Upload”. This should result in “Done uploading” message.
    *) Disconnect the module from the computer.
    *) Congratulations! You are done!
2001 9-5 SE V6; 2006 9-5 Wagon; iOS; BlueSaab version = "latest and greatest" :)