Advertisement
Guest User

Untitled

a guest
Feb 11th, 2016
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. @SuppressWarnings("unused")
  2. public static void main(String args[]) throws InterruptedException{
  3. int fd = Spi.wiringPiSPISetup(0, 10000000);
  4. if(fd <= -1){
  5. System.out.println("SPI Setup Failed");
  6. return;
  7. }
  8.  
  9. byte[] SendPacket = new byte[]{(byte)159, (byte)0};
  10. int check = Spi.wiringPiSPIDataRW(0, SendPacket, 2);
  11. if(check <= -1){
  12. System.out.println("SPI DataRW Failed");
  13. }
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement