How to put the results from my wind speed sensor into a data string

Here is a code that works with my wind-speed sensor and displays results on the 'serial monitor’

wind sensor code:

#define uint  unsigned int
#define ulong unsigned long

#define PIN_ANEMOMETER  2     // Digital 2

// How often we want to calculate wind speed

volatile int numRevsAnemometer = 0; // Incremented in the interrupt
ulong nextCalcSpeed;                // When we next calc the wind speed
ulong time;                         // Millis() at each start of loop().

void setup() {
   digitalWrite(PIN_ANEMOMETER, HIGH);
   attachInterrupt(0, countAnemometer, FALLING);
   nextCalcSpeed = millis() + MSECS_CALC_WIND_SPEED;

void loop() {
   time = millis();

   if (time >= nextCalcSpeed) {
      nextCalcSpeed = time + MSECS_CALC_WIND_SPEED;

// Interrupt handler for anemometer. Called each time the reed
// switch triggers (one revolution).
void countAnemometer() {

// Calculate the wind speed, and display it (or log it, whatever).
// 1 rev/sec = 1.492 mph
void calcWindSpeed() {
   int x, iSpeed;
   // This will produce mph * 10
   // (didn't calc right when done as one statement)
   long speed = 14920;
   speed *= numRevsAnemometer;
   iSpeed = speed;         // Need this for formatting below

   Serial.print("Wind speed: ");
   x = iSpeed / 10;
   x = iSpeed % 10;

   numRevsAnemometer = 0;        // Reset counter

I want to put the results into the data string below in order to save it to my SD card. However i don’t know what to put into it. I though ‘x’ might work but it doesn’t. Any help will be greatly appreciated.

String dataString = String(id) + ", " + String('un-certain what to put here') 

//open file to wrtie to
File logFile = ("LOG.csv", FILE_WRITE);

moderator: added code tags (# button above the smileys)

I want to put the results into the data string below in order to save it to my SD card.

Don't. That is a complete waste of resources. Data going to the SD card is already buffered. Just use logFile.print() to print the values as you have them, and then use logFile.println() to put the carriage return and line feed to mark the end of a record.