I've come across a few tutorials for adding an rtc module to a pi. They all include a step in which you do
echo ds1307 0x68 > /sys/class/i2c-adapter/i2c-1/new_device. When I try this, I get a
bash: ... Permission denied. If I pipe into a tee command to write to
/sys/class..., I get
tee: ... invalid argument. If I try
bash -c or
sh -c before putting the echo command in quotes, I get an
Invalid argument error or
sh: echo: I/O error. I always run
sudo modprobe commands beforehand, to
I'll note that my rtc device is listed as ds3231, not ds1307, but modprobe on ds1307 is the one that works, so I am confused on that point as well.
What's my next step.
Some pi details: I am using a model b with 512 mb of ram. The OS is Raspbian.