Advertisement
RuiViana

TestaPCF

Jun 3rd, 2016
252
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.59 KB | None | 0 0
  1. #include <Wire.h>
  2.  
  3. void setup()
  4. {
  5. Wire.begin();
  6. }
  7. void loop()
  8. {
  9. //Se PCF8574A mude 32 para 56
  10. Wire.beginTransmission(56); //Begin the transmission to PCF8574
  11. Wire.write(1); //Send the data to PCF8574
  12. Wire.write(0); //Send the data to PCF8574
  13. Wire.write(2); //Send the data to PCF8574
  14. Wire.write(0); //Send the data to PCF8574
  15. Wire.write(4); //Send the data to PCF8574
  16. Wire.write(0); //Send the data to PCF8574
  17. Wire.write(8); //Send the data to PCF8574
  18. Wire.write(0); //Send the data to PCF8574
  19. Wire.write(16); //Send the data to PCF8574
  20. Wire.write(0); //Send the data to PCF8574
  21. Wire.write(32); //Send the data to PCF8574
  22. Wire.write(0); //Send the data to PCF8574
  23. Wire.write(64); //Send the data to PCF8574
  24. Wire.write(0); //Send the data to PCF8574
  25. Wire.write(128); //Send the data to PCF8574
  26. Wire.write(0); //Send the data to PCF8574
  27. Wire.endTransmission(); //End the Transmission
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement