Other Parts Discussed in Thread: CC2640R2F
Hi, First of all, I should start by saying that I am really beginner about embedded systems. I want to make a project that sends the voltage value read from the ADC to the mobile phone via bluetooth. When I browsed the sample projects in the resource explorer section, I saw that the sample project made in the link I will add does the project I want to do. Link of the project is
When I wanted to do this example as NON-POSIX and using the development board's own ADC pin without using a booster pack, I realized that the best way would be to use task 4,5 and 6. Then I started to follow the steps. When I completed all steps I can send ADC value to mobile phone altough values are not same that I see Putty and SimpleLink. But it is not the main problem.
To reduce power consumption and using button is not logical for my project, it needs periodic measurement (period can be up to 5 minutes). To do so, I put the lines to comment line which are about pressing button in myThread page and then after debugging the program it does not measure the ADC value. I expect that using sleep function in while loop in myThread page can solve this problem (Correct me if I am wrong). Then I add sleep function inside of the while loop and also #include <unistd.h> top of the myThread. Before adding ${COM_TI_SIMPLELINK_CC2640R2_SDK_INSTALL_DIR}\source\ti\posix\ccs to the include path in project properties, #1965 cannot open source file "unistd.h" error is shown( I also checked that unistd.h folder is in the correct pathway). After adding ${COM_TI_SIMPLELINK_CC2640R2_SDK_INSTALL_DIR}\source\ti\posix\ccs to the include path in project properties, #10010 errors encountered during linking; "ble5_simple_peripheral_cc2640r2lp_app_sleep_withoutbutton.out" not built , error is shown. I also add the screenshot of the error.
I also try to insert the sleep function in the variable projects but same problem appears in each one. But in the adcbufcontinous example ( it is in the resource explorer) it uses sleep function and it works properly. I directly import the adcbufcontinous project and build, debug. I can easily adjust ADC sampling frequency and sleep time.
In short, I need a program that measure the ADC like in the adcbufcontinous project and sending data like in the link I mentioned before.
Version of the SDK that I use is 5.30.0.03, I have been used it for 1 months ( I write this becasue many of the similar questions is asked to update the version of SDK.) CCS version is 12.3.0.
I also add the project folder, it might help.
Regards,ble5_simple_peripheral_cc2640r2lp_app_sleep_withoutbutton.zip