大家好,我已经创建了一个使用HC-05控制arduino的应用程序,它工作得很好,但是我尝试在代码中10秒钟后连续监视hc-05连接状态,我尝试了广播接收器,但它显示连接状态更改时只有一次
如果要断开连接或脱机,我想连续检查HC-05连接状态 每当我的HC-05打开时,都应该将其与我的应用程序连接
这是我尝试过的线程
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc-4.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-4.0.xsd">
<bean id="sg" class="com.kachakayala.services.CountrySg"></bean>
</beans>