本文整理匯總了Golang中C.io_write_analog函數的典型用法代碼示例。如果您正苦於以下問題:Golang io_write_analog函數的具體用法?Golang io_write_analog怎麽用?Golang io_write_analog使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了io_write_analog函數的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1: RunBottomFloor
func RunBottomFloor() {
if GetFloorSignal() != 0 {
C.io_set_bit(C.MOTORDIR)
//time.Sleep(time.Second * 1)
C.io_write_analog(C.MOTOR, 2800)
for C.io_read_bit(C.SENSOR_FLOOR1) == 0 {
SetFloorIndicator(GetFloorSignal())
time.Sleep(time.Millisecond * 200)
}
SetFloorIndicator(GetFloorSignal())
C.io_write_analog(C.MOTOR, 0)
}
}
示例2: Io_write_analog
func Io_write_analog(channel int, value int) {
C.io_write_analog(C.int(channel), C.int(value))
}
示例3: ioWriteAnalog
func ioWriteAnalog(channel, value int) {
C.io_write_analog(C.int(channel), C.int(value))
}
示例4: RunStop
func RunStop() {
C.io_write_analog(C.MOTOR, 0)
}
示例5: RunDown
func RunDown() {
C.io_set_bit(C.MOTORDIR)
//time.Sleep(time.Second * 1)
C.io_write_analog(C.MOTOR, 2800)
}
示例6: RunUp
func RunUp() {
C.io_clear_bit(C.MOTORDIR)
//time.Sleep(time.Second * 1)
C.io_write_analog(C.MOTOR, 2800)
}
示例7: io_writeAnalog
func io_writeAnalog(channel, value int) {
_, err := C.io_write_analog(C.int(channel), C.int(value))
checkError(err)
}