arduino-uno


Execute line by line Arduino


I have a C program which send information (like that 134:12) line by line to arduino. Arduino gets this information but only executes the first line... I think it's a problem with \n
How can I solve my problem?
C program
FILE *file;
file = fopen("/dev/cu.usbmodem1421","w"); //Opening device file
fprintf(file,"%s",argv[2]); //Writing to the file
usleep(1);
fclose(file);
Arduino program
while(Serial.available() == 0);
String val = Serial.readString();
String posServo1 = getValue(val, ':', 0);
int posServo1Int = posServo1.toInt();
String posServo2 = getValue(val, ':', 1);
int posServo2Int = posServo2.toInt();
Serial.println(posServo1Int);
Serial.println(posServo2Int);
servo1.write(posServo1Int);
servo2.write(posServo2Int);

Related Links

Serial Port not working () on Arduino in JetBrains CLion
Error in using IF statement
Arduino not displaying results
Python ImportError: No module named yahoo_finance
Can I take solar panel's output as an input to Arduino
I cannot find UID of my Arduino
Arduino Program Reset Bug
arduino uno R3 input pins with gsm shield
Light weight machine to machine communication with Arduino
Interfacing RM5 evolution coin acceptor with arduino
Arduino-ESP8266 Sending URL from a client browser connected to the esp8266 AP and receiving the entered URL in the arduino board
Need explanations about a code relative to MPU6050
Arduino Programmer only works after unlugging and plugging back in
How do I communicate between Arduino board and Intel Edison Arduino board using XBee S2?
I cannot solve my arduino program error
2.4 inch TFT LCD SPFD5408 with Arduino Uno - touch not working

Categories

HOME
java
compiler-construction
office365api
elm
spring-jdbc
podio
spring-kafka
ibm-odm
windows-server-2012
ghc
custom-wordpress-pages
ml
crosstab
numerical-methods
dynamic-featured-image
intel-pin
phpfox
entitlements
typo3-6.2.x
windowbuilder
gsoap
frame
nameservers
code-contracts
usbserial
vsts-build-task
openoffice.org
jquery-bootgrid
hockeyapp
service-discovery
xenforo
pdf-reactor
gpx
wso2carbon
auto-update
outlook-2013
appcompat
chain-builder
qsslsocket
dds
worksheet
python-webbrowser
crosswalk-runtime
mediaelement
parallel-data-warehouse
deadbolt-2
android-fonts
android-textview
hexdump
tform
independentsoft
freelancer.com-api
freedesktop.org
unity-networking
marching-cubes
intellij-14
tableau-online
myo
sortedlist
census
graph-api-explorer
lustre
titanium-modules
htmlcleaner
doskey
poller
mbr
multiprocessor
dbconnection
ora-00911
shellexecute
html-editor
mhtml
isnullorempty
quickdialog
cisco-jtapi
spyware
sql-server-profiler
telerik-scheduler
createwindow
infrastructure
vc90
zend-tool
brewmp
photoshop-cs4
phonon
msdev
grid-system
document-conversion

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App