So you're a Noob? Post your questions here until you graduate! Don't be shy.

User avatar
By jmroman
#60553 My mistake and my apologies!

Between the first and the second reply to my post I did use extern "C"... but not at the code beginning.

It does work as it should now.

Thanks to you both.

Code: Select allextern "C"{
  #include "user_interface.h"
}
#include <EEPROM.h>
#include <Wire.h>

const byte ledPin = 13; // Pin with LED on on Lolin NODEMCU
 
uint32 t0;

void setup()
{
  pinMode(13, OUTPUT);  // Initialize the LED_BUILTIN pin as an output
  Serial.begin(115200);
  t0 = system_get_time();
}


int led = 0;
char line[40];
 
void loop()
{
  digitalWrite(13,led=!led);
  t0 = system_get_time();
  sprintf(line,"System time %d led %d", t0, led);
  Serial.println(line);
  delay(1000);
}