The SD of the keylogger reads alone AAAAA

this my code

#include <PS2Keyboard.h>
#include <SD.h>

const int DataPin = 2;
const int IRQpin =  3; 
const int chipSelect = 10;
File myFile;

PS2Keyboard keyboard;

void setup()
{
  Serial.begin(9600);

  pinMode(10, OUTPUT);  

  while(!SD.begin(chipSelect));                                              // initialize the SD card


  keyboard.begin(DataPin, IRQpin);                                                

}

void loop()
{
  if(keyboard.available())
  {
    char c = keyboard.read();

    while(!(myFile = SD.open("01.txt", FILE_WRITE)));

    myFile.print(c);
    myFile.close();
  }  

  else;

Hola que tal como estan

Only appears this in the sd

`````````````````````````````aaaaaaaaaaaa0000000000000000aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa````aaaaaaaaaaaaaaa1aaaaaaaaaaaaaaazaaaaaaaaaaaaaaa```````````````e00aaaa1````````````````````````eaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa

There's no way that code will compile so if you are getting that output in an SD file, it isn't from that code.

Pete

Then what could it be?

el_supremo:
There's no way that code will compile so if you are getting that output in an SD file, it isn't from that code.

Pete

Zomber:
Then what could it be?

The last sketch someone programmed into it.

aarg:
The last sketch someone programmed into it.

Then reset arduino and re-upload the code?

Zomber:
Then reset arduino and re-upload the code?

Yes, but if it won't compile you can't.

@Zomber: you need to focus on your other thread and get the code to compile before you even think about what is in the SD file.

Pete