ESP12f.ino 828 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /* Comment this out to disable prints and save space */
  2. #define BLYNK_PRINT Serial
  3. #include <SPI.h>
  4. #include <ESP8266WiFi.h>
  5. #include <BlynkSimpleEsp8266.h>
  6. /* Global Variable */
  7. // Token identification
  8. char auth[] = "qDSPfbEHHMiQxMNFeKZ2_lKwbxD81Yu8";
  9. // Your WiFi credentials.
  10. char ssid[] = "Livebox-7C2C";
  11. char pass[] = "566C61F61F9C925C9F3D7D79E6";
  12. int rsfr = SS;
  13. /* Fonction */
  14. void setup(){
  15. // Debug console
  16. Serial.begin(115200);
  17. pinMode(rsfr, OUTPUT);
  18. digitalWrite(rsfr, 1);
  19. SPI.begin();
  20. //SPI.beginTransaction(SPISettings(14000000, MSBFIRST, SPI_MODE0));
  21. }
  22. void loop(){
  23. //Blynk.run();
  24. Serial.print("New line : ");
  25. digitalWrite(rsfr, 0);
  26. Serial.print("send ");
  27. SPI.transfer(0xAA);
  28. Serial.print("recv ");
  29. //Serial.print(r);
  30. digitalWrite(rsfr, 1);
  31. Serial.print("\n");
  32. delay(500);
  33. }