Hi! I am very new to the arduino and I was trying to send a data from my arduino to a SQL sever. I found a sample code and when I try to upload it this shows up.
MYSQLTEMP.ino:7:18: fatal error: sha1.h: No such file or directory
compilation terminated.
Error compiling.
I found many solutions that I need to make a SHA folder in the libraries folder of the arduino but it still didnt work.
It looks like that example is meant to go along with this video: How to save data from Arduino to MySQL Database Server - YouTube have a watch and hopefully it will explain what you need to do to get the sketch working. Basically the problem is that you need to have the file sha1.h available on your system but it's not included with the example files. Are you using a ENC28J60 Ethernet controller?
pert:
It looks like that example is meant to go along with this video: https://youtu.be/olUCX1EGIIU have a watch and hopefully it will explain what you need to do to get the sketch working. Basically the problem is that you need to have the file sha1.h available on your system but it's not included with the example files. Are you using a ENC28J60 Ethernet controller?
Yes that is exactly what I was watching and that is where I got the codes from. And yes, I am also using the ENC28J60. I've been following what was on the video step by step but when I try to upload it, the error pops up. I changed the Ethernet.h to UIPEthernet.h if that also needed for I am using the UIPEthernet library.
I don't know if that is the correct way (I don't think you want to pollute the original libraries directory). I assume that the zip that you downloaded contains a sha1.cpp and a sha1.h; copy both files to your project directory and use #include "sha1.h" in your ino file.
Note that you might get compile errors depending on the version of the IDE (actually of the compiler) that you use. They are probably easy to fix.