texas-instruments


serialEvent1 on cc3200 energia


I'm trying to receive data in serial1 on CC3200 launchpad and send the data to serial0 for serial monitor. In my code, serialEvent1 don't work. Anyone has a solution for this? What is wrong, please?
Update from comments
I expect to receive data in serial1 and write this data to serial0 for read in serial monitor. I am unable to receive data using the serialEvent1 function. When I put the routine reception inside the loop, I can receive the data. But with the serialEvent1 function does not work. Sorry for the bad english, I hope it has become clear now.
String inputString = ""; // a string to hold incoming data
boolean stringComplete = false; // whether the string is complete
void setup()
{
// put your setup code here, to run once:
Serial.begin(1200);
Serial1.begin(1200);
pinMode(GREEN_LED,INPUT);
// reserve 200 bytes for the inputString:
inputString.reserve(200);
}
void loop()
{
// print the string when a newline arrives:
if (stringComplete) {
Serial.println(inputString);
// clear the string:
inputString = "";
stringComplete = false;
}
}
/*
SerialEvent occurs whenever a new data comes in the
hardware serial RX. This routine is run between each
time loop() runs, so using delay inside loop can delay
response. Multiple bytes of data may be available.
*/
void serialEvent1() {
while (Serial1.available()) {
// get the new byte:
char inChar = (char) Serial1.read();
// add it to the inputString:
inputString += inChar;
// if the incoming character is a newline, set a flag
// so the main loop can do something about it:
if (inChar == '\n') {
stringComplete = true;
}
}
}

Related Links

Texas Instruments Transferring Program
How to interact with an OpenThread device?
how do i use autosar program on tiva EK-TM4c123GXL (ARM cortex M4)?
CCS/DRA755: DSS jython connection timesout whereas CCS manually does run successfully
CCS: MPU6050 Sensorlib
configure osxmotion library and license manager in Canon Juma(STM32F401)
What is the fastest infinite loop in TI-84+ Basic?
serialEvent1 on cc3200 energia
Strange behavior with Sys/Bios mailbox objects
TI CC3200: How to get access point list(Wifi Direct)
Storing values to a list stored in a string
Connecting a Texas Instruments TI-84 Plus CE to an Ubuntu computer
Description of function i.e sl_Start(0, 0, 0) used for cc3200 launchpad
How do I detect if an installation of Code-Composer-Studio is licensed?
TI83+ evaluate expression program

Categories

HOME
powerbi
concurrency
message-queue
filesize
cryptography
biztalk-2010
save
tweepy
twitter-oauth
tiff
chromecast
createjs
pushdown-automaton
spring-jpa
squirrel-sql
sonata
salt-cloud
psql
wsf
spyder
acl
web-config-transform
hevc
oracleforms
tortoisehg
ccavenue
annotation-processing
npoi
credit-card
toad
premake
vcenter
osx-lion
sca
spring-rabbitmq
grails-2.5
subclassing
elastica
cheat-engine
grails-spring-security
grails3.2.0
ejml
spongycastle
entropy
sigsegv
line-intersection
android-mediarecorder
ltrace
oracle-fusion-apps
qtextedit
rational-performance-test
ipywidgets
pyaudio
jsf-2.3
oci
qpixmap
noclassdeffounderror
mathnet
utf-16
mnesia
gridbaglayout
psd
flask-security
ajax4jsf
kotlin-android-extensions
mathematical-expressions
tkx
sunos
flurry-analytics
miglayout
accountmanager
mod-perl
windows-taskbar
django-sites
strcmp
colon
rautomation
postgres-xc
dynamic-rdlc-generation
mongo-jackson-mapper
spiral
ofstream
linkbutton
onconfigurationchanged
getproperty
pageheap
kobold2d
firebird1.5
autosize
mvcrecaptcha
zend-server-ce
vows
data-dump
photo-management
3des
bll
odac
principles
aspbutton
zend-test
suggestbox
acceleration
jvm-bytecode

Resources

Encrypt Message