This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

problem with sim800

hi, I wrote a code for an SMS controlled irrigation system. it has three modes: manual mode which can turn a Solenoid valve on and off with an SMS, semi-auto which can turn a solenoid valve on for a specific duration and turn it off using an SMS. and automatic mode which can for example turn a solenoid valve on for an hour every day at a specific time for instance 5 am. I have no problem with the first two modes. but I encountered a problem with the third mode. I need to use a gsm clock for this mode and I wrote a function for testing that extracts the time after we send a message to sim800 and texts back the time. I want to use this time to compare it to 5. when I use this function in my code nothing works and I can't turn the LED on with SMS. when I delete this function the code works fine. what is the problem here?

my compiler is Keil and I use stm32f103ret6.and the function that I have a problem with it is send_clock. 

 

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/**
******************************************************************************
* File Name : main.c
* Description : Main program body
******************************************************************************
*
* COPYRIGHT(c) 2020 STMicroelectronics
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* 3. Neither the name of STMicroelectronics nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

0