Drexel dragonThe Math ForumDonate to the Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: Matlab to Arduino
Replies: 1   Last Post: Jul 10, 2013 5:26 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]

Posts: 41
Registered: 3/30/12
Matlab to Arduino
Posted: Jul 10, 2013 5:10 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

I want to send a set of values say 1,2 from matlab to Arduino.
My matlab code for sending values is as follows
fopen (s)
for i = 1:2
fwrite(s, i, 'uint8');

Arduino side: i want to receive these 2 values : 1 and 2.

int Data;

void setup()

void loop()

if(Data==1) {
Serial.println("hello1"); }
else if(Data==2){
Serial.println("hello2"); }

Problem: The values sent from matlab is not received in arduino. Any body please help me where i went wrong. Please help.!!!

Date Subject Author
Read Matlab to Arduino
Read Re: Matlab to Arduino

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum 1994-2015. All Rights Reserved.