各位前辈,晚辈是使用TI MCU的新手,从前有一些Arduino的经验。从前晚辈曾经使用Arduino Uno + HC-06蓝芽模组与手机的Android沟通。使用以下coding:
/*
Sends sensor data to Arduino
(needs SensorGraph and Amarino app installed and running on Android)
*/
#include <MeetAndroid.h>
MeetAndroid meetAndroid;
float temp;
void setup()
{
// use the baud rate your bluetooth module is configured to
// not all baud rates are working well, i.e. ATMEGA168 works best with 57600
Serial.begin(115200);
}
void loop()
{
double C1 = analogRead(A0);
int vol =5*1000 - C1*1000*5/1024;
if (vol == temp)
{ temp == vol;
}
else
{
meetAndroid.receive(); // you need to keep this in your loop() to receive events
// read input pin and send result to Android
meetAndroid.send(vol);
// add a little delay otherwise the phone is pretty busy
delay(300);
}
我想请教的是能否用DK-TM4C123G做到相同效果? 而PIN的RX TX连接又是怎样?由於晚辈第一次使用TI ,PIN的接合还是不熟悉。使用Energia 编程又是否和以上coding 一样? 还望各位前辈指教