Forwarded from C & micro & fpga
اسکریپت Lua برای سنسور PIR
PIRpin = 1
LEDpin = 4
gpio.mode(PIRpin, gpio.INPUT)
gpio.mode(LEDpin, gpio.OUTPUT)
while true do
gpio.write(LEDpin, gpio.read(PIRpin))
tmr.delay(10000)
end
🆔 @micropython_iot
PIRpin = 1
LEDpin = 4
gpio.mode(PIRpin, gpio.INPUT)
gpio.mode(LEDpin, gpio.OUTPUT)
while true do
gpio.write(LEDpin, gpio.read(PIRpin))
tmr.delay(10000)
end
🆔 @micropython_iot
Forwarded from 🐍 Python & Raspberry 🐍 (F.Naserizadeh)
Forwarded from Micropython & IOT (F.Naserizadeh)
micropython.pdf
1.2 MB
❇️ اسکریپت Lua سمت فرستنده
count = 0
-- set uart0 with 1200 baud rate, 8 databits, no pariy, 1 stop bit with echo
uart.setup(0,1200,8,0,1,1)
while true do -- continuous send count
print(count)
count = count + 1
tmr.delay(1000000)
end
❇️ اسکریپت Lua سمت گیرنده
-- set uart0 with 1200 baud rate, 8 databits, no pariy, 1 stop bit with echo
uart.setup(0,1200,8,0,1,1)
--print received data
uart.on("data", "\n", function(data) print("receive from uart:", data) end, 0)
🔰 @micropython_iot
count = 0
-- set uart0 with 1200 baud rate, 8 databits, no pariy, 1 stop bit with echo
uart.setup(0,1200,8,0,1,1)
while true do -- continuous send count
print(count)
count = count + 1
tmr.delay(1000000)
end
❇️ اسکریپت Lua سمت گیرنده
-- set uart0 with 1200 baud rate, 8 databits, no pariy, 1 stop bit with echo
uart.setup(0,1200,8,0,1,1)
--print received data
uart.on("data", "\n", function(data) print("receive from uart:", data) end, 0)
🔰 @micropython_iot
دانلود آخرین ورژن فریمور استاندارد برای pyboard V1.0
http://micropython.org/resources/firmware/pybv10-20180809-v1.9.4-443-gc1c798fbc.dfu
🆔 @micropython_iot
http://micropython.org/resources/firmware/pybv10-20180809-v1.9.4-443-gc1c798fbc.dfu
🆔 @micropython_iot
دانلود آخرین ورژن فریمور استاندارد برای pyboard V1.1
http://micropython.org/resources/firmware/pybv11-20180809-v1.9.4-443-gc1c798fbc.dfu
🆔 @micropython_iot
http://micropython.org/resources/firmware/pybv11-20180809-v1.9.4-443-gc1c798fbc.dfu
🆔 @micropython_iot
Using Adafruit's motor shield V2 with a pyboard
http://wdi.supelec.fr/boulanger/MicroPython/AdafruitMotorShield
🔰 @micropython_iot
http://wdi.supelec.fr/boulanger/MicroPython/AdafruitMotorShield
🔰 @micropython_iot
REPL driven development on pyboard
https://nvbn.github.io/2015/04/28/pyboard-bt-repl/
🔰 @raspberry_python
https://nvbn.github.io/2015/04/28/pyboard-bt-repl/
🔰 @raspberry_python
UTILISER UN PONT-H L293D AVEC MICROPYTHON PYBOARD
https://arduino103.blogspot.com/2016/01/utiliser-un-pont-h-l293d-avec.html
🔰 @micropython_iot
https://arduino103.blogspot.com/2016/01/utiliser-un-pont-h-l293d-avec.html
🔰 @micropython_iot