Adapting ROBucket for the Adafruit SD Shield V2

A project log for ROBucket

Rodent Operant Bucket

lex-kravitzLex Kravitz 09/11/2018 at 02:430 Comments

I was contacted by a couple people about ROBucket over the last year, and decided to update its code and make it a bit easier for people to use it.  

Unfortunately, Adafruit made two versions of their Arduino SD shield.  In the ROBucket paper we used version 1 of the shield, which was discontinued later that year.  Adafruit made several improvements in version 2, but unfortunately the original ROBucket code can not run with this version without modifications.  While making these modifications I ended up rewriting the code with better commenting so it should be easier to read and modify.  

Full code here, main loop sans functions below.  Feedback welcome!

void loop() {
  if (ratio_Met) {