Antonio Teixeira
Member
Hi,
I have a small project to read a file from a sd card on an arduino uno with the ethernet shield (with sdcard slot).
When I try to compile the project I always get this:
B4R Version: 4.00
Parsing code. (0.00s)
Building folders structure. (0.01s)
Compiling code. (0.00s)
Building project (0.02s)
Compiling (Arduino Uno) Error
In file included from C:\Users\Antonio\B4RProjects\miravision caller eth\Objects\src\src.ino:1:0:
C:\Users\Antonio\B4RProjects\miravision caller eth\Objects\src\B4RDefines.h:23:10: fatal error: SD.h: No such file or directory
#include <SD.h>
^~~~~~
compilation terminated.
Error during build: exit status 1
The library's name is rSD it that the cause?
The code I have is this:
Sub Process_Globals
'Definição dos objetos globais
Public Serial1 As Serial
Private sd As SD ' Objeto para gerenciar o cartão SD
End Sub
Private Sub AppStart
Serial1.Initialize(115200)
Log("Iniciando...")
If sd.Initialize(4) Then
Log("Cartão SD inicializado com sucesso.")
Else
Log("Falha ao inicializar o cartão SD.")
Return
End If
Dim fileContent As String = sd.OpenRead("teste.txt")
If fileContent <> "" Then
Log("Conteúdo do arquivo: ", fileContent)
Else
Log("Erro ao ler o arquivo.")
End If
End Sub
Any help please?
Thanks in advance.
I have a small project to read a file from a sd card on an arduino uno with the ethernet shield (with sdcard slot).
When I try to compile the project I always get this:
B4R Version: 4.00
Parsing code. (0.00s)
Building folders structure. (0.01s)
Compiling code. (0.00s)
Building project (0.02s)
Compiling (Arduino Uno) Error
In file included from C:\Users\Antonio\B4RProjects\miravision caller eth\Objects\src\src.ino:1:0:
C:\Users\Antonio\B4RProjects\miravision caller eth\Objects\src\B4RDefines.h:23:10: fatal error: SD.h: No such file or directory
#include <SD.h>
^~~~~~
compilation terminated.
Error during build: exit status 1
The library's name is rSD it that the cause?
The code I have is this:
Sub Process_Globals
'Definição dos objetos globais
Public Serial1 As Serial
Private sd As SD ' Objeto para gerenciar o cartão SD
End Sub
Private Sub AppStart
Serial1.Initialize(115200)
Log("Iniciando...")
If sd.Initialize(4) Then
Log("Cartão SD inicializado com sucesso.")
Else
Log("Falha ao inicializar o cartão SD.")
Return
End If
Dim fileContent As String = sd.OpenRead("teste.txt")
If fileContent <> "" Then
Log("Conteúdo do arquivo: ", fileContent)
Else
Log("Erro ao ler o arquivo.")
End If
End Sub
Any help please?
Thanks in advance.