Hi all,
I made my own interpreter and intepreted language (starting from uBasic), it has some interesting features and can run programs from sd card (so you don't have to load the entire program in SRAM).
It can be used as a standalone interpreter or you can set up a minimal shell you can use interactively (from serial or ethernet) or to remotely manage i/o from a bash script!
You can also customize the language with user definde function.
I recently added the possibility to define subprograms and as soon as possible I would like to port this interpreter on an esp8266 since I think that (on more powerful hw) it could be used to create an easy and convenient "environment" for IOT rapid prototyping.
In sysArduinoUNO.h on line 29 I typed CHIP_SELECT = 10;
Avil has returned the error "init code".
I tested the Arduino and SD card with the SD program of SparkFun Electronics
** SD - a slightly more friendly wrapper for sdfatlib **
Below the printout of this program, works perfectly on chip_select 4, 8, 10.
Initializing SD card...Wiring is correct and a card is present.
Card type: SDHC
Volume type is FAT16
Where to look for a problem, maybe turning on the debug feature will show the problem.
Any program from FAT16 directory does not work
error code is
"read begin failed
fat16info:
SD error
ErrorCode: 2
ErrorData: 1 "
If you're using an Ethernet Shield you must set CHIP_SELECT=4 otherwise it will not work.
If you're using an external SD module (could you link me wich one are you using?)be sure to comment the #define ETH_IO at line 39 of compopt.h (http://avil.altervista.org/Index/2_Configurations.html)
In this way the pin 10, normally used to select the ethernet interface, will be free.
Everything is done according to your guide, checked several times.
My SD card is type no-name but working good with full speed in other programs.
I think the problem is with the SS pin (10) or Slave Select.
When using the ethernet module there is no problem.
I don't have ETH module.
Serial.print("\nInitializing SD card...");
// On the Ethernet Shield, CS is pin 4. It's set as an output by default.
// Note that even if it's not used as the CS pin, the hardware SS pin
// (10 on most Arduino boards, 53 on the Mega) must be left as an output
// or the SD library functions will not work.
pinMode(10, OUTPUT); // change this to 53 on a mega
// we'll use the initialization code from the utility libraries
// since we're just testing if the card is working!
if (!card.init(SPI_HALF_SPEED, chipSelect)) {
Serial.println("initialization failed. Things to check:");
Serial.println("* is a card is inserted?");
Serial.println("* Is your wiring correct?");
Serial.println("* did you change the chipSelect pin to match your shield or module?");
When using the ethernet module there is no problem.
I don't have ETH module.
...I can't really understand wich hardware are you using...
mmm...so you're using an Arduino Uno directly connected to an SD card?(no SD module like this one?)
Can you post the wiring between arduino and the SD card (and other eventual hardware) and attach the compopt.h file?...I will try to replicate the problem in the next days.
At the moment I can't replicate your problem since I can't build a voltage divider to drive directly the SD card without a module.
But now I'm curious about this issue and I will do it in a few days...hold on!
...by the way I tried to connect my Ethernet shield to my Arduino Uno "by wires" (not stacking them) and I'm able to choose the chip select that I want for the SD card...so the problem it's not on the fat16 library I suppose...
I installed the W5100 ethernet card.
Ping to 192.168.1.177 work correctly.
Putty via telnet to 192.168.1.177 gives the message "network error Connection time out"
...look like it's a network problem...are you sure everything it's ok?
I tried to download an install AVIL from it's repo and install it as it is on a win7 machine.
Then I loaded the "AVILshell" example of the library and I tried to telnet the Arduino with putty, hit Enter to get a first answer from the shell...et voilà...it just worked out of the box:
I just fixed a little bug that caused a bad formatting output in putty (not present in linux shell), so if you want make a new download of AVIL.
I just uploaded the AVILshell sketch commenting the #define ETH_IO directive in compopt.h, then I connected my PC to Arduino trough serial and everything seems ok...
I also tried to change the CHIP_SELECT value to 10 in sysArduinoUNO.h (of course I moved the blue wire in the picture to the pin 10) and I can't reply your problem...
I will try in the next day to connect directly to an SD card without module (I just have to wait for a voltage shifter)...but I think there is no big difference since this module is nothing more than a voltage shifter + an sd holder!
My ETh WP5100 card does not have a MAC address.
I have tried on several copies of Arduino R3, always the same error.
In the CMD under windows 7 telnet does not display characters but also does not give a time-out error message.
I still tried on the original Arduino R3 plate, not on the Arduino clones.