-
Notifications
You must be signed in to change notification settings - Fork 148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
possibility to log on an SD card #41
Comments
In order to make things more clear this is the code, the error is in the last if-else cycle; on the serial monitor i recive "error opening Datalog.txt" #include <CAN.h> void setup() { Serial.begin(9600); //setup parte CAN Serial.println("CAN Receiver"); // start the CAN bus at 500 kbps //setup SD Serial.print("Initializing SD card..."); // see if the card is present and can be initialized: } void loop() {
Serial.print("Engine RPM = ");
String dataString = "";
int sensor = analogRead(A0);
// controllo sul file else { delay(500); |
Hello! |
hello, i succesfully filtered the CAN data I needed and now i would like con log them on an sd card; i bought an sd logger shield https://amzn.eu/d/3nkAmTf but the shield cs pin is connected to the pin 10, the same as the MCP2515.
I can write on the sd only if the CAN communication is not active; if I start logging data from CAN i can not communicate with the sd card, i thing because the spi line is occupied by arduino and MCP2515.
My idea so is to log the data, than stop the can communication in order to free the spi line and write data on sd, than re-active the can communication and doing this every loop; I tried using CAN.end(); or CAN.sleep(); but nothing changed.
is my idea completely wrong or it could work? thank you very much.
The text was updated successfully, but these errors were encountered: