Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // In setup()
- attachInterrupt(1, adcIsr, RISING);
- }
- volatile bool dataReady = false;
- void adcIsr()
- {
- dataReady = true;
- }
- loop()
- {
- if (dataReady)
- {
- Serial.println(adc.readADC());
- dataReady = false;
- }
- }
- writeReg(OTP_B1, 0x30);
- writeReg(PGA, PGA_OUTPUT_BUFFER_ENABLE | PGA_PGACHPDIS);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement