Jianlin Cao

Week 14: Interface and Application Programming

• Assignments

This week’s assignments

write an application that interfaces with an input &/or output device

A very simple board is created with msp430g2553 and programed with Energia.

images

Mini USB connector is for power only.

images

Jumper wires from TI Launchpad

images

The board is connect to a bluetooth module (HC-05) via serial port.

An android app was created to receive data via bluetooth and plot them in real time. (This app is created as a favour to my friend, thus the interface is in chinese.)

images

Code

#define A_INPUT A6
#define D_INPUT P1_6

int adc;
int index=0;

void setup()
{
  Serial.begin(9600);
}
void loop()
{
  adc=analogRead(A_INPUT);
  Serial.write('1\t');
  Serial.write(index);
  Serial.write('\t');
  Serial.write(adc);
  Serial.write('\n');
  index++;
  delay(100);
}

Get the files

You can download the source files directly.