Skip to content
Browse files

fixed issue #5 and added costructor description to README.MD

  • Loading branch information...
1 parent bb6f1be commit b92b933813a1ce69cb5d7ebca99aaa8e73982610 @raivisr committed
Showing with 6 additions and 2 deletions.
  1. +1 −1 AS3935/AS3935.h
  2. +5 −1
2 AS3935/AS3935.h
@@ -39,7 +39,7 @@
#define AS3935_LCO_FDIV 0x03, 0xC0
#define AS3935_MASK_DIST 0x03, 0x20
#define AS3935_INT 0x03, 0x0F
-#define AS3935_DISTANCE 0x07, 0x1F
+#define AS3935_DISTANCE 0x07, 0x3F
#define AS3935_DISP_LCO 0x08, 0x80
#define AS3935_DISP_SRCO 0x08, 0x40
#define AS3935_DISP_TRCO 0x08, 0x20
@@ -39,7 +39,11 @@ NB! on Mega 2560 you have to comment out attachInterrupt(1,AS3935Irq,RISING); li
uncomment attachInterrupt(0,AS3935Irq,RISING); line
Short function reference:
+ AS3935(byte (*SPItransfer)(byte),int csPin,int irq);
+    object constructor, first parameter is pointer to a function that
+    does SPI transfer, second parameter is pin that has to be used as
+    chip select and third parameter is interrupt pin
void registerWrite(byte reg, byte mask, byte data)
    write to specified register specified data using specified bitmask,
    the rest of the register remains intact

0 comments on commit b92b933

Please sign in to comment.
Something went wrong with that request. Please try again.