Change temp sensor code to work for Ardunio Mega ADK

Hello,

Very new to coding and using an Arduino so I am trying to follow some online tutorials to get a grasp of the basics.

Been trying to follow this tutorial online (http://www.hobbytronics.co.uk/ds18b20-arduino) to use a temp sensor and see the reading on the serial monitor.

I have built the circuit as shown on the web page and downloaded the libraries needed to make the circuit work. However, I keep getting an error message, as shown in picture 1, stating there is an error compiling it for the Mega board.

I was wondering if anyone knows how I can alter the code to make it work for the Mega or something different I can do to make it work?

Many thanks

Thanks for replying, that was the whole of the error message from the compiler. If I had more information from the error message screen I would have posted it as I know how unhelpful that message is as I have been staring at it for the last hour.

Luckily, I have now fixed the problem, by deleting the #include statement at the top and adding the libraries again from the sketch – include library – and selecting the DallasTemperature library.