So it hasn't been smooth sailing since I installed the Arduino libraries. This is why I was taking baby steps.
I followed the Adafruit directions for the HTU21D temperature and humidity sensor, and got ... nothing. Really nothing. One of my desperate ideas was to look for other libraries. I found SparkFun's HTU21D library, complete with a tutorial. The difference between the two libraries is that SparkFun has two error codes, 998 if sensor is not detected, and 999 if CRC is bad. I saw a whole lot of 998, and that was very helpful. No one likes to hit an error condition, but do you know what's worse? An error condition without an error message somewhere! I removed the Ethernet shield from the system. I ran Blink again just to be sure of my baseline. I ran a lot of continuity tests. (Tip: I always need at least one multimeter with the audible continuity feature.) I read the example code comment "use inline 330 ohm resistor if your board is 5V
" and added resistors because my Nano is a 5V board. (Sadly, I didn't have any 330Ω resistors in my supplies. I did have a bag of 120Ω resistors from a long time ago, to use as signal terminators.) I ran even more continuity tests. I checked the 3V3 output voltage (3.28V) and the data line resistances (both about 360Ω). I think it's a dead sensor, possibly zotted before I added the inline resistors.
So, on to the ENC28J60 Ethernet shield for Nano. Again, the sample code didn't work. I tried EchoServer and TcpServer. I modified the example code to use a valid legacy IPv4 address (I decided the first test could be IPv4, even if my end goal is not to use legacy) on my home network, but I couldn't ping it, and I couldn't telnet to port 1000 on it. Additionally, my router didn't have a complete entry for it in its ARP table. Also, the link lights on the shield were off far more often than on. I ended up re-cabling everything in my computer room, both to simplify cables and connections, and to move the little unmanaged switch for extra ports to my desk so I could watch its blinking lights as well. Based on the indicators (no link lights on the ethernet shield, no link lights on the little switch, and no ARP entry on the router), I have to think this one is also dead. However, I also need to test this suggestion before giving up.
Yes, I think it's rather odd that two out of three components aren't working, and the two peripherals at that. It's possible that I need to work on some intermediate steps, to learn more about Arduino. Gee, more tinkering ...
No comments:
Post a Comment