arduino uno crashes

I am using arduino uno for my project. In the project, there is a 24bits analog to digital converter and a temperature sensor. I am communicating with adc via spi, with sensor via one wire protocol. If i use both functions in the setup and loop, microprocessor crashes. If i use one of them, microprocessor works normally. I added the libraries and programme. What can be the problem? How can i solve this? (66.7 KB)

adc-sensor-example.ino (2.52 KB)

It would help greatly if you post your code in code-tags. Attached the file(s) if it's too large to include in-line.

  • Does the "one wire protocol" use any of the pins 11, 12 or 13?
  • Are you using the internal led?

Post YOUR code, not the libraries.

No way am I going to download and unzip your files. More members will see your code if posted properly. Read the how get the most out of this forum sticky to see how to properly post code. Remove useless white space and format the code with the IDE autoformat tool (crtl-t or Tools, Auto Format) before posting code in code tags. If the code is too large to post it can be attached.

Thanks your replies.
I am using A0 pin for one wire protocol. Other pins i use are spi(A1-cs, 11-mosi, 12-miso, 13-sck) for adc. I also used data_ready_pin - 7, 8mhz_clk_frequency - 6 for adc . (Total pins (A0-A1-11-12-13-7-6))

Welcome to the forum.

Please read the post at the start of any forum , entitled "How to use this Forum".
Then look down to item #7 about how to post your code.
It will be formatted in a scrolling window that makes it easier to read.

Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?

Can you please tell us your electronics, programming, arduino, hardware experience?

Thanks.. Tom.. :slight_smile:

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.