Does anyone have experiencing coding with mbed?

Thread Starter

SeanV123

Joined Nov 12, 2020
68
I am trying to read values of a potentiometer using AnalogIn on mbed and print to a serial monitor. However i keep on getting crazy numbers. Mbed website is really hard to understand. I will attach pictures of code.1616099619184.png
1616099648880.png
 

BobaMosfet

Joined Jul 1, 2009
1,850
@SeanV123 There are more problems than just that. You don't look like you know how to write C or C++ code. Things are out of order, incorrectly specified, and it's just a bit of a mess. Look at all the errors/warnings at the bottom that the compiler is trying to tell you about.

You can't expect it to operate properly unless you know what you're doing.

I would grasp C before you attempt things with C++.

This might help:

Title: Standard C [Quick Ref]
Author(s): P.J.Plauger, Jim Brodie
ISBN: 1-55615-158-6
 

Thread Starter

SeanV123

Joined Nov 12, 2020
68
@SeanV123 There are more problems than just that. You don't look like you know how to write C or C++ code. Things are out of order, incorrectly specified, and it's just a bit of a mess. Look at all the errors/warnings at the bottom that the compiler is trying to tell you about.

You can't expect it to operate properly unless you know what you're doing.

I would grasp C before you attempt things with C++.

This might help:

Title: Standard C [Quick Ref]
Author(s): P.J.Plauger, Jim Brodie
ISBN: 1-55615-158-6
Thanks man, I code with Arduino all the time and I'm pretty competent with it. Although I'm struggling here, this thread was posted in a fit of rage when I couldn't get it working (It's for a college assignment) I have cooled off now and will attempt again tomorrow. Thank you for your succulent reply I'm forever grateful
 
Top