|
Post by hobie1978 on Feb 27, 2017 9:26:40 GMT
Hello other members and guests.
I have my ShieldBuddy for some time now and starting to explore the possibilities. Since I2C on the Arduino Due isn't working properly (read: not) and it is to slow for my use, I was glad I found the ShieldBuddy.
Now I'm curious on what others are trying to build with their ShieldBuddy and what challenges they have.
My goal is making a working datalogger that logs around 24 channels of automotive data to an external MySQL database. For this I need basic things like I2C, SPI (SD-card and ethernet). More specific:
Core 0: Timing and sending data to the database over USB-serial; Core 1: 1 I2C-channel for retrieving data between 50 to 100 times per second; Core 2: Task 1: SPI for a webserver that loads a website with "real-time" information via ethernet from the SD-card (Arduino ethernetshield); Task 2: 1 additional I2C-channel for sending data to my 7 custommade onboard gauges.
Things I have to make/try: 1- Get the webserver running, SD-card info-sketch works, but the webserver doesn't. 2- Get I2C running on the ShieldBuddy, but I need 2 channels, because retrieving the data from a bunch of Arduino Nano's should not be interrupted by sending it to my gauges. 3- Get the second I2C channel working for my gauges.
If anyone has tips or tricks to get the SD-card webserver working, I'm interested, maybe I'm doing something wrong.
Like to hear about your projects.
Greetings from the Netherlands.
Johan.
|
|
|
Post by mjb on Feb 27, 2017 9:31:12 GMT
Hi,
Testing a webserver that includes SD access is due this week. Using the latest ShieldBuddy add-in should work. The webserver and SD card work independently I know for sure!
|
|
|
Post by hobie1978 on Feb 27, 2017 9:33:46 GMT
Hello mjb,
how is the situation about SDA1/SCL1?
|
|
|
Post by hobie1978 on Feb 27, 2017 10:00:47 GMT
mjb,
I tried the SD-card sketch (Cardinfo from the SD-library) and changed all Serial to SerialASC. This results in:
Initializing SD card... Initializing SD card... Initializing SD card... Initializing SD card... Initializing SD card...Wiring is correct and a card is present.
Card type: SDHC þ Initializing SD card...Wiring isø Initializing SD card...Wiring is correct and a card is present.
Card type: SDHC ú Initializing SD card... Initializing SD card... Initializing SD card... Initializing SD card... Initializing SD card...Wiring is correct and a card is Initializing SD card... Initializing SD card... Initializing SD card... Initializing SD card... Initializing SD card... Initializing SD card... Initializing SD card... Initializing SD card...Wiring is ó Initializing SD card...Wiring isü Initializing SD card...
It keeps initializing, sometimes it does a bit more and there are strange characters. But no card info and it should run only once.
Win 10, IDE 1.8.1, add-in 1.31, with the toolchain version 4.9 installed.
Do you have any ideas? Since this should be very basic.
Johan.
|
|
|
Post by mjb on Feb 27, 2017 12:22:07 GMT
It works!
If you go to internal.hitex.co.uk:8089 (during UK office hours) you will see a ShieldBuddy serving webpages that come from a SD card. The sketch is attached, along with the files that go on the SD card. Unzip this to a SD card in your PC and then put it into the SD slot on the Ethernet Shield.
WebserverSD.ino (7.87 KB) SD_Files.zip (222.52 KB)
|
|
|
Post by hobie1978 on Feb 27, 2017 13:28:05 GMT
Hi mjb,
I've found what I did wrong. But I'll try this too.
The problem was with the powersupply. I used a USB-cable that was not the right one to power the ShieldBuddy together with an ethernetshield (to long and to thin probably). I came to that idea because of the strange characters, while having lunch :-).
I think it might be a good idea to make a thread for this (power(supply)).
Thanks for your time.
On to I2C communication.
Johan.
|
|
|
Post by Hitex on Feb 27, 2017 19:35:50 GMT
You can use hardware based I2C on pins 20/21, 6/7 and 16/17. Please note that there is only one I2C hardware peripheral so you can only use one of these pin pairs simultaneously. For any other pins you need to use the software I2C driver. There is an example of this provided.
|
|
|
Post by Admin on Feb 27, 2017 19:39:12 GMT
Hi,
Are you making a one-off system or is it something you make several of?
|
|
|
Post by hobie1978 on Feb 28, 2017 14:38:00 GMT
Admin,
I'm building one for myself (tractorpulling project). And if anyone is interested, I can probably make more. But have to design several PCB's, enclosures, etc..
|
|
|
Post by Admin on Apr 25, 2017 10:35:56 GMT
|
|