Hi, as the title says Serial.print () does not work on my Arduino UNO.
More specifically the trouble is usually it works, but when I run the following code not:
#include <MemoryFree.h>
#include <wolfssl.h>
#include <wolfssl/wolfcrypt/sha256.h>
unsigned long inicio;
unsigned long tiempo;
void setup() {
while(!Serial);
Serial.begin(9600);
}
void loop() {
byte shaSum[SHA256_DIGEST_SIZE];
byte buffer[1024] = {"hola mundohola mundohola mundoho"}; // fill buffer with data to hash
Sha256 sha;
inicio = micros();
wc_InitSha256(&sha);
wc_Sha256Update(&sha, buffer, sizeof(buffer)); // can be called again and again
wc_Sha256Final(&sha, shaSum);
tiempo = micros() - inicio;
Serial.print("Tiempo sha256: ");
Serial.println(tiempo);
delay(3000);
}
If I comment functions "wc_InitSha256" "wc_Sha256Update" "wc_Sha256Final" Serial.print () works perfectly.
Also if I run the code using an Arduino Mega board everything works smoothly.
Can you give me some solution?
Thank you very much for your time.