Understanding how to use micro sd module code

I was trying to code to upload data from an analog pin onto a micro sd from a micro sd module. I was following this tutorial: https://www.hackster.io/electropeak/sd-card-module-with-arduino-how-to-read-write-data-37f390#toc-how-to-use-sd-and-micro-sd-card-with-arduino-4.
With this micro sd module: https://www.amazon.co.uk/gp/product/B06XHJTGGC/ref=ppx_yo_dt_b_asin_title_o06_s00?ie=UTF8&psc=1
and this micro sd card: https://www.amazon.co.uk/gp/product/B073JYC4XM/ref=ppx_yo_dt_b_asin_title_o04_s00?ie=UTF8&psc=1
I used this genuino: https://www.amazon.co.uk/gp/product/B01EWOE0UU/ref=ppx_yo_dt_b_asin_title_o01_s00?ie=UTF8&psc=1

If possible could you write a code for me that does this?? If it takes too long sorry for wasting your time asking…

I got stuck with error message :
Arduino: 1.8.10 (Windows 10), Board: “Arduino Uno”

C:\Users\noodl\AppData\Local\Temp\arduino_modified_sketch_888273\BareMinimum.ino: In function ‘void loop()’:

C:\Users\noodl\AppData\Local\Temp\arduino_modified_sketch_888273\BareMinimum.ino:24:21: warning: invalid conversion from ‘int’ to ‘const char*’ [-fpermissive]



In file included from C:\Users\noodl\AppData\Local\Temp\arduino_modified_sketch_888273\BareMinimum.ino:2:0:

C:\Users\noodl\Documents\Arduino\libraries\SD\src/SD.h:86:15: note: initializing argument 1 of ‘boolean SDLib::SDClass::exists(const char*)’

boolean exists(const char *filepath);


C:\Users\noodl\AppData\Local\Temp\arduino_modified_sketch_888273\BareMinimum.ino:25:27: warning: invalid conversion from ‘int’ to ‘const char*’ [-fpermissive]



In file included from C:\Users\noodl\AppData\Local\Temp\arduino_modified_sketch_888273\BareMinimum.ino:2:0:

C:\Users\noodl\Documents\Arduino\libraries\SD\src/SD.h:80:12: note: initializing argument 1 of ‘SDLib::File SDLib::SDClass::open(const char*, uint8_t)’

File open(const char *filename, uint8_t mode = FILE_READ);


BareMinimum:26:5: error: expected unqualified-id before ‘.’ token



Multiple libraries were found for “SPI.h”
Used: C:\Users\noodl\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.2\libraries\SPI
Multiple libraries were found for “SD.h”
Used: C:\Users\noodl\Documents\Arduino\libraries\SD
Not used: C:\Program
exit status 1
expected unqualified-id before ‘.’ token

This report would have more information with
“Show verbose output during compilation”
option enabled in File → Preferences.

My Code:

#include <SPI.h>
#include <SD.h>

const int coil = A0;
int writing = 0;
int DataReport = 0;
int sensorValue = 0 ;
int outputValue = 0;
void setup() {
// put your setup code here, to run once:
void loop() {
// put your main code here, to run repeatedly:
sensorValue = digitalRead(coil);
outputValue = map(sensorValue, 0, 1023, 0, 600);

If you want help with your code, learn to post it properly by reading the locked posts at the top of this forum, especially using autoformat and code tags.

If you want code written for you then head over to Gigs and Collaborations and bring your wallet.