Openbot passe en version béta!
Nous disposons maintenant d'une nouvelle shield v0.4b! Cette version intègre comme pour la version précédente: - 16 entrées/sorties numériques - 10 entrées analogiques - 12 sorties pwm pour servomoteurs
La nouvelle version intègre maintenant: - un connecteur i2c aditionnelle pour le branchement d'un écran LCD ou d'un autre module i2c. - un ampli audio 2x3w intégré.
Le système d'exploitation raspbian 6 passe également à la version raspbian 7, intégrant toutes les nouveautées qui s'y rapportent.
En ce qui concerne les fonctions du robot, notre api s'est bien garnis. Voici la liste des fonctions actuellement opérationnelles:
# loading gpio_mcp module api['gpio_mcp.config'] = gpio_mcp.config # gpio_mcp.config, int(pin), int(mode): pin between 0 and 15, mode = 0 -> ouput, mode = 1 -> input, return pin or -1 if error api['gpio_mcp.isInput'] = gpio_mcp.isInput # gpio_mcp.isInput, int(pin), return 1 if true, 0 if false, -1 if error api['gpio_mcp.isOutput'] = gpio_mcp.isOutput # gpio_mcp.isOutput, int(pin), return 1 if true, 0 if false, -1 if error api['gpio_mcp.pullup'] = gpio_mcp.pullup # gpio_mcp.pullup, int(pin) between 0 and 15, int(enable), enable = 0 -> set as output, enable = 1 -> set as input, return 1 if success, 0 if error api['gpio_mcp.input'] = gpio_mcp.input # gpio_mcp.input, int(pin) between 0 and 15, return int(value) if success, -1 if error api['gpio_mcp.output'] = gpio_mcp.output # gpio_mcp.output, int(pin) between 0 and 15, int(value), boolean(debug), value = 0 -> set LOW, value = 1 -> set HIGH, debug = 1 -> auto set to output if needed, return 1 if success, 0 if error api['gpio_mcp.inputAll'] = gpio_mcp.inputAll # gpio_mcp.inputAll, return buffer api['gpio_mcp.outputAll'] = gpio_mcp.outputAll # gpio_mcp.outputAll, return 1 if success, 0 if error api['gpio_mcp.readSonar'] = gpio_mcp.readSonar # gpio_mcp.readSonar, return distance if success, -1 if error
# loading gpio_servopro module api['gpio_servopro.enable'] = gpio_servopro.enable # gpio_servopro.enable, int(value): value = 0 -> all off, value = 1 -> all on, return 1 if sucess, -1 if error api['gpio_servopro.mode'] = gpio_servopro.mode # gpio_servopro.mode, int(value): 0 = mode standard, rotate through approx 90 degrees, 1 = mode extended, rotate through almost 180 degrees, return 1 if sucess, -1 if error api['gpio_servopro.set'] = gpio_servopro.set # gpio_servopro.set, int(pin), int(value): pin between 0 and 11, value between 0 and 254, return 1 if sucess, -1 if error api['gpio_servopro.moteur'] = gpio_servopro.moteur # gpio_servopro.set, int(pin1), int(value1), int(pin2), int(value2): pin1 and pin2 between 0 and 11, value1 and value2 between 0 and 255, return 1 if sucess, -1 if error api['gpio_servopro.read'] = gpio_servopro.read # gpio_servopro.read, int(pin): pin between 0 and 11, return value between 0 and 254 or -1 if error api['gpio_servopro.readAll'] = gpio_servopro.readAll # gpio_servopro.readAll, return array if success, -1 if error api['gpio_servopro.speed'] = gpio_servopro.speed # gpio_servopro.set, int(pin), int(value): pin between 0 and 11, value between 0 and 250, return 1 if sucess, 0 if error
# loading gpio_adc module api['gpio_adc.read'] = gpio_adc.read # gpio_adc.read, int(pin): pin between 0 and 9, return a value between 0 and 255 or -1 if error api['gpio_adc.readAll'] = gpio_adc.readAll # gpio_adc.readAll, return array of all pin value or -1 if error
# loading sound module api['sound.setOutput'] = sound.setOutput # sound.SetOutput, int(output) = 0 -> autodetect ouput audio, not working at all, int(output) = 1 -> force analog ouput audio, int(output) = 2 -> force hdmi ouput audio, return 1 if success, 0 if error api['sound.setMute'] = sound.setMute # sound.setMute, int(value) between 0 and 1, return 1 if success, 0 if error api['sound.setVolume'] = sound.setVolume # sound.setVolume, int(percent) between 0 and 100, return 1 if success, 0 if error api['sound.getVolume'] = sound.getVolume
# loading tts module api['tts.setRate'] = tts.setRate api['tts.setVoice'] = tts.setVoice api['tts.setVolume'] = tts.setVolume api['tts.getRate'] = tts.getRate api['tts.getVoice'] = tts.getVoice api['tts.getVoices'] = tts.getVoices api['tts.getVolume'] = tts.getVolume api['tts.speak'] = tts.speak api['tts.isSpeaking'] = tts.isSpeaking
# loading mediaplayer module api['mediaplayer.sendCommand'] = mediaplayer.sendCommand api['mediaplayer.play'] = mediaplayer.play api['mediaplayer.stop'] = mediaplayer.stop api['mediaplayer.togglePause'] = mediaplayer.togglePause api['mediaplayer.getPosition'] = mediaplayer.getPosition api['mediaplayer.getStrPosition'] = mediaplayer.getStrPosition api['mediaplayer.isRunning'] = mediaplayer.isRunning api['mediaplayer.getVolume'] = mediaplayer.getVolume api['mediaplayer.setVolumeUp'] = mediaplayer.setVolumeUp api['mediaplayer.setVolumeDown'] = mediaplayer.setVolumeDown api['mediaplayer.seekForward30'] = mediaplayer.seekForward30 api['mediaplayer.seekBack30'] = mediaplayer.seekBack30
# loading mail module api['mail.accountList'] = mail.accountList api['mail.imapGetFolders'] = mail.imapGetFolders api['mail.imapUnreadCount'] = mail.imapUnreadCount api['mail.imapUnreadGetSubjects'] = mail.imapUnreadGetSubjects
# loading i2c_lcd module api['lcd.writeBuffer'] = lcd.writeBuffer # lcd.writeBuffer(str(string)): clear display and write string, return 1 if success, , -1 if error, use '\n' for new line api['lcd.clear'] = lcd.clear # lcd.clear(): clear display, return 1 if success, , -1 if error api['lcd.home'] = lcd.home # lcd.home(): return to home position, return 1 if success, , -1 if error api['lcd.command'] = lcd.command # lcd.command(data): send custom command, return 1 if success, , -1 if error api['lcd.setPosition'] = lcd.setPosition # lcd.setPosition(int(line), int(pos)): return 1 if success, , -1 if error api['lcd.writeChar'] = lcd.writeChar # lcd.writeChar(str(char)): write char to display, return 1 if success, , -1 if error api['lcd.writeString'] = lcd.writeString # lcd.writeString(str(string)): write string to display, return 1 if success, , -1 if error api['lcd.backLightOn'] = lcd.backLightOn # lcd.backLightOn(): set backLight on, return 1 if success, , -1 if error api['lcd.backLightOff'] = lcd.backLightOff # lcd.backLightOff(): set backLight off, return 1 if success, , -1 if error api['lcd.cursorOn'] = lcd.cursorOn # lcd.cursorOn(): set cursor on, return 1 if success, , -1 if error api['lcd.cursorOff'] = lcd.cursorOff # lcd.cursorOff(): set cursor off, return 1 if success, , -1 if error
# loading custom command api['system.shareAutoMount'] = system.shareAutoMount api['system.shareAutoUmount'] = system.shareAutoUmount api['system.shellExecute'] = system.shellExecute api['system.shutdown'] = system.shutdown api['system.restart'] = system.restart
Cela fait un gros volume de commandes possible, et nous continuons sans cesse d'en ajouter.
|