anchor.diff:  
   (define (get_base_info) ;; ԣһֱͣĻĿǰݣݿ
   	(while 1
  -		(unless (true? (share going))
  -			(write_string_to_serial "d8 ff ff a0") ;; ʪ Ŀǰǹ㲥Ժñж̵ַľ׼ʽвѯ
  -			(sleep 1000)
  -			(write_string_to_serial "a0") 
  -			(sleep (* 10 1000));; 
  -		)
  -	)
  -)
  +		(if (= (semaphore sid) 1)
  +			(begin
  +				(write_string_to_serial "d8 ff ff a0") ;; ʪ Ŀǰǹ㲥Ժñж̵ַľ׼ʽвѯ
  +				(sleep 1000)
  +			)
  +			(= (semaphore sid) 1)
  +			(begin
  +				(write_string_to_serial "a0") 
  +				(sleep 1000)
  +			)
  +		)
  +		
  +		(sleep (* 10 1000));; 
  +	)
  +)
  +
   (signal SIGINT ctrlC-handler)
   
   (setq cpid3 (spawn 'base_p (get_base_info)))
  
positive.code: 							(cond 
  								((list? atret)
  									(dolist (x atret)
  										(share going true)
  										(write_string_to_serial x)
  										
  										(sleep 100);;; sleep 100ms to serial  
  									)
  									(share going nil)
  								)
  								((string? atret)
  										(share going true)
  										(write_string_to_serial atret)
  										(share going nil)
  								)
  							)						
  				)
  
negative.code: 							(cond 
  								((list? atret)
  									(dolist (x atret)
  										(semaphore sid 2)
  										(write_string_to_serial x)
  										(sleep 100);;; sleep 100ms to serial  
  									)
  									(semaphore sid 1)
  								)
  								((string? atret)
  										(semaphore sid 2)
  										(write_string_to_serial atret)
  										(semaphore sid 1)
  								)
  							)
  							
  