Hi ,
I’am using basic code for testing purposes. I can’t see my variables in teraterm when I’m using std::cout .Using mbed version 6.16.0.
This is the code snippet.
#include <iostream>
#include "LIB_TEST.h"
using namespace std;
int main()
{
while(1){
double a = 7.4;
int b = 99;
std::cout << "a + b = " <<
LIB_TEST::Arithmetic::Add(a, b) << std::endl;
std::cout << "a - b = " <<
LIB_TEST::Arithmetic::Subtract(a, b) << std::endl;
std::cout << "a * b = " <<
LIB_TEST::Arithmetic::Multiply(a, b) << std::endl;
std::cout << "a / b = " <<
LIB_TEST::Arithmetic::Divide(a, b) << std::endl;
}
return 0;
}
Hello Jan ,
I tried to your code and your mbed_app.json file.It doesn’t work again. I’m getting same results in TeraTerm.In this setup i’m working on a NUCLEOF429-ZI.
MbedOS 6.16 bare-metal (just for faster compilation)
Nucleo-F429ZI
Serial terminal apps - Termite, YAT, Puty - all same result
mbed_app.json from above
the code and output below
#include "mbed.h"
#include <iostream>
#define BLINKING_RATE 1s
DigitalOut led(LED1);
int main()
{
std::cout << "Hello\n";
double a = 7.4;
int b = 1;
while (true) {
led = !led;
b++;
std::cout << "a + b = " <<a + b << '\n';
std::cout << "a * b = " << a * b << '\n';
std::cout << "a / b = " << a / b << '\n';
ThisThread::sleep_for(BLINKING_RATE);
}
}
Hi Jan,
I tried that but I’m getting error; Could not parse mbed app configuration from /tmp/chroots/ch-7c748c19-ac80-4018-b6c9-fe2c9ffcdd51/src/mbed_app.json.
This is the code
#include "mbed.h"
#include <iostream>
#define BLINKING_RATE 1s
DigitalOut led(LED1);
int main()
{
std::cout << "Hello\n";
double a = 7.4;
int b = 1;
while (true) {
led = !led;
b++;
std::cout << "a + b = " <<a + b << '\n';
std::cout << "a * b = " << a * b << '\n';
std::cout << "a / b = " << a / b << '\n';
ThisThread::sleep_for(BLINKING_RATE);
}
}