@noel
hi friend…
In what format should I save an image of a sd card?
Don’t want to mention in the main sending code the image saved from the sd card?
Why not add something new to the main code?
Shouldn’t it be mentioned that the main sending code should get the data of the sd card image?
@noel
hi dear @noel
Shouldn’t it be mentioned in the code that the image I saved should be treated as an input to this code? Need to specify that the image saved in the sd card should be taken as serial data to the main code?
@noel [quote=“noel, post:38, topic:15022”]
When you have it working, the data you obtained from the image with the code somewhere above, and saved on the SD card on first arduino, can be send to the second arduino connected to the computer where you can display the image on the screen.
[/quote]
@noel
Sorry, I don’t understand what you said.
How do I tell the main code to get the image saved on the sd card?
How do I save an image to a sd card and connect it to the data transfer in the main code?
As soon as you get the proposed test setup working we will elaborate on this.
@noel
i didn’t get that??
While, (I assume) you are waiting for components, you can for instance display the saved pixel array on your PC with a Processing sketch. Of course first you have to save the generated txt file on your SD card with the help of a stick. The code below you can load into the arduino with SD card, and connect it to the PC.
This link does explain, better then I can, how to connect an arduino to a Processing sketch.
Try all the examples, and then write your own code reassembling the image with the help of “width and height” to receive the pixel values send by the arduino.
If you have problems with that, post your code in another topic like: “how to display image with data on arduino AD card”
#include <SD.h>
void setup() {
Serial.begin(9600);
if (!SD.exists("myImageFile.txt") {
Serial.print("File not found !");
for (;; );
}
File dataFile = SD.open("myImageFile.txt", FILE_READ);
if (dataFile == NULL) {
Serial.print("Can't open file for reading !");
for (;;);
}
while (dataFile.available() > 0) {
String value = dataFile.readStringUntil('\n');
Serial.println(value);
delay (100);
}
dataFile.close();
}
void loop() {
}