Hello,
I'm new in the Picaxe programming, and my current project is to send "AT" command to a HC-12 RF module and get a response from the "serin" command
so far I'm able to send commands with "serout C.4,T9600_8,("AT")" successfully , but the answer from the serin does not work.
I'd like to decode all the feedback from the HC-12 module as show in the Serial Terminal picture.
Also I did install a 1n4148 diode (bar to Vcc) and a 10k resistor (to Gnd) at pin C.3
In this program I'm using pin C.3 as input and C.4 as output, and the pin C.1 & C.2 will be use for I2C (LCD,RTC)
The HC-12 was tested from the Picaxe Serial Terminal.
Any suggestions is welcome.
Thank's again.
the codes:
#no_data
#picaxe 08m2
setfreq m8
PAUSE 500
DO
serout C.4,T9600_8,("AT") ;command sent
;serout 4,T9600_8,("AT+RX")
;serout 4,T9600_8,("AT+C002")
SerIn C.3,T9600_8,b0,b1 ;answer
sertxd ( b0,b1,cr,lf ) ; sending the answer to the Serial Terminal
;DEBUG
PAUSE 3000
loop
================ answer from serin =====================
====================== HC-12 Test =======================================
============================== circuit diagram =============================
==================================================================================
======================= test with 2 HC-12 Module 1 transmitter 1 receiver 37 Bytes Data=======================
I'm new in the Picaxe programming, and my current project is to send "AT" command to a HC-12 RF module and get a response from the "serin" command
so far I'm able to send commands with "serout C.4,T9600_8,("AT")" successfully , but the answer from the serin does not work.
I'd like to decode all the feedback from the HC-12 module as show in the Serial Terminal picture.
Also I did install a 1n4148 diode (bar to Vcc) and a 10k resistor (to Gnd) at pin C.3
In this program I'm using pin C.3 as input and C.4 as output, and the pin C.1 & C.2 will be use for I2C (LCD,RTC)
The HC-12 was tested from the Picaxe Serial Terminal.
Any suggestions is welcome.
Thank's again.
the codes:
#no_data
#picaxe 08m2
setfreq m8
PAUSE 500
DO
serout C.4,T9600_8,("AT") ;command sent
;serout 4,T9600_8,("AT+RX")
;serout 4,T9600_8,("AT+C002")
SerIn C.3,T9600_8,b0,b1 ;answer
sertxd ( b0,b1,cr,lf ) ; sending the answer to the Serial Terminal
;DEBUG
PAUSE 3000
loop
================ answer from serin =====================
====================== HC-12 Test =======================================
============================== circuit diagram =============================
==================================================================================
======================= test with 2 HC-12 Module 1 transmitter 1 receiver 37 Bytes Data=======================
Last edited: