MICROCONTROLLER SATSHAKIT Programming COMUNICATIONS Arduino HC05 Bluetooth APP App Inventor CIRCUITS Arduino Mega Satshakit VIDEO Video RESOURCES AVR Programming Satshakit Programming SBluetooth tutorial DOWLOAD FILES
SATSHAKIT Satshakit is a 100% Arduino IDE and libraries compatible, fabbable and open source board, and also an improved version of Fabkit. Satshakit born during FabAcademy2015 as one the first test boards for quadcopter final Daniele Ingrassia project. When You work with Satshakit, you need considerer many things: 1. You need milling perfect as possible. 2. Use the same componenets. Replace parts if you know its how works. 3. Soldering with carefull. 4. Probe the conections. Many times, two wires are soldering. Obs. For to protect copper board I used varnish, but it oxidized copper. You can use lacquer or resin products. PROGRAMING For programing with Arduino Uno, in Satshakit web page you have the instructions. Here, I will use Arduino Mega 2560. 1. Set as Arduino Mega as ArduinoISP in menu File/Examples 2. Upload ArduinoISP in your Arduino Mega 3. Conections You can see the conections in Satshakit project here a. Arduino pin 10 to Satshakit pin RST b. Arduino pin 50 to Satshakit pin SCK c. Arduino pin 51 to Satshakit pin MOSI d. Arduino pin 52 to Satshakit pin MISO 4. Burn Satshakit Bootloader a. Set in Board: "Arduino/Genuine Uno" b. Set in Programmer: "Arduino as ISP" c. Burn Bootloader 5. Upload your Arduino program a. Set in tools menu Board: "Arduino/Genuine Uno" b. Set in tools menu Programmer: "Arduino as ISP" c. In Sketch menu, use "Upload using Programmer" COMMUNICATION BETWEEN 2 MICROCONTOLLERS (SATSHAKIT AND ARDUINO MEGA SERIAL TX/RX COMUNICATION Configure the microcontrollers, ARDUINO MEGA as master and the second SATSHAKIT as slave. Set Serial comunication CODE MASTER void setup() { Serial.begin(9600); Rate comunication } void loop() { Serial.write('1'); turn on led delay(2000); time on in ms Serial.write('0'); turn off led delay(200); time off in ms } SLAVE int led = 13; Define pin led int data = 0; void setup() { Serial.begin(9600); pinMode(led, OUTPUT); set pin mode: output digitalWrite(led, LOW); Leed starts off } void loop() { if(Serial.available() > 0) < When serial is ready { data = Serial.read(); Read data serial } if (data == '0') { digitalWrite(led, LOW); If code = 0 then turn off led } if (data == '1') { digitalWrite(led, HIGH); If code = 1 then turn on led } } Burn the bootloaders and program in Satshakit (slave) and Arduino Mega (master) TEST 1 MASTER void setup() { Serial.begin(9600); } void loop() { Serial.write('1'); delay(2000); time on in ms Serial.write('0'); delay(200); time off in ms } TEST 2 MASTER void setup() { Serial.begin(9600); } void loop() { Serial.write('1'); delay(20); time on in ms Serial.write('0'); delay(20); time off in ms } TEST 3 MASTER void setup() { Serial.begin(9600); Rate comunication } void loop() { Serial.write('1'); delay(3000); time on in ms Serial.write('0'); delay(1000); time off in ms } ARDUINO HC05 BLUETOOTH Bluetooth is a wireless technology standard for exchanging data over short distances (using short-wavelength UHF radio waves in the ISM band from 2.4 to 2.485 GHz) from fixed and mobile devices, and building personal area networks (PANs). Invented by telecom vendor Ericsson in 1994, it was originally conceived as a wireless alternative to RS-232 data cables. BLUETOOTH PROTOCOL Bluetooth is defined as a layer protocol architecture consisting of core protocols, cable replacement protocols, telephony control protocols, and adopted protocols. Mandatory protocols for all Bluetooth stacks are: LMP, L2CAP and SDP. In addition, devices that communicate with Bluetooth almost universally can use these protocols: HCI and RFCOMM LMP: The Link Management Protocol (LMP) is used for set-up and control of the radio link between two devices. Implemented on the controller. L2CAP: The Logical Link Control and Adaptation Protocol (L2CAP) is used to multiplex multiple logical connections between two devices using different higher level protocols. Provides segmentation and reassembly of on-air packets. SDP: The Service Discovery Protocol (SDP) allows a device to discover services offered by other devices, and their associated parameters. For example, when you use a mobile phone with a Bluetooth headset, the phone uses SDP to determine which Bluetooth profiles the headset can use (Headset Profile, Hands Free Profile, Advanced Audio Distribution Profile (A2DP) etc.) and the protocol multiplexer settings needed for the phone to connect to the headset using each of them. Each service is identified by a Universally Unique Identifier (UUID), with official services (Bluetooth profiles) assigned a short form UUID (16 bits rather than the full 128). The HC-05 module is a Bluetooth SPP (Serial Port Protocol) module, which means it communicates with the Arduino by Serial Communication. Bluetooth accept Bluetooth LE V4.0 rule (low energy). HARDWARE FEATURES a. Typical -80dBm sensitivity b. Up to +4dBm RF transmit power c. Low Power 1.8V Operation ,1.8 to 3.6V I/O d. PIO control e. UART interface with programmable baud rate f. With integrated antenna g. With edge connector The particular module that I have can be powered from 3.6 to 6 volts, because it comes on breakout board which contains a voltage regulator. However, the logic voltage level of the data pins is 3.3V. So, the line between the Arduino TX (Transmit Pin, which has 5V output) and the Bluetooth module RX (Receive Pin, which supports only 3.3V) needs to be connected through a voltage divider in order not to burn the module. On the other hand, he line between the Bluetooth module TX pin and the Arduino RX pin can be connected directly because the 3.3V signal from the Bluetooth module is enough to be accepted as a high logic at the Arduino Board. APP INVENTOR MIT App Inventor is an innovative beginner's introduction to programming and app creation that transforms the complex language of text-based coding into visual, drag-and-drop building blocks. The simple graphical interface grants even an inexperienced novice the ability to create a basic, fully functional app within an hour or less. App Inventor 1. Install in your device "MIT AI2 Companion" from Play Store. 2. Follow instruction in App Inventor web page. 3. Open browser AppInventor 4. Use a count and enter in AppInventor and create new App Inventor Project. 5. Use interface icons and edit its. 6. Select Bluetooth client in Connectivity. 7. Use Button, image and Title Project. 8. Change in mode "Blocks" 9. Use drag and drop and select items. 10. Export like .pkg in Built menu. You can probe you app on line in App Inventor, or install your app in your fone and probe. CIRCUIT DESIGN WITH ARDUINO MEGA 2560 CIRCUIT DESIGN WITH SATSHAKIT VIDEO DOWNLOAD All files Download