#microcontrollers
1 messages · Page 19 of 1
Nice
i was able to play krunker on my pi
that sounds like a pain
Kind of
nah it ran at 30 fps
unmodified settings
but it did have some lag spikes here and there yikes
O_O I got my Arty Z7 dev board interfaced with my robot. Now for trying to get an AI core working in Verilog...
Python SDK even
lol
@hallow igloo I don't think is quite microcontrollers related. If you grab a help channel I can help you out though.
hello i'm new sorry if i'm the wrong chat, i'm having a problem with my arduino mega it is receiving several strings through the serial by a python program but my python program when it sends several strings it freezes but when i switch to an arduino nano it works perfect without problems anyone knows what can be?
so i have this school project to see the effects of florescent lights on plants
so i was thinking that i could use relays to control the lamp and turn it on and off
but ive never done it before
so if anyone has any advice on any materials or ways to do it
id really appreciate it
@hallow igloo Sorry if this is a bit late, but one thing that immediately came to mind when you mentioned this was photoresistors. They're basically resistors whose resistance is proportional to how much light is shined down upon the resistor. For instance, if you shine a light directly onto the resistor, it'll demonstrate a ton of resistance, but if you're using the photoresistor in a pitch-black room, it'll show virtually no resistance at all.
yea but im trying to control the lights to turn on and off at set times
by controlling the power
i was just wondering if anyone knew like what to buy for that
like a relay or smth
I'm guessing it uses power directly from a wall socket or something, then? I think I misunderstood the question, then. Sorry.
I'm thinking within the realm of Arduino, where you could provide milliamps of current to something at the very most.
im pretty sure a relay allows for it though
but im not sure
I'm not the most well-versed with using relays, but I know that there's a delay() command with using Arduino that allows you to specify how long you want to delay some lines of code before you move onto the next lines of code.
You probably want to take the advice of someone better with microcontrollers than me before you go out and purchase something, though.
@quasi fable Make sure you are using the right baud rate, it should be the same on both, your python code and the arduino
@hallow igloo The easiest way is using a relay module, you can use a simple relay but it's a little more work, the relay module is pretty straightforward to use, you only need to send high and low values to the input pin of the relay
It also must be connected to the 5 volts and the ground of the arduino.
Just like this
And to turn it down you only send low and high values to the input pin
i found this very useful when i used to do arduino
Seamless circuit design for your project. circuito.io is an online tool for designing electronic circuits. Select your component combination and instantly get a detailed list of parts, a step-by-step wiring guide and custom test code for your circuit.
hello i'm new sorry if i'm the wrong chat, i'm having a problem with my arduino mega it is receiving several strings through the serial by a python program but my python program when it sends several strings it freezes but when i switch to an arduino nano it works perfect without problems anyone knows what can be?
@quasi fable What is the default baud rate for each one?
hello everybody
i have a microprocessor 8086
someone knows how to connect a screen at the microprocessor ?
help me if u can please
i don't arrive to find a tutorial to connect my screen at my microprocessor, it s a real pain !
thank u
pls
I don't think you can just do that, I'm pretty sure you need to build a very basic computer to start doing anything. I suggest you to see this YouTube chanel, it might be helpful for you purposes
How can I get my ESP32 to sign in to my WiFi and appear with a device name? (Machine name being like the name you set in windows, etc., usually is laptop-#### or desktop-#####)
That way, I could host a mini webserver on it and go to https://myESP32/webpage instead of https://192.168.###.##/webpage
hello everybody
i have a microprocessor 8086
someone knows how to connect a screen at the microprocessor ?
@hallow igloo this is really hard, you’d need some sort of graphic interface, the 8086 isn’t fast enough
How can I get my ESP32 to sign in to my WiFi and appear with a device name? (Machine name being like the name you set in windows, etc., usually is laptop-#### or desktop-#####)
@opal furnace you should see in your router setting for a local DNS settings, where you can assign a specific address to your esp32
I do not have access to the router settings because we rent it. Also, I want to set a name, not IP address.
Then you will have to mess with DNS and that kind of stuff
m
good book for learn microcontroller.
I found something in the micropython documentation about changing the device name when you connect it to WiFi. This makes sense to me because I can change my windows machine's device name without touching the router, so in theory other devices can do it as well.
plz answere.
I found something in the micropython documentation about changing the device name when you connect it to WiFi. This makes sense to me because I can change my windows machine's device name without touching the router, so in theory other devices can do it as well.
@opal furnace That probably only changes the hostname, you still need to set up a DNS to point that URL to your IP
I think my router includes hostnames in its DNS, because my laptop is contactable from other devices using its hostname.
From a browser using an http:// URL?
@zealous island OpenSSH finds it. I run ssh user@myLaptop20 and it connects just fine. I need to get a web server running on the laptop to see if http/https can find it.
Try running a web server, I wont be surprised if that works, it's searching for that domain in your local network.
ok
What exactly are you trying to do with the ESP32?
mini webserver for control of various items, haven't exactly decided yet. I figured I'd best get the contact method working before I built anything.
If you want to do something like IOT, I recommend you to learn about MQTT
MQTT?
ok
Read about it
thats really cool
will it work in a browser or does the client need special software on their device?
There is plenty of apps that work for using it
ok
Search on Google or an appstore, the main thing here is the broker
You can get a raspberry and attach a lot of ESP32 or other device to it
@quasi fable What is the default baud rate for each one?
@hazy schooner i found the problem thanks
ASK AN ENGINEER 11/4/2020 LIVE! https://youtu.be/oG_9oX_iozE
Visit the Adafruit shop online - http://www.adafruit.com
LIVE CHAT IS HERE! http://adafru.it/discord
Adafruit on Instagram: https://www.instagram.com/adafruit
Subscribe to Adafruit on YouTube: http://adafru.it/subscribe
New tutoria...
🤔
Hi guys, i need help for some aspect of an project
do you think i can controll this specific rc car with an raspberry pi ?
https://www.amazon.fr/dp/B08F1Z6TX5/ref=cm_sw_r_cp_apa_i_Q1jPFbRA6N4S4?_encoding=UTF8&psc=1
there are already some project existing with different rc car but i failed to know if this on can be feasible and if yes, with wich specifi servo-motor if i need to purchase one
thanks
@split owl it looks like it already has the motor and stuff in it. If you are looking to replace the controller on it with an RPi, you will at least need an appropriate motor driver for the main drive motor (probably a bldc). If the steering motor is another dc or bldc, you will need another motor driver. If it is a servo, you should be able to talk to it like any other servo.
thanks for your awner @opal furnace !
Yes, the motor it's an bldc.
So if iv'e understand well, the only thing i need it's to mount my raspberry pi on it, and find an motor driver for communicate with by plugin it on the card ?
so for exemple
https://www.amazon.fr/dp/B07K6QR1ZP/ref=cm_sw_r_cp_apa_i_enpPFb0Y3KP84?_encoding=UTF8&psc=1
i can plug the steering and the motor using GPIO pins on this motor driver and controll it thruw the rpi ?
i'm sorry for asking this type of questions, but i want to be sure about that, beeing an novice for project involve robotics with rpi :x
@split owl connect the RPi GPIO pins to the motor controller, then connect the motor controller to the motor. You will need to figure out power, though.
and I can't really help with that
hey guys a newbie here. I have stm32f4 discovery board. I have to enable the clock for each gpio pinRCC_AHB1PeriphClockCmd(RCC_AHB1Periph_GPIOD | RCC_AHB1Periph_GPIOA, ENABLE);I don't quite understand the clock concept even though I sort of understand the fetch decode execute mechanism in cpus. Should I just skip it altogether and say it's not a big deal I'll just have to enable the clock for the peripheral I want to use and move on?
okay @opal furnace thanks you a lot
Hey guys, so i just got an ESP32 today, has anyone here worked with micropyton and ESP32?
Yes! @deft jolt what board did you get?
Hey guys, so i just got an ESP32 today, has anyone here worked with micropyton and ESP32?
@deft jolt i have sme experience with micropy and esp8266 tho...
what kind of microcontrollers would be useful to a beginner in python?
pyboard is a good one
there are other micropython compatible boards but that's the one i'm familiar with
(that's if you just want to use python)
if you're happy to try out other languages then i'd also recommend arduino and playing around with a raspberry pi
so this channel is for asking about hardware programming (aka arduino) right?
If you are running python on it somehow, then yes
Anyone have experience with the python RTLSDR wrapper with asyncio
finding an uncomplicated example on github is tough
what kind of microcontrollers would be useful to a beginner in python?
@old mountain raspberry pi, or esp32/8266 running micropy
raspberry pi seems like the best choice imo...
micropy is limited
for sure. you can control the output pins on a breadboard
i suggest you get the electronics kit that teaches you about the signals comming out the pins
raspberry pi seems like the best choice imo...
I would suggest a MicroPython board or better an Arduino, it is cheaper, a Raspberry Pi is overpowered when compared to a microcontroller
hey there!
Is this the topic where I can ask question about micropython? Or this topic is mostly focus on rpi and "full" python?
cause I need some help with mqtt over wss. One of the customer requres that to connect mqtt over wss, and I don't know where to start, is it even possible?
If it runs python, we got you covered
As for for what wss is and implementing it for micropython, no clue
WE ARE LIVE! SHOW AND TELL! https://youtu.be/B2uQ5SHIxfw
hello
I am a young Brazilian student of 14 years old, I am in love with arduino and much more with programming, sorry for my english, because I am using google translator, I am making the project of an iron man jarvis, does anyone already have the commands ready?
I’m very stupid when it comes to programming, I’m just starting out, if someone has some tips it would help me a lot
@golden tendon are you starting with python?
yes I am
@golden tendon do you know the basics?
+or-
@golden tendon what?
I know very little
How much exactly?
"STM32F407G-DISC1 would require extra UART to USB dongle or flying wires connection to make a virtual com port"
do I need something like this for a virtual com port? I don't exactly get it sorry I am dumb
do you guys have any suggestions for someone who wants to get started with advanced robotics using python. I already know the basics of gpiozero. Are there any better libraries?
How much exactly?
@hallow igloo very little indeed
do you guys have any suggestions for someone who wants to get started with advanced robotics using python. I already know the basics of gpiozero. Are there any better libraries?
@lucid elm bro and the next one I know the language of arduino so much, and the rest of the robot itself is pretty good, if you want help with a project or if you have any questions about the circuit I can help you, then just call me in private
@golden tendon learn the basics from youtube videos. Then learn how to work with libraries. There is some code for A.I on Github but I don't think it will be that helpful if you don't understand it.
Does anyone know any good python libraries for the raspberry pi for text to speech? I’ve tried espeak but It seemed to be not documented to the best extent (from what I’ve found)
"STM32F407G-DISC1 would require extra UART to USB dongle or flying wires connection to make a virtual com port"
do I need something like this for a virtual com port? I don't exactly get it sorry I am dumb
@dark hornet Can I Use this UART interface to connect, for example, with certain televisions, if it have this connection?
Is it possible to create a small computer similar to the micro controllers using python?
Im not 100% sure that you meen that. But im think you looking for somthing similar to an "pyboard".
adafruit has a discord user? that's pretty cool they seem like a quality, yet pricey option for makers
Define small computer. You need a use case if you're going to work with microcontrollers. If you expect to have a web browser and desktop env off an esp32 you will not find yourself happy. If you want to handle requests or run something like mqtt to make your life happier, hell yeah
I have written mqtt tutorials for the ESP32 for Adafruit. I will soon make some for the ESP32-S2.
in python or c++? if you don't mind me asking
doesn't have to be in python to be here just curious
I would be happy to peruse your work sometime tell you how it goes
I know the ESP32 has 512kiB of RAM onboard and that is often pretty restrictive. Let's say I have a microcontroller for which there is already an existing port of uPython (working on one, designing hardware first tho). How much RAM would be needed to do most things without too many restrictions? 1MiB?
@hallow igloo in Python. I have a large collection of them on my GitHub if you would like to see.
@opal furnace I do not have a direct answer for this off the top of my head however I have a tutorial on my GitHub where I teach how to freeze all of your py modules and then disable the REPL for more advanced projects. I am working on a local DEFCON chapter badge with MicroPython and it is quite advanced. I have not had any issues with memory at all.
hell yeah link it @craggy ember or you can just shoot me the link in dms
I will send a DM @hallow igloo.
I little something I did for micro:bit https://www.youtube.com/watch?v=b4V13Lvk_jM&feature=youtu.be
A comprehensive and FREE Online Python Development course FOR KIDS utilizing an official BBC micro:bit Development Board and later an Expressif ESP32 Development Board going step-by-step into the world of Python for microcontrollers.
thanks @craggy ember
Most welcome tell me what you think.
anyone has an example python code with the MCP23S17 for me to learn
oops, i was thinking imagine us all one day if we ruin to do a mega sksks project. unfortunately it is impossible because I am from Brazil, but it would be incredible
DESK OF LADYADA - Machine Learning Sunday with BrainCraft HAT + Coral Module https://youtu.be/4ByslMN5npQ
This Sunday night we have a little STEMMA update, but we've done a lot more with our new MagTag board and also a nifty ML accelerator from Google that can be pick and placed. Our AMG8833 is getting a little re-spin to be QT-friendly. We made an EagleCAD object for the Coral - ...
can someone help me with some ideas on how to create a netlist for this circuit ->
so far I have written a code which generate a netlist.txt file for me with this content
a2 a21 a22 a2o
o1 o11 o12 o1o
n1 n11 n1o
xo1 xo11 xo12 xo1o
Is there a better way to do this? I have to actually make this circuit work, by takin inputs from user (for input nodes) and generate output (for output nodes)
Please tag me to notify 🙏
Was wondering . Does anyone have a good place to find info on pymkr coding (expansion board) and how to work with sensors?
you could help me i wanted to do something incredible my work office, preferably with arduino, if you have please send me
@zealous island thx a lot, you show me the channel Ben Eater and i started to create my computer thanks to this channel
thank u
@hallow igloo Wow, nice job, I'm glad it was useful to you
WE ARE LIVE! SHOW AND TELL! https://youtu.be/YT5kr7X5H0U
WE ARE LIVE! ASK AN ENGINEER! https://youtu.be/byZ3pWXf_2I
Visit the Adafruit shop online - http://www.adafruit.com
LIVE CHAT IS HERE! http://adafru.it/discord
Adafruit on Instagram: https://www.instagram.com/adafruit
Subscribe to Adafruit on YouTube: http://adafru.it/subscribe
New tutoria...
@zealous island it s really thanks to u. If u xas not here to help me, i think that i didn t continue the project . again : THANK YOUUUUUU
u show me the Channel Ben Eater and it s so ggod bro
if people want to start the assembly language go on the channel Ben Eater and make his project
the project is make a microprocessor 6502
it s so good
and u have this for the project : https://eater.net/6502
I'm working on a little project for mt Raspberry Pi, does anyone know of a library that can interact with gpsd? The only one I see is for Python 2,7, but I'm on 3
I really dont want to have to parse the text myself
i dont remember, what is gpsd
daemon that looks after the ouput of a GPS reciever
I could get it direct from the serial device, but its just a mess of text I'd have to parse
whaat
wait my friend
aaaaand, what do u want to do
no it s good finnaly i understand
yeeee rappi
i will try to help u
i don t know if i will ariive but i will try
i found something for u
@next mortar here : http://www.deanandara.com/Argonaut/Sensors/Gps/GettingData.html
interesting
the most is here i think : https://www.youtube.com/watch?v=I7fyFb7gNEQ
Install serial communication in python for raspberry pi http://goo.gl/K23SYw
gl @next mortar
is it good for u @next mortar ?
Sorry was AFK. That bit I have done, I can already connect to the GPS reciever, im after something that can parse the NMEA sentences for me
I may have to do that myself though
Anybody have some cool code involving a piezo speaker and micro:bit?
thanks to @zealous island :
@hallow igloo OMG KSKSKS
I AM PUTTING IN MY ROOM A SYSTEM IN THE DOOR THAT ASKS FOR A PASSWORD, WHEN I WENT TO PASS TO THE ARDUINO HAD THIS ERROR, WHAT CAN I DO? CAN SOMEONE HELP ME?
you want char senha[]
unfortunately arduino's cpp will automatically cast char array to char in some circumstances
which is just
lunacy
LIKE THIS?
char* senha[] = "text"
yeah that
ok i think char *senha[] = "text" makes more sense
and char *(senha[]) = "text" makes it clearer whats going on
but is overdoing it a bit imo
Fun project I build that I though I would share. Is a python GUI(pyqt5) run on raspberry using opencv with a raspberry pi camera module
Let me know if anyone has ideas or suggestions on changes or improvements that think would be fun to see
👍
maybe smaller/smoother steps on the camera? looks great tho
Fun project I build that I though I would share. Is a python GUI(pyqt5) run on raspberry using opencv with a raspberry pi camera module
@hazy schooner what are you controlling the Camera with
With Arduino?
And what language did you use for coding the microprocessor or Arduino you used python or Arduino?
@hazy schooner
hello
@hallow igloo it’s all in python on a raspberry pi
Hello everybody! I need your help. Does anyone have an idea how I can recognize where someone is in the room?
@hazy schooner can you show me how?
i really want to do arduino with python
and do more on opencv
@hallow igloo I can help some with open cv I haven’t really done much with arduino in years so I can’t help much with that
not arduino exactly, but if you're just getting started, check out something like https://www.adafruit.com/product/4028?gclid=CjwKCAiA7939BRBMEiwA-hX5J6XnqgIREeU6N6gWvd5O3lb4xiCoY2xRo0etc9qnztArPthQ9Ylh-xoCeWUQAvD_BwE
but for opencv, you want something more like a raspberry pi than like an arduino
Thanks
but for opencv, you want something more like a raspberry pi than like an arduino
@shy zenith I will do it on my computer
hi
Is there a micropython discord
Thermal goggles
@hallow igloo no
Hmm
You can get help for Circuitpython and Micropython as well as boards related to it here
Motion sensors or thermal sensors
laser arrays as grid ,...
wowee was getting my rpi to act as a bluetooth speaker a headache
next on the itinerary is shoving sensors onto it so I can see the temperature and air pressure
WE ARE LIVE! SHOW AND TELL! https://youtu.be/-sQtlMGRXJI
Ok? 
ASK AN ENGINEER 11/25/2020 LIVE! https://youtu.be/AqBdFKDOzb8
Visit the Adafruit shop online - http://www.adafruit.com
LIVE CHAT IS HERE! http://adafru.it/discord
Adafruit on Instagram: https://www.instagram.com/adafruit
Subscribe to Adafruit on YouTube: http://adafru.it/subscribe
New tutorials on the Adafruit Learning System: http://learn.adafruit.com/
-------...

Anyone here have any good tutorials on printing to an LED with micropython?
Ya boy trying to flash a clock to this esp8266
It's already a watch but the clock is horribly out of sync. Too slow
@hallow igloo What kind of led are you talking about? A 7 segment display, a led matrix or character LCD?
Well I searched a bit and found these that can work https://github.com/mcauser/micropython-tm1637
https://learn.adafruit.com/micropython-hardware-led-backpacks-and-featherwings/micropython
But if you want to know how these things work and how to use them you can check out these videos that I personally found very interesting, they don't show any code at all but once you understand you can make them work on any dev board with ease: https://youtu.be/hZRL8luuPb8
https://youtu.be/7zffjsXqATg
https://youtu.be/Degt4HUzWXY
Support this channel on Patreon
https://www.patreon.com/8bitguy1
Visit my website:
www.the8bitguy.com
In this episode I take a look at Character LCD screens and how to control them.
Building a combinational logic circuit to decode 8 bits and display a 3-digit decimal number on 7-segment displays is complex. In this video, I build something much simpler—a circuit that decodes 4 bits to a one-digit hexadecimal display—and even that's pretty complicated. In future videos, we'll look at much easier ways of doing this, which we'...
$2 for 10 PCBs & 24 Hour Quick Turn: https://jlcpcb.com
Previous video: https://youtu.be/NQIiiRwILv4
Multiplex video: https://youtu.be/uQMUPhyoXoE
Schmitt Trigger video: https://youtu.be/woTiKij76cA
Arduino Timer video: https://youtu.be/IdL0_ZJ7V2s
Facebook: https://www.facebook.com/greatscottlab
Twitter: https://twitter.com/GreatScottLab
Suppor...
I can send you a picture when I get home
I think it might be a character LED not sure
I can send you a link to the site I bought it off of. It was made to use a software called deauther but I don't want any of that I'm just planning to reflash it into a cool watch
Also, micropython supports async????? Nutty
It's a SH1106 OLED if that helps answer @zealous island
any of you use micropython on calculators?
@hallow igloo It works more like a character LCD, have you tried this https://github.com/robert-hh/SH1106
I haven't tried anything yet I'm hoping to mess with it tonight
But I did see this
Idk how I'll make a clock work better but I think it'd be fun to do with micropython
This might seem like a silly question but what are some alternative ways to flash to a microcontroller? I was using an IDE called UpyCraft and while it was a decent editor it was kinda buggy. I would like to just write micropython code and just send it with command line or something
Of course that editor worked just fine for flashing code I'm just lazy
[Not directly about python]
Looking for suggestions for a cheap micropython board (no need for a lot of processing, or GPIO even) that has PoE.
Anyone come across these kind of little dudes?
Hey guys, Do any of you know about a good module for designing vapes?
Designing what?
yes
I wouldn't use python for a vape device if thats what you mean. its too big
I
anyone well familiar with micropython usocket module? I am refactoring some code from a 3rd party, and I found a call to usocket.write(data, int) - which is not documented. Anyone know what it does?
anyone worked with Mosquitto before and can help me?
http://sol.gfxile.net/dontask.html @long rover
ty
guess cause it's not implemented 🙂 https://github.com/micropython/micropython-lib/blob/master/socket/socket.py
is there a way to get the dhcp leases issued when in AP_IF mode?
WE ARE LIVE! Desk of Ladyada! https://youtu.be/sIiG97f3VbQ
It was an extra long weekend so we got in a whole bunch o' new STEMMA QT designs. Even wrote a few driver libraries to boot! CO2, humidity, temperature and UV sensors all made the cut, come by and check em out. We also worked on two variants of Cobbler 400's (add-ons for Pi400 to let you plug in a HAT or bonnet), Google Coral TPU chips for AI ac...
That code is just extension of usocket module, and doesn't even have write defined. I found out it was the number of bytes of the data to write through trial and error
ah sure i wasnt reading right
hmm now that i did edit the link 5x it should be right 🙂
can anyone help me with this?
@long rover you need to figure why the connection attempt is timing out. i guess you are mismatching sth. do not use sudo without reason
i solved it thanks
these are commonly used to package electronic components.. got some from banggood
it'd be more compact with just tape but it's to be put on 🐶
readme sparse for now
@long rover http://sol.gfxile.net/dontask.html
this channel is for microcontrollers.. maybe people on a channel more suitable for ye question can help. like #game-development
some long time ago i read on try..except...finally phrases being costly in terms of performance... afaik this got less of an issue on cpython ... but how about micropython?
Hello, I will start my learning on micropython
I have many question
As I am new to micropython, I would like to know if I could replace the functions of an arduino mega by a pyboard to control a robotic project (DC motor control via PWM) and use my feather radio for remote control?
you can go with any supported microcontroller in the beginning
I never try python, but I have look many video and I love all feature its possible on this (sorry for my english)
I work on arduino since many years on my projects 🙂
its easier to learn python on a desktop machine first
the basics
Thank you
Actualy I use mega 2560 for control all of this
You think after long learning its possible with micropython 🙂
Thank you I will look that
Thank you jitter for all
Hello, anyone has experience in Assembly Programming (AVR Studio)?
@opal saffron http://sol.gfxile.net/dontask.html
didn't really find anything related to Assembly language
The Atmel AVR instruction set is the machine language for the Atmel AVR, a modified Harvard architecture 8-bit RISC single chip microcontroller which was developed by Atmel in 1996. The AVR was one of the first microcontroller families to use on-chip flash memory for program storage.
what is related?
WE ARE LIVE! SHOW AND TELL! https://youtu.be/9In-jgtXANY
WE ARE LIVE! ASK AN ENGINEER! https://youtu.be/NYNgodCe7P0
ASK AN ENGINEER 12/2/2020 LIVE!
#adafruit #askanengineer #electronics
Visit the Adafruit shop online - http://www.adafruit.com
LIVE CHAT IS HERE! http://adafru.it/discord
Adafruit on Instagram: https://www.instagram.com/adafruit
Subscribe to Adafruit on YouTube: http://adafru.it/subscribe
New tuto...
can someone help me for stm32f407
i need to read a data from adc and send that data to a website
what is the question?
do ypu have any exemples.about that sending a data from stm32f407 @grim badge
To a website
dont get the website part. what do you mean?
you should be fine going with the micropython tutorials cause hardware is abstracted the stm is just faster
the port specific documentation is at https://github.com/micropython/micropython/tree/master/ports/stm32
assuming you might want to do some http requests eventually you should learn most out of https://docs.micropython.org/en/latest/esp8266/tutorial/network_tcp.html?highlight=http#http-get-request
I've had the idea of hooking up an xbox one controller so that I can use it to control things in future projects, what I'm wondering is how I should go about making it transmit the information I want. I'm not sure if I should do something like somehow get a small arduino with network connectivity in there so I can just send data over a socket or if I could somehow get the bluetooth signals that the controller already emits.
Anyone got any suggestions/ideas?
And if I did go the arduino route, anyone got any resources I could use to try make sense of the circuit boards and whatnot, since I would need to figure out which signals are coming from where
How is micropython compared to arduino?
I want to use python in arduino
Micropython mostly for IOT Projects
Arduino for robotics
Esp8266 (with micropython) and Arduino can work well for internet robotic projects
@floral spruce why not plug it in over usb and just read controller activity
would require a usb host
though
Cause wireless is cooler
And also I'm pretty sure I'll be able to just use the bluetooth signals the controller is already sending
don't think it uses bluetooth
ah some do
not sure what this is meant to illustrate
hello
hi
haven't worked with bytes in python, so this probably sounds like a dumb question but i can not get it to work. i have an I2C device which i have to write 8 bits to a memory to, all with the value of 0. shouldn't I be able to write simply 0 as the data? (im calling a function like i2c.writeto_mem(addr,register,data))
ha yes, you did
im planning to buy a esp8266 module for arduino,,, i would like to hear all of ur advices on what module i should start with... it would really help thx 😄
i have seen like a thousand different types of esp8266 and confused on what type to start with
what do you want to build?
they all have the same microcontroller on them, if you're looking at only esp8266's, so what it comes down to after that is the features and layout of the dev board
I'm a fan of the wemos d1 mini pro, which is good and cheap
but it doesn't give a huge number of gpio pins.
just some automations, i will mostly use it on controlling relays anyways
and maybe some robotics too
if you want stuff that comes with excellent tutorials and community support, check out anything from http://adafruit.com
The Adafruit Feather Huzzah is an ESP8266 board. They've also got an ESP32 variant.
realistically, when you're just getting started, pretty much anything will work equally well for you, and the best choice is just whatever is easiest to google help for 🙂
ohhhh, thx very much!
adafruit also has good support, a pi0 they sent me was completely shorted on arrival and they sent me another no questions asked
Yep, I've had similar experiences. You can definitely get things cheaper from other stores, but their support is 100% top notch.
hello, i have a project due in 3 months, where I am to build a car with an arm controllable by muscle sensors and gyroscopes, I have everything set up except for the wireless control, which I am planning to use wifi, i was planning on 434 mhz but switched over my idea to wifi, as I need to stream video. I am planning on making it completely portable, so no need to connect to a wifi beforehand, and instead have the chip itself have a wifi connection, I am planning on connecting to this, and opening a video feed through a browser, as well as controlling the car and the arm through the wifi chip.
is this possible, and if so; what wifi chip should I use?
it can be finicky, but it should work in theory probably allot of trial and error tho.
I'd probably reach for something like a raspberry pi zero for wifi video streaming, instead of a microcontroller
WE ARE LIVE! Desk of Ladyada! https://youtu.be/m0XAT8V37-g
This week has been a whirlwind, with some final pushes before the end of the year. We merged in deep sleep support for CircuitPython and ESP32-S2 which means we can do MagTag projects that only update once a day. This week's EYE on NPI is the Nordic Power Profiler 2, so we picked one up and used it to verify the power used during sleep mode. In ...
Hi, I was wondering if it would be possible to send a python script to a Numworks calculator like we do from the site but this time from a USB key connected to the Newworks with an adapter? could someone please help me? I don't know if this is the right chanel, excuse me in advance.
Hey, has anyone had this issue crop up. I am using pycharm along with the micropython plugin
Cannot find reference 'PWM' in 'machine.pyi'
does anyone know how i could do arduino dev on emacs?
@hallow igloo https://www.emacswiki.org/emacs/ArduinoSupport
Do any of you know where i could learn more/something about microcontrollers?.... please
@grim badge THANKYOU
yw
hey guys, Hope you are doing Great today, i wanted to ask about tutorials and courses related to avr Microcontroller Programming, im using Arduino from past 2-3 years and i have a really good knowledge of Electronics so Now i just really want to make something sellable that people would buy, So that's why i want to learn programming the bear microcontrollers without that arduino environment, If you know about any tutorials and courses of avr microcontroller programming just let me know and also any tips and suggestions will greatly be appreciated, Thanks
anyone that has proteus full can help me create a small circuit? the shit faculty i am at doesnt care if we have it or not and wont give us licenses
asking here i suggest to go with micropython
WE ARE LIVE! SHOW AND TELL! https://youtu.be/NHG-26ansqo
WE ARE LIVE! ASK AN ENGINEER! https://youtu.be/fvGhtAkAFBM
ASK AN ENGINEER 12/9/2020 LIVE!
#adafruit #AskAnEngineer #diy
Visit the Adafruit shop online - http://www.adafruit.com
LIVE CHAT IS HERE! http://adafru.it/discord
Adafruit on Instagram: https://www.instagram.com/adafruit
Subscribe to Adafruit on YouTube: http://adafru.it/subscribe
New tutorials on ...
is there a channel where I can find someone to hire to help me with a sound direction of arrival script in python using a 4 channel microphone array?
I don't know where you'd hire someone to do that using pure python for the whole processing stack. I've seen custom solutions that do direction arrival (or something similar--I'm not an expert in it) using an FPGA to do all the math, and then output the location and intensity values to a more traditional micro controller/computer. Though to be fair I think it as a 96(?) microphone array, so maybe python could handle 4 channels
what design specs do you need to meet?
6. No spamming or unapproved advertising, including requests for paid work. Open-source projects can be shared with others in #python-general and code reviews can be asked for in a help channel.
The rest of the discussion is fine, of course
@wheat loom Thanks for the heads up!
For clarity, in this case would reference a different discord server be ok? The adafruit and 1BitSquared servers (as far as I know) don't allow recruitment but do have people more experienced with fpga's and the like
Sorry for the late reply, but yes you can point to another server when you think it is more appropriate. For that matter, you can even point to a recruitment website/discord if you happen to know a good one! 
@wheat loom Thank you, I appreciate it!
@wheat loom can you point me to a micropython related server? this channel seems to be about anything else 🙂
@errant wigeon the adafruit... notices are "approved advertisements"? personally, i feel these are more off than a little talk on working commercially
Micropython doesn't have a discord (I'm pretty confident at least) they have a webforum where most of their conversations happen
While you're right, I was mostly referring to other servers so they could give a specific user a better grasp on direction of arrival and the hardware needed for it rather than pointing them there to hire someone. Just because those servers probably have more users who have experience in it and know the timing requirements of it
And I see, I misunderstood what you were looking for
just a place to be ontopic in regards to that, right
my opinion on two consecutive ones - its too much. its just advertisment. if i therefore mute the channel i might miss the questions..
I see where you're coming from, but handling (I'm assuming real time) direction of arrival on a 4 microphone array using micropython/circuit python/python on embedded linux seems difficult because of the timing sensitive nature of it. FPGAs on the other hand handle a lot of the upfront trigonometry. Based on that I thought of the two discords I'm aware of with a large userbase that has experience in FPGAs and felt they could be considered a resource
regardless the user hasn't returned so it's moot
still valid.
hey guyssssssssss
a little issue
ive been arduino deving on emacs
not the ide
and rn i have to use a lib
but im getting this error
i have made a file in my project dir
called Newping.h
and added the source code
but it still wont wok
can someone help
ok so i tried running my program in the arduino IDE
Arduino: 1.8.13 (Linux), Board: "Arduino Yún"
Sketch uses 4592 bytes (16%) of program storage space. Maximum is 28672 bytes.
Global variables use 185 bytes (7%) of dynamic memory, leaving 2375 bytes for local variables. Maximum is 2560 bytes.
avrdude: butterfly_recv(): programmer is not responding
avrdude: butterfly_recv(): programmer is not responding
avrdude: butterfly_recv(): programmer is not responding
avrdude: butterfly_recv(): programmer is not responding
avrdude: butterfly_recv(): programmer is not responding
Found programmer: Id = ""; type = �
Software Version = �.�; Hardware Version = �.�
avrdude: butterfly_recv(): programmer is not responding
avrdude: butterfly_recv(): programmer is not responding
avrdude: error: buffered memory access not supported. Maybe it isn't
a butterfly/AVR109 but a AVR910 device?
avrdude: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.
avrdude: butterfly_recv(): programmer is not responding
avrdude: error: programmer did not respond to command: leave prog mode
avrdude: butterfly_recv(): programmer is not responding
avrdude: error: programmer did not respond to command: exit bootloader
avrdude: error: programmer did not respond to command: exit bootloader
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
nevermidn
i fixed that
also
does anyone know how to format strings in cpp
.ino
ah newping is the ultrasonic sensor library right?
yep
and i figured it out btw
star it :D
Its like 4 lines of code
What is some good advice for someone who wants to make a microcontroller but has no experience with building electronics? Where should I look? What questions should I ask?
Honestly I don’t know I have no experience, I have a pi, I’m getting a pyboard soon but I want to build my own.
what do you actually want to build
the little black thing with metal coming out
or the board
A very simple board that can run script
I’d like to at some point along the line clearly I can’t do this yet, but, I would like to design a very very simple kernel, design my own board, and design my own lexer parser and compiler for my own shell language
ok well that's kind of a completely different goal
I just want to do it from scratch
the kernel, parser and compiler of the pyboard are unrelated to the actual hardware
if you want to make your own board you can fabricate a PCB and stick a microcontroller in
but I'm not sure you'd learn that much doing that
compared to making something more specialised
@hallow igloo it's a long writeup, and it can be a bit overwhelming, but this writeup covers a ton of what goes into the full process from assembling the board to booting a linux kernel https://jaycarlson.net/embedded-linux/
ooh nice
I know names, diodes, capacitors, and, or nand, gates bread boards and stuff like that but I’ve never built anything and I don’t know how to
Ok thanks @sudden hamlet and @errant wigeon I’ll look into this
to emphasize, this can come off as overwhelming. That's ok, it'll give you an outline of your goal and you can break it down into smaller sections and focus on being comfortable with those smaller concepts
Yep
What's a microcontroller
A tiny computer
normally has about 1000x less CPU power than a modern desktop processor
and even less RAM
It is an integrated circuit that can execute instructions stored in memory
basically, a tiny, special purpose computer that only runs a single program, rather than an operating system
all good definitions 😄
DESK OF LADYADA - Stemma Sunday & Happy Hanukkah - Prototype PCB Panel unwrapping https://youtu.be/xvFxzsEOUH8
Happy Holidays everyone! This Sunday we peeled apart a prototype pcb panel we got on Friday and started assembling the boards. We'll show off what we ordered and the two Stemma PCBs (SCD-30 and HTU-31D). We also got the sturdier prototypes of our Cobbler 400's and tossed on some Stemma connectors there...plus, is it possible to get a custom 45-d...
is there anyway i can power on my raspberry pi without a bulky phone charger
ive only heard of piwering it with a phone charger either or those big portable phone chargers
What's your goal
power it from a small battery?
if you want to use a small battery then a smaller microcontroller like an arduino is a better bet
well
people told me an arduino would most likely burn my pi
@sudden hamlet unless you have tried it before
wat
i'm not suggesting using an arduino to power a raspi
what was your plan
with the arduino
that involves burning 
well i exaggerate burn
so what do you mean by this, if not to power the raspberry pi with an arduino
replace the raspi with an arduino
don't use a raspi for something that's meant to be low power
but obviously that might be useless advice
if you're doing something which needs a linux computer
oh
i was using the raspberry pi to stream a camera
the arduino would be to move motors and a servo
because i want to make my project compact and tiny
maybe try a smaller pi , ex. Raspberry pi Zerow
yeah definently
but i probably will have to power it with a portable charger
@mystic jetty, have you looked at using a NodeMCU board? Cheap and cheerful although I am still new to microcontrollers
ive never heard about it
process modeling
is there a good way to network two raspberry pis with their bluetooth? trying to avoid wifi as the area Im planning to use them wont have it
sort of a node system where x nodes report to one master and that master node is connected to the internet
@turbid prism There are software libraries that can do it, but I don't know them off the top of my head.
Cheers!
@turbid prism Be aware that Bluetooth can get gnarly. If it's your only option, or you're really wanting a learning experience, go for it, but there are definitely simpler options.
Good luck!
Seems like you could use wireless just fine, with the one pi that's connected to the internet acting as the router and gateway for the other pis
Somebody install P4wnP1 to RPI0w?
My raspberry doesn't make AP after reboot, and doesn't connect to WiFi
WE ARE LIVE! SHOW AND TELL! https://youtu.be/dH7C1DHDnNA
Visit the Adafruit shop online - http://www.adafruit.com
LIVE CHAT IS HERE! http://adafru.it/discord
Adafruit on Instagram: https://www.instagram.com/adafruit
Subscribe to Adafruit on YouTube: http://adafru.it/subscribe
New tutorials on the Adafruit Learning System: http://learn.adafruit.com/
-------...
WE ARE LIVE! ASK AN ENGINEER! https://youtu.be/sTvOVuCc29w
ASK AN ENGINEER 12/16/2020 LIVE!
#askanengineer #adafruit #diy
Visit the Adafruit shop online - http://www.adafruit.com
LIVE CHAT IS HERE! http://adafru.it/discord
Adafruit on Instagram: https://www.instagram.com/adafruit
Subscribe to Adafruit on YouTube: http://adafru.it/subscribe
New tutorials o...
What is a microcontroller?
A small, special purpose computer that runs only a single program instead of an operating system
They're much less powerful than regular computers, but also much cheaper, and can do some interesting things that regular computers cannot, like guarantee exactly how long running certain operations will take.
Wait so say I wanted to send my self and email and I put a script into a micro controller. If I activated the micro controller would it send me an email?
@shy zenith
Sure, that's possible.
where can I get one?
Adafruit sells microcontrollers that can run a flavor of Python called CircuitPython
"a flavor"?
With lots of good beginner resources and excellent customer support.
So is there like a button that just activates the microcontroller?
Could be, or it could just be a power switch, or something.
ahh nice
A Python dialect that has a few differences than the one you're used to, but not many.
Could you possibly refer me to a good but not to high priced python microcontroller?
And thank you for the explanations too @shy zenith
Like a simple device that can run a script
https://www.adafruit.com/product/3857 for instance
There are much cheaper microcontrollers available, but that's a nice start in terms of how powerful it is. Or see the Circuit Playground, maybe
https://www.adafruit.com/product/2900 for instance.
You'd need a soldering iron to attach the male headers shown in the pictures to it. So, if you want to add a screen, you're soldering something. If you just want to use it without wiring anything up to it, no assembly is needed.
And sometimes they give you a choice between buying a product with headers already soldered on or not
ok so I can just get the M4 express and its pre setup? Great @shy zenith I think I might get that
It'll come looking exactly like it does in the first picture, with the two rows of pointy silver things that you see in the second picture in a separate bag, for you to attach if you choose, but the board is usable without them.
That one doesn't have WiFi, though
If sending emails was a specific example, you wouldn't be able to do it with that one without a separate adapter.
The usual reason for using a microcontroller is to interact with hardware in some way.
someone from the adafruit discord showed me the py portal
I think thats what im gonna get
Thank you for your time and help coldygeek
that might give you some ideas about some things you can do - and if you pick one of those projects out from the start, they'll give you ideas of what parts you'd need to buy to build it
pyportal works right out of the box
yep!
thank you man for real youve helped out alot
Ive been looking for this kinda thing for a while
just didnt know what it was called
one unique thing about microcontrollers is that they're often used with projects designed to run on battery, or run continuously, or things like that. So unlike purchasing most types of hardware, sometimes running slower, or having fewer features, or things like that are actually helpful, because they mean that it draws less power and can work longer.
there's also an adafruit discord server - the folks over there are super helpful.
yeah I joined 🤣
This is so cool and a whole new world opening before my feet.
Have you ever used an MSP430? Im supposed to be learning that this semester in school
hi, I just recently discovered "micropython" but don't really have much programming / circuit experience
I am interested in creating a watch that functions as a random number generator
^ realize this is not a rng
but it seems these watch platforms are compatible with micropython.
other than that though, I have no idea where to start?
can anyone recommend me a pyboard // kit // learning resources to start this project?
today i had my remote control circut board next to me and i wanted to play vr chat suddenly the circut board got a signal from vrchat and iknow that cause i did it 10 times and it only launches when im in vr chat (vr chat can send signals to my circut board so i wanna know what kind of signal is it so i can code it to do stuff or remote control from pc) so my question is (how can i know what signal is it ) also sorry for the long text i dont know any thing about what happend so im trying to explain ❤️
i have the same reciver as this
DESK OF LADYADA - Brainwave Sunday + HiFive RISC-V Inventor Kit https://youtu.be/g4KgXtCxytw
It's a mega-mailbag day today, as we investigate two new dev kits we got this week: one is the Next Mind EEG/brain-sensor development platform with Unity SDK. The other is the HiFive+BBC Inventor Kit which uses Tynker for Micropython & block-based programming to program a 'hand-y' RISC-V board.We also have some really pretty E-Ink sample displa...
Hi guys I'm kinda new here so I don't know the exact format of how this works but I need some help with my raspberry pi. I want to send live video feed from the pi to my pc...the pi would be the client and the pc is the server...the pi always gets stuck on this line of code and I don't know what to do:
here is the bind line on the server side:
ignore the print lines
please let me know what the error is, thanks in advance!
What is the error you get when connecting
Plus are you sure that the ip you connecting to is correct
@tawdry nova
Open command prompt do ipconfig, search for the ipv4 address and try to connect to it on the same port, if you still face issues then you will have to send the error which you getting
@hard folio I'm not getting any errors in the console on any side and I have connected the server to my PC's ip (through ipconfig) 192.168.0.19 is the pc's server ipv4 address...Actually on the client side after a while the following error comes up:
@hard folio i figured it out it was a firewall issue, thx for the help!
Ok good
@hallow igloo i think you can just use Python sockets...
@hallow igloo So Python has a socket library (check it out on Python docs) which is called socket adn they you can set one PI as the server and the other as a client and communicate between the two.
yes you can - if you really try
Huh
@hallow igloo sockets is one option (import sockets, and then read the docs)
Alternatively, you could use some higher level protocols
Or libraries rather
Such as ZeroMessageQueue. ZMQ for short. pyzmq is the package I think.
@hallow igloo Reliable and fault tolerant networked communication is really not a trivial thing to achieve.
I mean that with sockets and similar entities used for communication there are some thorny problems. Such as knowing if you are still connected?
Think about the situation:
Your device (one RasPi) wants to listen to another computer and receive data and respond. Say you have connected successfully. If the connection breaks, what happens depends on the connection method. UDP sockets just fall silent. TCP sockets should signal that the connection is dead, but they might not. If you try to receive messages from such a socket you might:
a) Encounter an exception,
b) get stuck and the code blocks for eternity,
c) get 0-message (b"")
To avoid this you must perform some sort of pinging and be ready to handle any and all of those cases above
Basically all solutions involve threading of some kind. And with threading, come race conditions and issues of asyncronicity.
I thought the same. It's doable, but fun little adventure. You probably want to use sockets.
Though then there is the issue that you probably have no public IP
What that means, your PC might not have an IP address that can be connected into from outside promptly. You PC initiates all connections itself, and then servers respond. If neither your PC nor your RasPi have public IP address, then initiating the connection is hard. There are ways around it, but they require some work.
I'm not saying this to downplay you, or to try to discourage you. I love doing small IoT-like stuff myself. Just trying to shortcut the hurdles I encountered for you.
So to find out about your IP-situation: Are you using a mobile tethering, some kind of sim-card using dongle, or Cable/fiber/adsl router?
Small embedded devices that are connected to the internet. Like lightswitches, garage doors with remote command, drones, gps trackers, etc
ok. Your router might have a "bridge mode" setting in it's settings page. Turning that on should give you a public IP address
When you have a public IP this is how the stuff works:
One python code (the "server" side) goes:
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) sock.bind("0.0.0.0",9999) #example port sock.listen(4) while True: client, address = sock.accept() do_smthng_with_client(client)
The client side goes:
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) sock.connect(("122.76.144.112,9999)) #example address. put yours here. Port must be the same as above sock.send(b"Hello there!")
So like when I got sth in my hands and pull it up 30 cm, it knows that?
well, accelerometers can sense movement (acceleration) but direction is harder.
Based on my experience barometers (air pressure sensors) are pretty sensitive and can sense the difference when they are lifted from floor to table height
Though air pressure sensors are sensitive to all changes in pressure. Such as someone opening or closing a door in the same building.
No they are not. Or if they are, they need to integrate data from several seconds to smooth out the static noise
If the only sharp movement the device will experience is the upward lifting, then accelerometers are the best bet. Though it's not easy to differentiate between sideways motion and upwards motion. Especially if the device is rotating/turning more than a few degrees max
Basically accelerometers will give you acceleration many times per second for all three directions (x,y,z). But they are direction of the sensor. And when resting on a surface, it gives a solid 1g to some direction.
@hallow igloo Care to hint what it is you are designing? Maybe I've done some boneheaded mistakes related to that and can save you the hassle ^^
Hmm. Accurate hand position might be hard to achieve. Rough motions are a lot easier though.
Well. The acceleration form hand movements is somehwere between 0.5-7 m/ss Earths gravity is about 9.81, and that will always be present there. The accelearations combined are a vector sum. So sharp downward movement will show as anomalously low acceleration to any direction. Freefall is exactly 0-vector obviously.
My point is that a function was_there_an_upward_movement(X) for some 3x200 matrix of measurements might not be straightforward at all to do.
And: It is almost certain that the highest acceleration measured at any moment is if the device is put onto a flat hard surface, unless you handle it like a glass rose.
Hmm. What's your bacgroud? Mathematically speaking.
Merry Christmas btw!
Like, are you highschooler, university physics student, or...
Okay, well if you are doing stuff with accelerometers by yourself, it's going to be pretty hardcore.
If there is, I'm not aware of it. Hacking a VR controller maybe gets around the hardware issue, but is hard too.
But you should absolutely try! The components are like 25€ total from eBay
And you will learn a lot of interesting stuff, that's guaranteed.
Interesting in the sense of "sweet hesus, is it this easy to build remote detonated b*mbs?"
well the hard part of remote detonated bombs is the chemistry
i.e. the bomb
which i am not going into 
i've always assumed you just wire the sound wire from a mobile phone to your detonator
but then i have no idea how bombs work so
Well it's a bit more complex. From my experience there are farmers who know perfectly well how to make the stuff from fertilizer, but they are not savvy with electronics
... also, Merry Christmas to all the nice folks at NSA
tbh from my alevel chem i'm pretty sure i could make a decent bomb
but i'd probably blow myself up in the process
you'll also need a board to drive it from
like arduino/pyboard/maybe raspberry pi
well like an arduino
your computer has no GPIO functionality
it can't read digital voltages from pins or anything
ah nice
that'll work
you probably communicate with the accelerometer over spi/i2c
communication protocols
to get the data into the raspberry pi/arduino
Spi and i2c are data tranfer protocols. Ways small stuff like accelerometers talk with Raspberry Pi, or other computers or microcontrollers
Well.. RasPi has certain pins dedicated to SPI. Others to I2C. When you buy a sensor module, it usually uses one of these. Then you wire pins from the sensor to the RasPi, and use the correct libraries to talk to it
So you must know the protocol to do the wiring right. Not a big deal really, but just a thing that has to be kept in mind
(Sidenote: You have some balls trying stuff like this with your level of knowledge. Keep going, you shall not regret it)
What you need is: Accelerometer, RasPi, some pin connector wires, and probably a microcontroller, since you will eventually want to work with one.
like a tiny computer
the processor on an arduino or micropython board
and arguably raspberry pi
and slightly less arguably on any computer
microcontroller are devices that can be programmed to do a specific task (such as turning on lights , doing some specific output on a specific input)
they arent computers(as they dont have an os and cannot do multitasking) but as a part of a computer
they are mostly programmed in c/c++ language
For eg Arduino atmel pic microcontrollers
rpi isnt a microcontroller its a hand held full fledged computer
Well arguably it has a microcontroller on it
Although also arguably not
But I think it's important to make clear that there isn't really any magic difference between a consumer cpu and a microcontroller
@hallow igloo : Microcontroller is a small programmable computer that (in usual meaning) does not have an operating system. They are (again, usually) programmed with C, and because of these features they are:
Very cheap, hence can be embedded absolutely everywhere; Small, fit everywhere; Consume very little power; Not very powerful performance wise, and considered quite reliable since there is less stuff going on, and thus less stuff that can go wrong.
An important characteristic of MCUs (microcontrollers) is that since there is no OS, all computations happen in quite deterministic sequence and time. This is important when controlling mechanical devices. For example motor drive units must be accurate in their job by fraction of a millisecond.
It might not be readily apparent, but in python for example, if you call time.sleep(1.0), the program does not usually sleep exactly 1.0 second, or anything particularly close to 1.0 second. It will tell the OS to put the program aside for at least 1.0 seconds, and then check back please, if the OS would be so kind. The OS might take 1.0s, 1.01s, or 23.5s if you froze it up somehow.
The jitter is quite large. I first encountered this the hard way when I tried to control more than two stepper motors with RaspberryPi. The step impulses arrived out of synch and the motor movements were horribly noisy and shaky.
With MCUs, you can craft control loops that take essentially constant time to run.
Had a few things to do today @stuck thicket -- season's greetings to all the makers out there! Have a happy healthy holiday!
Yes obviously. RTOSs mostly.
hello, can anybody tell me if we can program Arduino with python?
Awesome! Have a great holiday too! 
So im using btlejack for my own bluetooth device and I need a micro bit. Is there any easy to use ones for cheap out there?
Like already assembled I just connect it to my computer
@hallow igloo what board?
Any good tutorial videos on how to get into this, ping me please
You're better off using a pyboard imo
arduino nano..
Website companion for the book Problem Solving with Python by Peter D. Kazarinoff
@hallow igloo I am not sure the nano can run MicroPython do you have access to an ESP8266?
guyes i was thinking of getting into programming microcontrollers and stuff
can you plz suggest some resources?
thanks
you can get esp8266 pretty cheap from aliexpress. I'd recommend nodemcu v2 dev kits, as they got all you need on the board to start doing something, and they fit well on breadboards.
Also grab some ws2812b (aka neopixels) leds and ds18b20 temperature sensors to experiment with 🙂 Pretty cheap, and let you start doing something useful / fun right away
i literally know nothing about microcontroller programming 0 experience
searching resources to get into this field
yeah, those I listed are good starts. If you don't have , also pick up a breadboard or two, some resistors and dupont cables. You can have a basic starter lab for under 10 dollars. For breadboard and dupont cables, just search and you'll find. For resistors, get a starter package with sets of different ones, since you'll need a bit of varying resistors for different projects. They don't have to be exact value, so if you get a set with 5-10 of each size and 5-10 different sizes spread out a bit you'll have a good resource start
that page I linked explains what an esp8266 is, what a nodemcu board is (and it's pins), how to install micropython on it, and some examples like controlling neopixels
esp8266 is it widely available everywhere? like is it easy to find
it's a very cheap microcontroller originally meant to be used as wifi bridge for arduinos and other stuff, but it's powerful enough to run things by itself
it's a lot of chinese sellers selling it, and because of it's price and capabilities it's become a popular hobby chip
esp8266 is the chip itself, but you need power supply, serial port connection, access to the pins on it and so on. Nodemcu is a popular board that combines all that and an usb-to-serial converter, plus it can take power from usb. So with those all you need is a microusb cable 🙂
Not sure if this fits the channel, but I made a small list of items for a sort of "starter kit" for him at https://www.notion.so/terrasque/Electronics-Starter-kit-a76bdbd9115646cf927e4c7784341ba2 - maybe it can be useful for the channel. And if anyone have tips or comments, let me know
+REP
Hey I have a project and I wanted to connect to a raspberry pi and attatch a camera to watch the behavioral differences between 2 fishes, by watching movements between them. My question is where would I go to learn more about python about this? I just finished a CS101 class with python and taught me the basics of, Dicts, for loops, while loops, recursion, tuples and fileIO. My friend said I have still yet to learn about Objects, which is necessary for this project, is this true? and How should I move forward?
Very true
Object Oriented programming is a beginner level concept that youtube or coursera will teach you all about. Shouldnt take a few hours to get a good grasp and get you coding
For the project however, you'd have to define what 'behavior' is in your fish
what do you do want the camera to be watching with your fish? Is it tracking its movement pattern? speed? size growth? you'd have to be very specific
You'd be in the field of computer vision and would probably heavily rely on OpenCV
go to pyimagesearch, that guy has a ton of great lessons on how to get started with OpenCV
yes sir.
@hallow igloo great! MicroPython will work perfectly on that. There are a number of great tutorials on the web such as Null Bytes one: https://www.youtube.com/watch?v=j0hgKkwmSlw
How to Program Using MicroPython
Full Tutorial: https://nulb.app/x4vnm
Subscribe to Null Byte: https://goo.gl/J6wEnH
Kody's Twitter: https://twitter.com/KodyKinzie
Cyber Weapons Lab, Episode 134
Arduino is typically the way to go when first getting started programming microcontrollers. However, it's not very beginner-friendly. Today, on this e...
Thanks you sir for the help...
Welcome!
Else you can also look for ESP32 which is similar
https://files.readme.io/854b6cc-esp8266-esp32.png
I see them about the same price these days
I am planning on making a homemade atmega32u4 board with a usb port. The chip has a bootloader preinstalled right? Will it work with the arduino IDE if not what program can I use to load a file onto the chip?
did a little research and in some cases arduino uno works with micropython but in some it does not
plus its a little lengthy process to connect the chip
connect the chip --- how so?
WE ARE LIVE! SHOW AND TELL! https://youtu.be/z4ZEFckar60
Visit the Adafruit shop online - http://www.adafruit.com
LIVE CHAT IS HERE! http://adafru.it/discord
Adafruit on Instagram: https://www.instagram.com/adafruit
Subscribe to Adafruit on YouTube: http://adafru.it/subscribe
New tutorials on the Adafruit Learning System: http://learn.adafruit.com/
-------...
yo i’m using an esp32 microcontroller i’m wondering if there is a way to code it with python or a derivative of it
if anyone has experience with that help would be much appreciated
You can probably use microython
But you also probably shouldn't
Easier to learn cpp
interesting
alr i guess you have your answer ben
i think ill pass on this business venture
Micropython works pretty well on it
I've been using micropython on esp8266 (it's weaker predecessor) for a few years with pretty good success
nice, ty so much
@fast elm what are the differences between micro python and normal python?
It's mostly a complete python3 implementation. It's missing (or have a stripped down version of) many built in libraries, but that's mostly the extended collection. The core ones are mostly there (or have a lightweight version)
awesome
There is also a few limitations on memory allocation iirc, but nothing I've encountered in practice
im thinking i might use it in one of my projects bc i can’t code cpp for shit
ok awesome
There are a few edge case differences, documented there. Also https://docs.micropython.org/en/latest/library/index.html has a list of the lightweight modules replacing built in ones
ty, this is super useful info
No problem, and good luck with it
thanks
Any PLC programmer here?
no sorry
is working on micro controllers with python a good idea...?
or should I stick with c/c++
I'm talking about
ardiuno
btw
You're probably better off just sticking with C++ imo
for arduino atleast
Depends on what you want to do tho i guess
I use those LEDs with 5v power supply and 3.3v logic level. Had worked fine for me
For simple things, if micropython supports the board then sure, it works pretty well.
hmm
well first step would be to try to characerise them
in this case, it's a sudden sharp increase followed by a gradual increase of about half the size
followed by a sharp increase of about the size of the original
etc etc
so (with some hysterisis or smoothing) you could detect those trends and say a bar has happened when you detect all of them
@sacred roost Is there a reason you can't zero out everything with an amplitude near 8 (in the case of this graph) and then run a high pass filter on it?
the high pass filter just detects regions of rapid change, the zeroing of anything at about the value of 8 is just normalizing
yeah depends what you're actually trying to characterise i guess
it would help to know what this signal actually is
and what false positives you might encounter
DESK OF LADYADA - Happy New Year - It was a Featherfull long weekend https://youtu.be/1RC5X6qOYYE
Another long weekend meant we had lots of time to design a bunch of PCBs to kick off the new year. Lets look at some Feather ESP32-S2 designs, the new ESP32-S2 mini (which is available now), an interesting I2C keyboard controller, a nifty IO expander with LED driving capability that we're making into QT breakouts.
The Great Search - JST Connect...
as in fast fourier transforms (usually there's an implied discrete ahead of it)? yeah what's up? I'm not the best with it but it's a core for a lot of signal processing
I am having a hard time getting a set of ESP32-CAM units up and running with uPython. I grabbed firmware from https://github.com/lemariva/micropython-camera-driver and tried to install it, but to no avail. The first unit took the firmware and booted into uPython fine, and I fiddled with it for a while, but the second unit never did. I recently checked the first unit through a serial terminal and found that it has since lost the firmware. When I reset the chip after running the commands described there, I get the following message in the terminal:
ets Jun 8 2016 00:22:57
rst:0x1 (POWERON_RESET),boot:0x3 (DOWNLOAD_BOOT(UART0/UART1/SDIO_REI_REO_V2))
waiting for download
This looks like the stub that installs the firmware is still running, instead of the uPython firmware. How can I fix this?
problem solved. I needed to unjumper IO0 and GND in order to use the board after programming it.
Just to be clear. This is "microcontrollers" as in "robotics" right?
Just to be clear. This is "microcontrollers" as in "robotics" right?
microcontrollers have vast usage
its not limited to just robotics
microcontrollers are used in many devices and many stuff
WE ARE LIVE! SHOW AND TELL! https://youtu.be/HupzVqFkf9s
Visit the Adafruit shop online - http://www.adafruit.com
LIVE CHAT IS HERE! http://adafru.it/discord
Adafruit on Instagram: https://www.instagram.com/adafruit
Subscribe to Adafruit on YouTube: http://adafru.it/subscribe
New tutorials on the Adafruit Learning System: http://learn.adafruit.com/
-------...
@viscid bane
yes
@tropic hornet
I believe discloud is easier?
cuz I'm also trying to host my bot
sure you can use that
bur
but raspberry pi would be more flexible
as you have the control over your server
and you can self host it using rpi
and if I do have updates in my code in vs code so will it save changes?
or we have to write in raspberry?
you can install vsc in rpi
rpi uses a linux os
linux distro called raspbian
yeah
its a handheld computer for about 15 dollars
if i remember correctly
you can make robots / home automation/ streaming services/ hosting purposes
and lot more
raspberry pi isnt downloadable
oh lol
its a hardware device
look tbh let me give you a heads up
there as no free vps hosting
even if there are
it wont be very reliable
DisCloud has low mb rate tbh
hosting companies also needs money for their servers
yeah
by?
its a good investment and you will have a lot more control
rpi
its my opinion
i am not suggesting or tell you to do anything
but im just 14 and can't buy as we are running a little tight in here
yeah
I got no choice
I wanted rpi but can't rip
well nvm thanks for tips tho I really appreciate it! @tropic hornet
np
@viscid bane there is a way to host for free
umm go on
What is the best place to host python bot ?
zeet.co, Heroku.com,, or something else ?
If you are not so serious about your bot
I once host my python bot on google colab LOL
I am hoping to run this on an ESP32 Cam Module -
I am going to be using micropython, I am going to determine which GPIO pins I am going to use via a series of API calls, that I have created. These calls aren't very quick and can last up to 7 seconds- bad servers but works for what I need. But there are multiple API calls that I need to make and don't want to wait for the each call to finish. Instead, I would like to do these concurrently, alongside the operations that will be determined by the API call. How would I do this? I have looked at uasyncio, however, this only seems to work when you know how long each call is going to take. In my case I cannot work this out as it varies ±3 seconds. I was hoping that I could somehow do multiprocessing but could find out how to do this in micropython on teh ESP32 cam, any help would be much, much appreciated. Thanks Again,
Please @ me if you reply!
Hi all I do not know if the question is asked in the right channel. I want to read 2 serial (COM/Windows) sensors with say 200Hz frequency and want to store this in a database (or other persistance storage) and maybe do some business rules/or transformation (simple). How would you (and could I) do this with Python?
I do now want to run Python on an MCU. I just want to do Data Capturing/Collection.
so you want to log in sensor data right?
using python and mcu
mcu>
?
Why? I have just serial traffic on 2 serial ports
And a PC/Desktop with Python and a Database? to store it?
hmm
I do not want to run Python on the sensor
The sensors are blurring messages 115200 baudrate at the serial line on say COM4 and COM11
what is the name of it?
they are incline sensors
Nope no microcontroller
does not matter there is no MCU involved
Not for me to interact wsith
with
I want to do datacapture realtime sensor data
and make it persistent
and do some "business" rules
oh i see
Something like talologger: https://olammi.iki.fi/sw/taloLogger/
so pySerial and a database like SQLite or something?
Will this be fast enough
?
sqlite will it be fast enough... hmm nice is one does not need a seperate instance of a db
200Hz per sensor
you want to have very high speeds
yeah you can use that too
Oke i will look into pySerial and streaming solution in Python
there are better ways of storing lots of time series data than mysql
For this I would suggest InfluxDB ... here is good example of similar project as yours: https://www.youtube.com/watch?v=JdV4x925au0
Grafana, InfluxDB, and Node-Red on a Raspberry Pi form a dream team for visualization of IOT data. The setup is not easy, but this is what we will do together.
Today
- We will install everything necessary on a Raspberry Pi using Peter Scargill's newest script
- We will compare time-series databases like InfluxDB with SQL databases and see their...
well you would need uasyncio, but I don't think there's any http library for micropython that support it. And making your own http library can be a bit challenging
@hallow igloo there is a http example lib at https://github.com/micropython/micropython-lib/blob/master/uasyncio/example_http_client.py using uasyncio but that's very basic and you probably need to jazz it up quite a lot
Hmm that is unfortunate, this is how I am going to solve it. Originally I was gonna have an esp32 cam module and esp8226 communication wirelessly, however if I replace the esp8226 with a rpi0w I can access the internet to send the api calls and will use a hotspot from a phone which will allow the interenet for the call, allow multiprocessing/asyncio- whichevere I choose to use with requests. And I can access the ip camera as I will use the device's IP address
@fast elm
I was going to suggest moving the heavy lifting from the esp if you don't want to make an async http lib
could I wire 2 2channel motor drivers in parallel to control 4 motors
Say I want to log data from 2 serial ports concurrent and simultanous? What could en would be a suitable stack?
hi
Can someone please help me and talk to me about the RPi.GPIO for raspberry pi ? I am using python. and I am trying to take a simpe input from a button and have the terminal print out "button was pressed" ? simple right ? well for some reason the buttons aren't picking up ANY input even if i try different wiring set up or different button, still nothing. I have tried looking up many youtube tutorials and read through the RPi.GPIO documents. I am fairly certain it isn't my script that is the issue here, I want to lean the problem down to figuring out if its a faulty connection to the button or something
please @me if someone can help.
Does other gpio functionality work
DESK OF LADYADA - 'Spressif Sunday - We try out our ESP32-S2 Feathers https://youtu.be/oR7uGy8ea68
We got our prototype PCBs on friday and put together some boards over the weekend. Two of the ESP32S2 Feathers, the 'plain' one and one with TFT on back. Without PSRAM, they're a little limited for CircuitPython but they do work and we were able to verify functionality. We also did a lot of low power testing to make sure we can get the best perf...
are you using gpiozero?
What’s that @calm folio
Can you test if the two power GPIO work?
You know it
WE ARE LIVE! SHOW AND TELL! https://youtu.be/y0PAlNZM4aI
Visit the Adafruit shop online - http://www.adafruit.com
LIVE CHAT IS HERE! http://adafru.it/discord
Adafruit on Instagram: https://www.instagram.com/adafruit
Subscribe to Adafruit on YouTube: http://adafru.it/subscribe
New tutorials on the Adafruit Learning System: http://learn.adafruit.com/
-------...
WE ARE LIVE! ASK AN ENGINEER! https://youtu.be/rpMgL30fgX4
ASK AN ENGINEER 1/13/2021 LIVE!
#adafruit #askangineer #diy
Visit the Adafruit shop online - http://www.adafruit.com
LIVE CHAT IS HERE! http://adafru.it/discord
Adafruit on Instagram: https://www.instagram.com/adafruit
Subscribe to Adafruit on YouTube: http://adafru.it/subscribe
New tutorials on t...
start with - turn LED on/off
how to send info to pc using an rs232 with an atmega32?
whats the best rasberry pi to buy?
Depends alot on the project, and how you define best.
Best as in fastest? raspberry pi 4 8gb ram.
Need something small with internet? get a zero W
Need something cheap? raspberry pi 3 is quite cheap
Is the orange pi zero a good choice? I want a pi zero with Ethernet
I don’t wanna buy multiple adapters
Orange Pi Zero is totally different from Raspberry Pi Zero. Raspberry Pi has better software and forum support. Orange Pi is for advanced programmers.
using something like an arduino to measure weight and display it. What do I really need?
Load Cell
Arduino Uno
LCD display
Do i need some sort of controller to connect the load cell to?
I have been Looking at the HX711 but I cant figure out if I need it or where to buy it. I would rather just buy everything I need at adafruit because then I know it will arrive within a few days.
Where can I start learning robotics for python
which load cell will affect whether you need a controller
you need an ampplifier
but it looks like the hx711 uses a standardized serial protocol with a library available for arduino
Oops wrong channel sorry
so how could I tell?
im guessing I need one, but i dont know for sure
so this load cell, the HX77 and some controller, either arduino/circutpython/rpi ?
The hx77 is a controller
I don't know if it's an amplifier as well
Looks like it might ve
I saw a couple of tutorials on how to use it with an Arduino so they should be a good reference
In that they'll tell you exactly what you need to get it working
yeah.. they told me to get the hx77 and im having trouble getting that thing
but ill try to order it somewhere and hope they have express shipping as an option 😄
its a school project for my son
and i thought i just needed the load cell to get it working
DESK OF LADYADA - STEMMA Sunday - ISO1540 & SHT40 breakouts, TikTok'in, Quad Mics, and some LC709203 debuggin' https://youtu.be/c_0uDYDNDxA
It's another STEMMA sunday! This weekend we played around with making TikTok timelapses and built ISO1540 and SHT40 breakouts & tested them / wrote some driver code. We also went back to our ESP32S2 feather and did some low power testing to figure out why our LC709 was acting weird (it's actually just fine!) We also looked at some quad I2S mic A...
Hy 🙂
What tool do you use to talk over webrepl? i was using Thonny until now, but its webrepl support seems pretty broken and i need esp8266 uart for my application so that's no good. Any recommendations?
My Adafruit Feather M0 Express was working great until I did a recent bootloader update (3.11.0), now Windows regularly gives me the finger when I plug it in ("last device malfunctioned, Windows does not recognize it"). About 60% failure rate.
Opinions? Is this a driver issue, or did I break my Feather?
micro means small
If it works some of the time, it's not the board. What's in your INFO_UF2.TXT file (which I believe is on the board in bootloader mode)? I want to verify that you used the right bootloader updater. The other option is to run the USB device cleanup tool found here, https://www.uwe-sieber.de/misc_tools_e.html , with the Feather NOT plugged in, and see if that helps. Sometimes Windows hangs onto older instances of devices and then doesn't play nice.
UF2 Bootloader 3.11.0 SFHWRO
Model: Feather M0 Express
Board-ID: SAMD21G18A-Feather-M0-Express-v0
@kind ice What version of Windows are you running?
Looks like the right bootloader, so that should be fine.
Windows 10 Home. Just did a pretty lengthy update a few days ago, that tends to break things but I don't think it's the issue here. I have a few other boards, Trinket M0s and QtPys, and they are 100%.
Another issue that may or may not be relevant, I keep an unaltered copy of the original code.py script that came on the Feather, to steal snippets of it to try in my scripts. It no longer runs in the feather. I haven't had a chance to go through and see exactly what it's hanging up on.
Did you also update CircuitPython? It might be relevant.
adafruit-circuitpython-feather_m0_express-en_US-6.0.1.uf2
Actually, code.py would have been wiped too, so that might not be it.
Unless it was wiped and the code.py on there now is the default "Hello, world!" created by CircuitPython on install. Have you checked the content of the file since you updated?
Now that you mention it, I checked that and made sure all the libraries were still in /lib, and they were still there. But I did not change any of them. I think my next step will be to delete the libraries that are in /lib and replace them with new copies from the current library.
I have also noticed with some of the older scripts on the Adafruit site, they don't quite work as-is. Syntax can be a little off.
Exactly.
Thanks for everything.
If I don't have any luck I may need to pick your brain again. 🙂
OBTW: I missed part of your question above. I copied out the original code.py before I changed anything. For better or worse, it's exactly as it was when I receive the board.
You're welcome! Feel free.
Yeah, those files eventually stop working with CircuitPython updates.
Something isn't quite right after a while. 🙂
Well, there's still some good code in there, and I've used bits of it.
For sure! It's usually something simple like an import format changed, or a particular function call was moved somewhere else and requires an update.
Rarely is it the entire thing failing. It's almost always something small and specific.
Well, I was going to update the libraries and I think I just discovered my problem, and the reason it's persistently worsening.
It's mechanical. The USB port is making intermittent contact, if you hold pressure down on it, it works reliably. But loose it may or may not. Tried it with a different cable, no difference. Maybe I can reflow the solder joints, but if it's inside the connector that won't help. New connector time.
The timing lead me to believe that it was the update, but that's apparently just coincidence.
This leads me to the dilemma, does the cost of replacement justify the repair?
@kind ice That's a personal decision. 🙂 My soldering skills are likely not up to handling that kind of repair. If yours are and you have the parts, probably worth at least trying? Good catch though! I'll add that possibility to my lexicon of potential problems for future reference.
Thank you for the update. I had involved a colleague in this one because he's more familiar with Windows use than I am. I updated him as well.
good evening, may I ask something here?
yes
Hello I am new to discord python community, could anyone point me to a few useful video tutorials of microcontroller programming using Arduino
One of the admins, Zig, recommended the adafruit site: https://learn.adafruit.com/
Hope that helps :D
does anyone know a website where I can I find job's posts related to electronic engineering?
Hmm, I think any normal job search site would be fine if you filter for electrical engineering
@timid hazel You could also ask in #career-advice
thank you very much
Aside from that, you can also join the adafruit channel in #315249263103967242
WE ARE LIVE! SHOW AND TELL! https://youtu.be/MaTDmvLFVfw
Visit the Adafruit shop online - http://www.adafruit.com
LIVE CHAT IS HERE! http://adafru.it/discord
Adafruit on Instagram: https://www.instagram.com/adafruit
Subscribe to Adafruit on YouTube: http://adafru.it/subscribe
New tutorials on the Adafruit Learning System: http://learn.adafruit.com/
-------...
https://hackaday.com/2021/01/20/raspberry-pi-enters-microcontroller-game-with-4-pico/ Thought this might pique some interest in here
I'm looking forward to getting a few. Sadly adafruit is sold out already but sparkfun still has them in stock (for US vendors at least--not sure the supply elsewhere)
That looks very interesting
Damn, if they actually sell at $4, that's a serious new competitor
it's cheap enough that shipping is double or triple a single board which is a crazy awesome problem
And now it's in stock at adafruit
It looks like raspberry pi has a few vendors in France, Kubii I think has them? I've never used them and don't know french so I'm most guessing off of their site
I think the raspberry pi group have a list of various vendors for a lot of countries if Kubii isn't an option
They do have it, but in 8 weeks haha
ugh lol well 8 weeks to think of projects I suppose if you get it through them
mchobby seems to have stock
Ok so I have a rasberry pi, how am I able to connect it to car keys to unlock/lock a car.
pico my interest
wow really?!
i was wondering what the point was until i knew that
Yeeeeeppp
🌟 @Raspberry_Pi introduced their first microcontroller, the Raspberry Pi Pico! We'll be releasing a port of TensorFlow Lite Micro for it soon.
Check out the GitHub here → https://t.co/S75ligH1jr
And learn more here → https://t.co/dzn95Xe5Dq
#TinyML
106
456
great news
does anyone know a good place to start with programming python on the rpi with gpio?
