#microcontrollers
1 messages · Page 7 of 1
try camera with guvcview -c read and guvcview -c mmap first
also some cameras may need codec decoder that may require contiguous memory for frame * number of frames buffer for unpacking
Error
What should i do
try another camera this is not working for you, try UVC cheap one maybe
does python work on arduino?
You should follow a tutorial online
From what I could see online , it seems that u need to install some extra packages to get opencv to work in raspberry pi
Not really , no. You might wanna give the message over here #microcontrollers message a read
https://paste.pythondiscord.com/D5VA not sure what to do. cant get my code to go in counter clockwise for some reason. im using the robojax files from robojax website and my own code i been working on for a plant watering system. using robojax library and .ccp file the paste codes a set of all three codes. here is the original code i worked from
when i use original code reverse works correctly for both motors from this video. https://www.youtube.com/watch?v=2JTMqURJTwg
Using Robojax L298N ESP32 Library learn how to control 2 DC motors with PWM features of ESP32. This is the basic code where later it can be used to control motor via WiFi
***** Free Arduino Course worth $200****
Arduino Step by Step Course (over 150 lectures) Starts here http://robojax.com/L/?id=338
The best thank you for me is to not to ski...
was wondering if there is someone that could help by chance, this project really means a lot to me, trying to rebuild the code from the ground up but im limited to chat gpt for the most part due to not knowing c++
Am trying to get plugged into any online dev communities locally in New Delhi and Bangalore, with expertise in IoT development (RaspPi, Linux, Python).. does anyone know of any? Or any IoT developers in India?
Can anyone help me with opencv problem. The window for camera opened is too large that it extends my desktop display
#career-advice please
One message removed from a suspended account.
maybe its a long shot and not prefered option if availiable but can u perhaps bring the screen resolution higher to help bring in the window thats overlaped out of the screen? ive seen some plantcv coding but i dont understand the coding yet
Can anyone help.continously getting this error. Even tried different versions
hi , what is the issue ? what are you trying to do ?
give as many details about your problem as you can , dont leave out anything
I am trying to install anaconda on raspberry pi
My os is 32 bit
Pi4
Bookworm
I am able to download anaconda from these commands. But when i try to create an environment i t asks to update
And as soon as i update it gives error conda command not found
My main aim is to run yolov7 on raspberry pi
i cant see anything in those images with that angle
neither do i have experience with conda
so , good luck ig
why do you need conda for that ?
just follow the installation instructions given on the official guide
i dont see requirement for conda on there
i dont think so
bit late mate.
again, bit late.
wassup
hello everyone
which arduino board specifically ?
Mega 2560
it cannot run python
Thanks a lot for help btw
you will have to use arduino C++
the board itself does not have enouhg juice to run python
i suggest you read this #microcontrollers message
it will answer most of your questions
power , resources
i guess its a pretty powerful board, anyways
Hi, I've gotten my hands on a Pimoroni Badger 2040 W and am getting started with MicroPython, however I cannot for the life of me seem to figure out how to get a satisfactory IDE setup. All I'm looking for is:
- Autocomplete / intellisense
- A way to flash my code onto the chip
Step 2 is probably easily accomplishable with just a CLI tool which I can throw into a run configuration, but I cannot for the life of me figure out how I can get proper autocomplete support so my IDE doesn't scream at me for every import being nonexistant. I've tried using micropy-cli and Micropython-Stubber, but they error out no matter what I do - I suspect it's running out of flash memory as the pi 2040 only has 2mb flash.
Is there any other way I can accomplish this?
Learn how to program Badger 2040 (and Badger 2040 W) with MicroPython and Thonny. – Pimoroni Learning Portal
well , not enough to run python
no
read the message i quoted , it will answer your questions
ok
what did you have in mind to do with the arduino board ??
there could be a way to "control the board" using python
but the board itself will not run python
which is too compicated to make in C++
hmm, ok...
what sort of automation project ?
give the details
C++ is the language for the arduino framework , so we cant do anything there
DHT11 sensor, RFID, Flame Sensor, Water Sensor, LCD, Dot Matrix 8x8, joystick, servo, stepper motor
for rp2024 chips running micropython / circuitpython
i find thonny to be a particulary good IDE
will the project be connected to a computer with a USB cable 24x7 ?
yes
Serial Communication, thats why
for the third time , can you read the message i am telling you to read ??
its a 2 minute read and will give you a good knowledge of what is going on
okok sorry
i am reading
got it
so i can use MicroPython
on Arduino Mega 2560
in that case , you can take a look at pyFirmata
it is a way for you to write python code that will run on your PC ( it needs to keep running on the PC as long as you want your project to work ,AND your board needs to be connected to the PC )
i dont recall saying that in my message
ok
the Mega or UNO or Nano CANNOT run python , micropython or circuitpython
pretty sure there are some versions
maybe the UNO R4 , or NANO 33 BLE , not sure
but it will be overkill and expensive for your project
you are better off using ESP32 which supports C++ , micropython , circuitpython
and is relatively cheap
Whats other way than using docker to deploying my apps to raspberry pi ?
what apps are we talking about here ?
Object detection
Using onnxruntime
it seems like just a python library , cant you install it normally with pip ? where does docker come into this ?
Ye I can, because docker gives you better way to controll your enviormemt
sure
so to answer your origianl question , you can directly set up the python libs on your PC and start from there ?
but why would you want to give up the docker tech ?
you have stuff like portainer for docker that makes it easy to manage docker apps
Problem with big img size
hey my dc motors with l298n driver is not turning counter clockwise properly even though it works clockwise properly.. any clue?
const int in2 = 1;
const int ena = 3; // pwm
const int buttonUpPin = 5; // Pin untuk tombol naik
const int buttonDownPin = 6; // Pin untuk tombol turun
void setup() {
Serial.begin(9600);
pinMode(ena, OUTPUT);
pinMode(in1, OUTPUT);
pinMode(in2, OUTPUT);
pinMode(buttonUpPin, INPUT_PULLUP);
pinMode(buttonDownPin, INPUT_PULLUP);
}
void loop() {
// Membaca status tombol dan memanggil fungsi sesuai kebutuhan
if (digitalRead(buttonUpPin) == LOW) {
Serial.println("Button Up Pressed");
press_up();
}
if (digitalRead(buttonDownPin) == LOW) {
Serial.println("Button Down Pressed");
press_down();
}
}
void press_up() {
digitalWrite(in1, HIGH);
digitalWrite(in2, LOW);
analogWrite(ena, 190);
delay(700);
digitalWrite(in1, LOW);
digitalWrite(in2, LOW);
analogWrite(ena, 0);
delay(700);
}
void press_down() {
digitalWrite(in1, LOW);
digitalWrite(in2, HIGH);
analogWrite(ena, 190);
delay(400);
digitalWrite(in1, LOW);
digitalWrite(in2, LOW);
analogWrite(ena, 0);
delay(400);
}
:incoming_envelope: :ok_hand: applied timeout to @fervent stratus until <t:1715715850:f> (10 minutes) (reason: duplicates spam - sent 4 duplicate messages).
The <@&831776746206265384> have been alerted for review.
hey ive been running into a problem for sum reason in rp2 micropython the access point function doesnt allow u to use a auth option
have an interview at EDA company, did an intern in embedded system a while back
I didnt do anything in that intern, so, didnt wrote those bullet points in resume
very breifly wrote embedded system with c++ on esp32 for welding machine
what to say in interview if interviewer focusses on that?
good thing is, it is mentioned very briefly, and was only for 2 month
any programme or anything that I can look into in a day?
what board are you using ? what is your code ? what error does it give you ?
raspberry pi pico w i dont have the exact error but it was like
Attribute Error
authmode=
it was correctly used
but for some reason it was giving me an erro
and when i set it to like authmode=0 it gave me unkown config i think
i searched all around the internet and there was nothing on it
what are you trying to do exactly ?
what do you want to do with authmode
also , show your code
i dont got it
im at another house
import network
wifi = network.WLAN(network.STA_IF)
wifi.active(True)
wifi.config(essid='MyMicroPythonAP', authmode=network.AUTH_OPEN)
print("Access Point configured.")
example
authmode=network.AUTH_OPEN outputs a variable error
network.STA_IF is for station mode , not access point mode
use network.AP_IF instead
still doesnt work
Traceback (most recent call last):
File "<stdin>", line 12, in <module>
AttributeError: 'module' object has no attribute 'AUTH_OPEN'
import network
import time
ap = network.WLAN(network.AP_IF)
try:
ap.active(True)
ap.config(essid='MyMicroPythonAP', authmode=network.AUTH_OPEN)
print("Access Point configured.")
while True:
print("Access Point running... Press Ctrl+C to stop.")
time.sleep(10)
except KeyboardInterrupt:
print("Stopping Access Point...")
ap.active(False)
print("Access Point stopped.")
have you tried just leaving the password field out ??
like just do ap.config(essid="MyMicroPythonAP")
.
hey can some one help me inhttps://discord.com/channels/267624335836053506/1240466137913757747
How about password="" ?
thread seems to be locked , if you still have questions , you can ask here or open a new thread
k ,i checked online but it seems to lack good documentation
do you mind doing help(network) in a REPL and showing the output ?
this?
__name__ -- network
country -- <function>
hostname -- <function>
route -- <function>
WLAN -- <class 'CYW43'>
STAT_IDLE -- 0
STAT_CONNECTING -- 1
STAT_WRONG_PASSWORD -- -3
STAT_NO_AP_FOUND -- -2
STAT_CONNECT_FAIL -- -1
STAT_GOT_IP -- 3
STA_IF -- 0
AP_IF -- 1
is there more to this or this is it ?
nope this is just it
k , now do help(network.WLAN)
object <class 'CYW43'> is of type type
send_ethernet -- <function>
ioctl -- <function>
deinit -- <function>
active -- <function>
scan -- <function>
connect -- <function>
disconnect -- <function>
isconnected -- <function>
ifconfig -- <function>
status -- <function>
config -- <function>
PM_NONE -- 16
PM_PERFORMANCE -- 10555714
PM_POWERSAVE -- 17
huh
so as we can see , there is no AUTH_OPEN constant defined in either of the classes 
yea
i honestly dont know much about this since i havent done it myself
i would try and look online / dig up the source code for this and check where the function for this relies
you cant find source code ?
XURqrU7U
here is the invite code of micropython discord server , you should join it and ask there
thanks
does anyone use python to create assembler code for a MCU ?
em
Expectation-Maximization Algorithm on Python ? @echo wagon
You might need to check for conflicts between your chip and micropython.
I tried Python and Go before I had to go back to C to do the functionality I was trying to achieve on the ESP32 WROOM-1's
for my specific chipset, the frameworks like micropython had one feature or another they had access to within the ESP32's. The caveat is the project is dependent on both so I had to drop them, one being the ability to mount as a browsable filesystem /usb, and the other the ability to act as an access point. While I could always get a socket layer working, I had issues with micropython with the AP's and a few other things that I forgot, its been a few months now
hey i went on the micropython server and i found a workaround
Interesting what did they say?
oh it was just security instead of authmode
How can I open circuit from my raspberry pi GPIO pins
Im using 11 and 13 pins and I connected them to outside controller which needs to have closed circuit to be triggered
It gets trigger when I connect to Gpio wires to board and than i dont know how can I open circuit and than close it one more time using python
Anyone lives and works locally here in India? Am trying to build more of a local network of folks here
a lot of them are , hang around in chat to get to know them
Is this one related to Embedded systems and this kinda thing?
yes
you can read channel descriptions for what the channel is about
Hey, it's my first time to developing a PID controller in a python, so could anyone suggest me how to code it to perform a specific task??
What exactly are you wondering about? What do you mean by specific task?
Ahh, i mean that PID controller would be used in a heater which would control it's power outage, hence manipulating the Surrounding Temp to a Fixed Value
So, how would i go for the main loop here (the loop governing the PID controller)
in python
is implementing PID itself the thing that you're trying to figure out? or connecting it to hardware stuff?
I haven't written one myself before, so I'd probably just use the pseudocode on Wikipedia or any other source as inspiration and then adjust to specific usecase
Hmm
Also the question was to develop a heater which would heat its surrounding to gain the Set Value
So, should i make a sensor first to detect the surrounding temp and set it to the temp parameter.
in gpt, it had directly assumed the initial temp to be 20
this is what they have here, as I'd translate it to Python plus some notes
||```py
ALL_CAPS are consts
previous_error = 0.0
integral = 0.0
while True:
# <setpoint should be updated here>
error = setpoint - measured_value
proportional = error
integral += error * DT
derivative = (error - previous_error) / DT
# this is the main PID output expected to cause side effects:
output = KP * proportional + KI * integral + KD * derivative
# <output should be used here>
previous_error = error
time.sleep(DT)
(I've put it inside a spoiler if you want to figure it out on your own)
Yeah, that's what the main execution would look like
are you working directly with hardware or via some abstraction? or is it just a model?
Actually, we had given the coding of this PID controller firstly
As its our summer vacation, they said u should code first
and then when u would return, we would give u the hardwares to assemble
did they tell what hardware it'd be/how to access hardware from software?
They didn't
I think i only had to write the python code for it
hmm
ig you can just assume some abstraction layer on top of it that you'd later integrate with hardware
Also, I really don't know much about PIDs
As i am only a sophomore, they are literally jargons to me
which would also allow you to test PID itself in isolation (without hardware)
okay?
the general idea for PID, as I understand it, is to interactively reverse some function that takes output and returns setpoint
Also, should i make a sensor first, or directly give the input temp as an example??
make sensor as in?
Yeah, eventually turning the error to Zero
In question it said to make a heater, which would heat the surronding to the Set Value
So first i need to know the initial temp
The heater is to be controlled by a PID controller
since you don't have hardware yet, you'll be simulating how sensor value depends on heater output, right?
for first tests, fixed initial temp and fixed target temp are okay
Yep
later on you can swap fixed values to random to measure how efficient it is
Okay, but first the initial temp should be parametrised as the temp given by the sensor right
?
it's just the first measurement that the sensor gives
and in case of a simulation it's just one of many parameters of that simulation
in a real scenario, there wouldn't be an initial temp as something important
hmm, I thought firstly we have to code for a arduino sensor to measure the initial temp
.
so it's actually an arduino?
yeah, if you know if that's the board/family of boards you'd have, then starting with finding how to query its sensors is useful
it depends a lot based on specific hardware, so not sure if it makes any sense to write it upfront for any reason other than to be aware of various boards you can implement it on
ig looking up how Arduino does it is useful, since there do exist Arduino emulators that you can test your code with
only occasionally and not in embedded setting
Actually, I have an strong interest in Computer vision and Open CV
and i want to develop some projects in it
But, As i had just started Coding, I didn't studied DSA of any language
Soo, Is DSA is there in CV projects??
algorithms for computer vision are somewhat specific to that field, as far as I've seen
(#data-science-and-ml and #media-processing stuff, mostly involving operating on matrices/arrays and focusing on parallelism)
How so we set the weighting factors for a PID controllers??
Like what values should be taken for Ki, Kp, Kd?
Look up "PID tuning" online. There are many strategies, from heuristics to model-based
Since you do not have access to any hardware, one good way to test would be to write a simulation of the system being controlled, and then combine that with your regulator.
It is important to note that the output in case of a PID regulator is conceptually a continuous value - say from 0.0 to 1.0 to mean 100%. In practice on real hardware, for an electronical heater, this would likely be done using Pulse Width Modulation (PWM) - manipulating the dutycycle
are there any open source alternatives to ros
if so what are few popular ones? few i have heard of are yarp and orocos
By "ros" do you mean ROS = Robot Operating System? That is open source
yeah and ik it is open source lol only my issue is ros itself is kind of outdated and ros2 community support and packages is still not at a level ecosystem what ros originally had
Yep - incompatible changes like that tend to suck a lot, and take years if not decades to recover =/ What kind of robot are you looking to build? There might be more specific solutions available depending on your needs
Hey! I want to jump ship to working with them form doing webdev for 3+ years, and I'm in analysis paralisys if I should go with micropython or other language counterparts, because I've been told that micropython is relatively slow compared to the others, and it can be feature breaking
C/C++ is very widely used in embedded world , you should go with that
its also not like learn one language and you are done , you will have to experiment other languages , tinker around with micropython , circuitpython etc
the big thing about micropython is that it takes up more resources as compared to a compiled file and since it is dynamically typed interpreted , it is relatively* slower
however , modern microcontrollers are very fast and powerful , you might not need to worry about it too much. I have made lots of cool stuff with microcontrollers and circuitpython.
circuitpython being dynamically typed offers lots of advantages like doing more by typing less
it just all depends on what you are making. If you want to make a career in this , C/C++ should be an almost "must know" language at least to some level.
thank you for the advice
Such great info, thank you. I been working a lot with c c+ trying to understand the code in arduino ide. I love how fast it is. Wondering for robotics using mpython how much slower it is compared to c/c+, can you give an estimations on some differences in that scenario. Wondering if you can expand on the " relatively " statement. Are we talking seconds, half seconds, milliseconds or more? I find this to be a great topic cause I hear there's a speed difference but haven't seen same situations or type of code directly compared yet. I've used python in HA and it seemed fast as can be normally even over wifi. Was slight delay sometimes but my previous thoughts were that it was the WiFi but now I'm having seconds thoughts. I've done testing on rpi4 with pygame but I think that's different than what mcu would do I'm guessing such as esp32
well , when you compare it for embedded hardware , its pretty slow compared to C/C++
i dont have exact figure , but i would say that it is very noticable , can be on the order of more than 10x or even 50x ( ⚠️ i have not run these tests myself , so these numbers are just based on intuition , not computations, BUT there are loads of online results that will confirm this with tests and proof )
https://www.reddit.com/r/esp32/comments/t1de1p/how_fast_is_python_micropython_versus_c/
https://www.youtube.com/watch?v=qym-P4GTdIU
I never really bothered with doing tests since i could see the noticable sturggle ( i was trying to make a project where i had to poll an input, do some computatinos on it, and display the results to a display , and finally do some custom painting on the screen and it was struggling visually to do that )
if you really wanted , you can write efficient python code and optimize it to run very fast , but i just didnt bother to go into depth
i was happy to use C++ in those places.
There are places where it doesnt really make much difference , like delegating stuff to DMA , direct hardware manipulation etc
Hey there! How would I create a MIDI function in MicroPython that connects to a LoopMIDI port?
Thank you for the info, a general area and ranges is what I was looking for and you nailed it. I think that's been my attraction to arduino ide c/c+ cause the speed is incredibly instant from my tests in most code I've worked with. I now code mainly rpi4 with arduino ide compiler cause it seems faster that 3ghz 8gb ram old i7 pc and way less power for the compiling part or about equal at times
i think we are comparing apples and oranges here
a raspberry pi 4 is INSANELY more powerful and INSANELY more capable than a pi pico or arduino or esp32
you can use python just fine on a raspberry pi
wish there was ways to speed up compilers. One huge issue I have and in need of solution is to be able to program while esp32 is in expansion board.
So true, I mainly just program esp32 these days from rpi4
wish there was ways to speed up compilers
are you talking about the time that takes to convert your code into a compiled file ? or the actual execution speed ?
in the first case , nothing much can be done since C/C++ is like that , it has to pre process , compile , link all the individual files which can take some time
in the second case , compilers have nothing much to do
ahh ok , thats cool
Compiling in arduino ide code to be uploaded
One huge issue I have and in need of solution is to be able to program while esp32 is in expansion board.
it depends on the expansion board
ESP32 needs to have certain GPIO pins in certain states for it to successfully boot or to go into flash mode , if the board directly shorts those pins / uses them in some other way , there is no way other than to unplug and replug
yea , unfortunately , we cant do much about it
Faster cpu, faster ssd? What's the bottleneck? To make compiler faster in arduino ide
a faster PC using a fast SSD will speed it up to some extent
but compiling process involves compiling loads of small individual files which take time in itself
for example , try to copy and paste a simple node project from one location to another , it will take A LONG TIME even if you have a very fast PC and a very fast SSD (even though its like few tens of MB or few hundred MB at the best)
because , it has to copy lots and lots of small bits and pieces files , its not one big file that you copy
now , try and copy a big movie of 1 GB , you will see that on a fast PC it takes merely seconds
why ? because the movie is one big sequential file , and that can be copied very very fast
Can I modify esp32 and expansion board perhaps. Testing and uploading code takes much longer having to remove expansion board. I think if proper solutions are made it could help a lot of folks with these cheap.expansion boards. I been pondering some ideas
what "expansion board" are we talking about here ? do you have a link to it ?
@elfin sphinx these ones are very inexpensive
i havent worked with this one before so i dont know much about it
but it looks like the expansion board has a USB port , does that not work ?
not when in expansion board
what does that mean ? what is that USB port for ? only power ?
do you have a link to where you bought this from ?
even if the board's USB port is only power
you can just plug your USB cable straight into ESP32 and program it that way
you wont have to remove it from the expansion board as long as the stuff connected to it doesnt manipulate ESP32's pins in some way like pulling them low or high or such
becuase ESP32 has some requirements to boot properly / go into flash mode , and having those pins stimulated in wrong way might stop it from working
here is a guide for those pins - https://lastminuteengineers.com/esp32-pinout-reference/
this guide will tell you what pin needs to be in what state at the time of boot
I got from eBay but link is much longer
@elfin sphinx I prob have or had some weird pin manipulation going on. I can try again as it could be sorted out now. Some things work perfect now but haven't tried in a while
yea , this might not support USB data for those ports from the looks of it
but no worries, you can use ESP's USB port directly
yep , that can be the reason
I could block pins or hook pins up to a switch when hooked up to USB perhaps
you could , but its too much extra wiring you will have to do imo
ill try again today. Issue is USB power back feeds into expansion board and other things like motor controller
yes , thats the expected behaviour from the shield
so maybe not enough power to program
if I could block power and a certain pin maybe that's the workaround
you should just take it out and program it outside
I do that already
100s of times but wiring is always a concern and the prototype box I have I want to put everything in and program
its an extra step that adds like 30 seconds of manual labor each time and kinda tedious
when you do this , you will have to consider other things like making sure all switches are turned on and off each time
instead of all of this , just taking it out and putting it back in sounds easier
I think if we made a module to handle it correctly then could make some money on module to
Yes true. Just seems like with today's tech we should be able to solve it. Maybe there's a better expansion board
making money off of such modules is insanely hard
firstly , it will be priced very high since you will be makign relatively small batches
secondly , if it starts to gain popularity , 100s of clones will start to flow in from china who will make a better version of it and sell it
thirdly , i dont thinkl people really want this very overpriced expansion board
but , it can totally be a fun personal project for you to work on
That makes sense. To be the original seller maker prob give ya clout but if u teemed with adfruit then maybe
why cant an adafruit engineer make the same thing or make it even better within a weekend ?
your right
not every project needs to be a product , some projects are good as personal projects , they dont need to be a product
write a blog about it , show it off on your website , make posts on instructables, hackster , hackaday , see if it gains popularity amongst makers , see if they like it , see if they want it first
I guess its more like a feature that needs to be in the expansion board and cheap as heck
i agree its a good feature to have
Trust me 10 times no prob but unplugging and plugging 300 times for one project gets old
a button that disconnects the whole ESP32 from the board and you can use it as isolated ESP32
but the complexity needed to implement it and the lots of extra circuitry needed to implement it
compared with the beneifts it offers
is not worth it
why are you plugging and unplugging it 300 times ?
To test code on my plant watering system. Editing c code testing functions with each update
usually it takes few iterations of code to get it "working"
you need to do that 300 times ? a few times should be enough
you gotta invest time in writing good code in the first place. code not working as expected is inevitable , but it shouldnt take 300 times
should take few attempts usually speaking
also i dont really have problems flashing to my ESP32 directly in the breadboard attached to external components
its just in very few cases that i have to unplug it
Thank you for pondering with me. Might be a simpler way perhaps. Unplugging it is indeed the best way yet. If I had hard drive like ide cables without back and forth every other wire type setup could use ribbon cable to put esp32 outside of case to easily remove esp32 without having it in a little box with tons of wires to get accidentally unhooked
yea, those pins do look a little close , might be a problem during unplugging
dupoint wires won't do to unreliability
I like bread boards but pins fall out sometime too when tinkering for me. I love the wire wrap for solid connection on data. Take longer but seems more reliable esp for this when everything needs to work in sync for many functions. Putting breadboard in a box prototype can fall apart when moving around things
originally everything was breadboard on above pic
@elfin sphinx I know it looks a mess but the wires that need to be solid pin connection such and screen and motor controller are on on side of expansion board and stuff for removable testing is mainly on other side that can be plugged and unplugged at will with good connecting dupoints.
if pins just fall out from the breadboard without any reason , you might need good breadboards , its not supposed to happen
and yes, a breadboard , or such dupont cable setup is not meant for a working product , its mostly for prototyping. once you have finalized the circuit , soldering it onto a PCB board is the way to go
also justt chcking all the modules in the box is not a good idea
because when moving it aorund , certain exposed parts of one module might touch another module and unwanted stuff can happen
fasten the modules down
yea but duponts arent really meant for this kind of stuff if its going to be moving
use a pcb board (or also called perfboard or zeroboard) for soldering your circuit up
if you have modules , use screws and mount them on the PCB board itself
just a slide of he box and that 12V exposed contacts of motor controller might short with pins of ESP32 and boom , its ruined
messy wiring is not that big of a deal here
Sorry for late reply, had to do some errands. Modules will get glues or may e double sided sticky tape if its none conduct perhaps. Wires will be better organised. Much easier to route 30 awg wires than dupoint. Kind of been more or less experimenting getting a feel for how the differ. Your right, I should do the screws thank you for that idea. I've been using perfboards. I really like them alot and I used one perfboard for six buttons on this project but I should incorporate more if possible. Your so right on the modules being close together sliding and shorting
@elfin sphinx I have an issue with c code and every time I add reverse motor feature to the.esp32 for the motor controller after a few other functions everything does not work right anymore. Could u take a look by chance? I seem to not be understanding the brackets for closing out code very well. Thank you for all the insight yesterday, highly appreciated!
// Control motor2 based on weight and time
int currentHour = timeClient.getHours();
int currentMinute = timeClient.getMinutes();
if ((currentHour == convertTo24Hour(triggerHour, isPM) && currentMinute == triggerMinute && timeClient.getSeconds() >= 8 && timeClient.getSeconds() < 16) && !buttonPressed) {
// Turn on motor2 for 8 seconds starting at the trigger time
unsigned long motorStartTime = millis();
while (millis() - motorStartTime < 8000) {
robot.rotate(2, 100, 1); // Start motor2 at 100% speed in CCW direction
// Update weight while motor2 is running
weight = scale.get_units();
updateDisplay(weight); // Pass weight only to updateDisplay
}
robot.brake(2); // Stop motor2 after 8 seconds
} else if (weight >= target_weight && !buttonPressed) {
// Start motor2 in CCW direction if target weight is reached
unsigned long motorStartTime = millis();
while (millis() - motorStartTime < 8000) {
robot.rotate(2, 100, 2); // Start motor2 at 100% speed in CW direction
// Update weight while motor2 is running
weight = scale.get_units();
updateDisplay(weight); // Pass weight only to updateDisplay
}
robot.brake(2); // Stop motor2 after 8 seconds
} else {
// Stop motor2
robot.brake(2);
} want to add reverse for 10 seconds right after brake
This is how I reverse with button 32 normally // Check if button 32 is pressed
if (digitalRead(BUTTON_PIN_32) == LOW && !buttonPressed) {
// Button 32 is pressed, start motor1 CCW for 10 seconds
buttonPressed = true;
unsigned long startTime = millis();
while (millis() - startTime < 10000) {
robot.rotate(1, 100, 1); // Start motor1 at 100% speed in CCW direction
// Update weight while motor1 is running
weight = scale.get_units();
updateDisplay(weight); // Pass weight only to updateDisplay
}
robot.brake(1); // Stop motor1 after 10 seconds
buttonPressed = false;
}
can you post your code as correctly formatted code ? ( as a codeblock with correct language )
also is this the whole code ? if its not , please post the full relevent code
also explain what is currently happenign , what you want to happen instead
Hey, could you guys please suggest me good project based on Arduino ot resp pi
there is practically countless possibilites
i suggest you go to a project showcase site like hackaday.io or instructables.com and checkout the projects there. Usually there are very interesting and cool projects on there
Hmm...lemme see
Also searching YouTube for arduino, esp32 or and raspberry pi. I change the search results based on hour, day, month or year to get more up to date projects
Ok my apologies. Ill gather the code up and put in a pastebin or something in a bit. What I posted on here was just a section and formatted incorrectly. The formatting is what confuses me the most like bracket placement begins and endings of code sections
i will probably lurk here a lot from now on. im a controls engineer by trade and i love/work with this kind of stuff all the time
anyone got something interesting they are working on? im stuck in an ice cream factory "supporting the site" all week
glad to have you onboard, this channel is amazing! im working on a different type of plant watering system that does not rely on moisture sensor to check moisture. im curious to what type of control engineering you do? sounds like a awesome job
i build/program industrial automation in the food industry - plcs, IO trees, allen bradley, electrical wiring, etc. Its fun but the travel sucks. All of our software and panels are built in-house, so its all custom
Awesome! i been learing 3d modelng, arduino and esp32 for a couple years now but im still not a self coder. i use ai a lot but still learned a ton working with it. im getting much better with libraries. do you use c/c+ mostly?
would it be ok to dm you?
mostly its ladder logic, some python/sql/vba as far as programming goes. arduino/esp32 and raspberry pi got me interested in this kind of career mostly. feel free to dm me
@cloud hinge sounds like you're on an early path down the same field lol
i will write in python if i can lol - i havent tried micropython and arduino, im trying to avoid it and get better in C
nice! i have a rpi4 and love it. i use it as my main desktop for coding these days with arduino ide and web browsing. i made a sql database that linked to esp32 to be able to control a led from a website online to a esp32 connected to my wifi. worked like a charm but took a while to implement
im not so good at python or c but im understanding the structures in c much better these days. im better at editing some things than writting the whole code
somehow i messed up the whole formatting on me c code but it still works correctly and now i need to format better.
those are some real world skills that will translate into a career if you want them to!
I wish i had some more time to work on projects. I want to make an automated birdhouse and drone eventually. but that drone probably wont happen for years with how much im working lol.
send me your code and ill format it
itll make me look like im doing something at work
ok sweet
r
@shadow wraith What's up with the rs?
so i can talk in the voice channels
Did you read the message in #voice-verification carefully? Especially the bold sentence between the ⚠️ emojis
no lol
hi
hows it going
anyone messed with the arduino opta?
Too industrial for me 😅
Hey did anyone worked with ros here??
Recently, we have been asked to study ros and make some projects from it
The robot OS?
yep
okay so it is a open source software from where we could download different robots algorithms??
Yes. And a platform to develop your own algorithms or subsystems
i created an open source firmware (micropython on a raspberry pico w) for smart sit stand desks.
https://youtu.be/PKzvHBzcGJ4
https://github.com/waliori/RP-pico-sit-stand-firmware
https://github.com/users/waliori/projects/1
Transform your workspace with a custom-built smart sit-stand desk!
In this video, I take you through my journey of converting a broken Ikea Skarsta/Trotten sit-stand table into a smart motorized table using raspberry pi pico W with micropython and 3D printing.
Inthis electronic engineering project, discover the challenges I faced, the soluti...
Contribute to waliori/RP-pico-sit-stand-firmware development by creating an account on GitHub.
would yall recommend arduino or pi for micropy dev
pi pico
arduino UNO , nano , mega etc dont support micropython
cool just ordered a pico
Hello there,
i am new to programming microcontrollers and embedded programming, and i have a small project at hand that will most likely include some arduino chips.
Is python the right language for the job or is it more recommended to learn embedded programming in Rust or C?
Nim/C , but python is very good for scripting from remote procedure call in embedded case ( see telemetrix project ) and if you need something more than bash for tooling it will also fit nicely
Since u r a beginner, I suggest u learn c++ and Arduino framework since it has a huge community and insane amount of libraries and other resources
Python , circuitpython , micropython can't run on the basic Arduino boards anyway
i just put the john cena "ru sure about that?" on a confirm display for an hmi
i might leave it in and see who catches it first
hey everyone, my rp pico came in the mail today and im trying to get it set up, is there anything like the arduino ide that handles all the dependencies and installation stuff or is that all manual? i cant really tell if im following correctly
vscode-platformio is not bad
to get started , you can check out the getting started guide from circuitpython https://learn.adafruit.com/getting-started-with-raspberry-pi-pico-circuitpython/overview
if you want micropython , you can check out the official guide here https://projects.raspberrypi.org/en/projects/getting-started-with-the-pico
as for the IDE , try out thonny 
its a very nice IDE for people starting out (dont get me wrong , it is capable too , its not a "beginner IDE" )
you can use both micropython and circuitpython on it
i've figured it out since then, thanks to you and @spiral sandal anyway, i'm using mu editor
mu editor is great too 👍
you guys use ide's for pi?
yes ? you dont ?
how do you write micropython/circuitpython ?
I think idle or neovim just import io libs
You’ve got me curious now - I’ll look when I get home
Neovim it is
and what about uploading code , managing filesystem , serial monitor etc ?
thonny does it all in 1 place , thats why i like it
Hi, im not looking for python help specifically, but because there doesnt seem to be a raspberry pi discord community (if there is a (better) one, let me know).
But basically, I have a 3ds and I want to emulate the streetpass functionality using a raspberry pi (zero or 3) and I am wondering if that is something thats possible to do.
Appearently, the 3ds sends out a 802.11 probe request with an ssid of "Nintendo_3DS_continuous_scan_000". If another 3DS is in range (Which I want either 3ds 1 or 2 to basically be a pi), the second 3DS (#2) will respond with a Probe Response, to which the original 3DS (#1), and of the receiving device with every frame thereafter, will respond with an 802.11 Acknowledgement.
Is it possible to capture these packets with the wifi chip in the pi and actually do things with it?
Please ping me
That code is on the pi, so I just run it natively. RPi library has documentation for almost everything you need.
I just went to the documentation and that was enough for me to write the code for a temp sensor with lcd output (in my screenshot).
I’m not knocking it, just genuinely surprised to hear about an ide. I’d like to play around with micropython but I don’t have much spare time.
Here’s the docs I use for I/O
https://pythonhosted.org/RPIO/#documentation
It’s definitely possible and more than likely is pretty simple. The 3ds is more than likely well documented - although I’m not sure how you could emulate it.
Ah, but I just googled it and it says the pi doesnt support monitor mode, so I would need another wifi dongle?
ahhh so you are talking about micropython specifically on a raspberry pi ?
i am talking about a general development environment like , to develoope circuitpython or micropython app for lets say a pi pico or an ESP32 board
i very rarely use micropython on rpi board
i mostly use it for pi pico and esp32
also this just looks like a regular python package
we are talking about micropython , not python
I’m sure a cheap WiFi module or an esp32 would be capable of what you need if you wanna try writing in c. You can bend any system if you’re determined enough lol
My apologies, never tried micropython. I don’t really see a need when you can do what you need with gpio
Okay, thanks
because we cant install python on an embedded system like pi pico where resources are extremely low (raspberry pi is not really an "embedded system" in these terms, its a full fledged computer just shrunk down in size )
so there exists micropython that can run on those small resource systems
I came into the conversation while at work yesterday so I didn’t read above lol my bad
would any super dope awesome micro python rp pico programmers help with some button code
What you need
add me back
just ask your question in the server , we dont prefer DM help
more people that see your problem , more potential helpers for you , its a win win
dont ask to ask , just ask the question
Your question is not a question lo
Question, what do you all know about Flipper0?
that its a fun tool
umm should one use adguard or pi-hole on a rasberry-pi to stop ads ?
and any good tutorial on how to do so ?
Could you guys suggest me some good projects related to hardware security
half joking but no really https://en.wikipedia.org/wiki/Dead_man's_switch
A dead man's switch is a switch that is designed to be activated or deactivated if the human operator becomes incapacitated, such as through death, loss of consciousness, or being bodily removed from control. Originally applied to switches on a vehicle or machine, it has since come to be used to describe other intangible uses, as in computer sof...
oh great, i will test this thing on myself!
using a pico and have the code for a joystick:
from machine import Pin, ADC
import utime
xAxis = ADC(Pin(27))
yAxis = ADC(Pin(26))
button = Pin(16,Pin.IN, Pin.PULL_UP)
while True:
xValue = xAxis.read_u16()
yValue = yAxis.read_u16()
buttonValue = button.value()
xStatus = "middle"
yStatus = "middle"
buttonStatus = "not pressed"
if xValue <= 600:
xStatus = "left"
elif xValue >= 60000:
xStatus = "right"
if yValue <= 600:
yStatus = "up"
elif yValue >= 60000:
yStatus = "down"
if buttonValue == 0:
buttonStatus = "pressed"
print("X: " + xStatus + ", Y: " + yStatus + " -- button " + buttonStatus)
utime.sleep(0.1)
This works with micropython but I also want to have keyboard/mouse input to the computer which I can do with circuit python. How can i both read the joystick and have keyboard outputs?
I'm planning using microcontrollers any suggestions that I need for having to work with python specifically
Hey guys,
I need to control a motor via my raspberry pi and a sangaboard.
Any help greatly apreciated
Don't ask to ask, just ask
Buy microcontroller with good MicroPython support. ESP32 is a good starting point
Thank you my apologies for taking you away from your work my apologies
:incoming_envelope: :ok_hand: applied timeout to @real notch until <t:1719545145:f> (10 minutes) (reason: duplicates spam - sent 4 duplicate messages).
The <@&831776746206265384> have been alerted for review.
Sometime diving into this do I need something specific for micropython my apologies
firstly you need to understand that micropython and python are similar only syntax wise
librarywise ,they are very different
a microcontroller like ESP32 cannot run full python
it can run micropython
you can buy any board like ESP32 , ESP8266 , Raspberry Pi Pico etc to run micropython
i recommend buying ESP32 + pi pico , they are cheap ( i think $4 each )
and other stuff like LED , breadboards etc that you might need
thank you
FT232H - cannot find any mention of this on here. What it does is allow you to use any Linux, windows or mac-os computer as a micro-controller. It plugs into any usb port. It provides I2C, SPI and GPIO. It allows you to use the micropython or circuitpython modules directly from the python you have on your PC.
I like the concept ... burp
Is there a MicroPython driver for the FT232H ? I have not found any...
maybe port https://github.com/jmbattle/pyMPSSE
What are the basics needed for hardware for the pico? Like if I’m just getting started, what else will I need outside of resistors, buttons, and LEDs.
breadboards , jumper cables for breadboard
would be in the necessary category
soldering gear ( even a cheap $5 soldering iron is better than nothing ) , PCB boards , pin headers for that PCB board , etc are very cheap and would be in the "highly recommended" category
multimeter and power supply are the two things you need in terms of tools
you dont have to buy those expensive power supplies , for pico stuff , just buy a nice 5V 2-3A power brick , cut up a USB cable , and solder wires to its ends to make it a 5V power supply (or a 12V adapter with some voltage regulator boards like LM2596 , get the most ampere one you can get)
and it would be handy to buy common voltage regulator ICs
if you are going to be doing microcontrollers tuff , i think you should buy an LM317 , AMS1117 (3.3V version) and a buck converter module (like lm2596)
and other than this , its all aobut , what you want to do
you can buy different sensors , display modules, motors , etc etc
I already have the tools aspect of it e.g the iron, breadboard and buck converter. Just making a workshop and wanted to stock on the bare minimum and work up towards the sensors and such as I make my own PCBs that require them. Thanks! Kinda going overboard but hope it pays off eventually. I already made a Simon says board, just need to promote it better.
remember the Radio Shack , experimenter kits ? @elfin sphinx
i assume you have tools like wire cutter , nipper , etc
we dont have a radio shack here 😅
but i do remember assembling kits
I miss RadioShack. Glad I live within 40 minutes of a micro center.
its called , The Source now
Yes, or pyftdi which is pure Python. Apparently what AdaFruit Blinka uses, which implements I2Cetc for CircuitPython. https://github.com/adafruit/Adafruit_Blinka/blob/main/src/adafruit_blinka/microcontroller/ftdi_mpsse/mpsse/i2c.py
great , then you have a bit of stuff to get started
also buy a capacitor kit if you can
and few common transistors
and some mosfet
Soldering assembly kits is my goal with this workshop . Currently looking at about 250 bucks worth of parts so when I’m ready, I can just package and ship. Gonna revisit my Simon says game first and expand my components from there.
then buy some extra PCB boards , practice implementing your breadboard designs on those
pro tip : you dont have to solder your expensive components onto the PCB board direclty, meaning , if you have 1 pico , you made a project with it , nad you want to make a PCB for it , dont solder the pico directly on there , solder those header pins , and then plug your pico into that
so when you dont need the project or feel like moving on , you just take the pico out from that socket and use it normally
modular is a good way , and make lots of notes on what you did
lots of scribble books and pen / pencil / eraser
I will when that step comes. Currently I’m using actual components and wokwi simulator.
And yeah, I’ve learned from last time that I should use male pins on my board instead of female since you don’t need to scrap a 39 pin segment lol.
I actually already started a repo for it since I have the code for the Simon say game. That was 2 years ago though and I’m just now getting back to revisiting the project.
no ? you usually solder female pins to the PCB board and then plug your pico that has male pins on it into those female pins
good luckk 👍
Yeah, but if I’m selling kits with the header pins in them, it would be more cost effective to do it the other way around so I can sell them for as cheap as possible.
I’m aiming for accessibility over profits.

you still need one set of male pins and one set of female pins , i told you where usually the male and female pins go
you can do it other way around , but it will be super awkward (since lots of modules / controllers come with male pins soldered onto them directly)
and both approaches would pretty much cost the same
also , if you are going to sell the project to regualr people , you should ditch the modularity and solder the controller directly on the PCB anyway
The pico has pinless options.
yes , thats a good thing
I’ve thought about that, but then that’s just an addition 5 dollar cost for every board I sell and if I have 10 in my collection, then I would be expecting the end user to have an extra 55 bucks for all the boards.
i am sorry but that makes no sense to me
if i want to buy 1 board , i will buy 1 board
why do i need to buy 11 extra boards ?
also you are saving money , not spending extra money ( you save money because you dont have to buy the female headers pins seperately)
Say I have the Simon says board, an RC car board, and some third board. If someone wants all 3 but they are set up to solder the pico to the board, then they need 3 picos.
yes , thats the intended use case for a regular person
a normal person does not want to deal with elctronics and swapping out microcontroller , setting up his computer to flash pico with the stuff
Also, this doesn’t matter as much, but I do prefer the look of the board with make pins lol. The pico and nano look better than say the uno or banana imo lmao.
if you want to sell it to tinkerers , then you might as well just sell the PCB because there is a very high chance that they already have a pico
banana ?
I will have that as an option too.
ahh the arduino bnana , i c
I’m confusing it with another fruit but I can’t remember. I just realize the banana pi is a rpi clone.
what is this simons game / what does your project do exactly ?
A clone of this
Sorry, I guess I missed that.
no worries lol
but it seems a good simple project 👍
in future you can try to incorporate some digital logic ICs , and ditch the pi pico completely ( assuming this is a relatively "simple" game)
that will reduce your cost , by a lot
74xx series ICs are like few cents
I do want to revisit logic gates (worked with them in high school) but with the popularity of the pico and such, figured more people are likely to have heard of it and be more interested.
fair point
good thing that pico is not that expensive
I’d like to incorporate the chip on my board and skip the “third party” part, but I’m not privvy to how all that works yet. I know it’s open source and the company explains how to make your own board, just haven’t had time to sit down and go through it.
well its not a beginner's project , thats for sure
you will need some extra equipment to solder that IC onto the board , like a SMD rework station , not to mention lots of complementry SMD parts required like capacitors and reisstors and diodes
( aside from the fact that you need an actual custom PCB board that you will have to design in a CAD software and then get it manufactured )
If I’m getting to that point, I will have the SMD work done prior to shipping it out as a tinker board from a manufacturer lol. Last thing I want to do is work 10 hours a day to come home and hand solder SMD parts.
thats gonna be expensive ngl
but it can be a fun project
i guess there are some quantity of buyers for everything
I figure I’d cross that bridge when I get there. If these smaller boards even justify the venture.
sounds good
and good luck , let us know how it goes , and dont hesitate to ask for help
Thanks. I think I’m going to dust off my discord server and start using it as a hub for these projects. Made it for video game development but haven’t don’t that in half a decade lol.
It uses board to allow you to access all of it's functionality from your regular python through the associated micro python modules
just an interesting read about how board/gpio works at a system level
https://bob.cs.sonoma.edu/IntroCompOrg-RPi/sec-gpio-mem.html
I thought it was an interesting read if you like knowing how things are working at a deeper level
I'm not sure if this is the right channel for this, but I have a question. I am doing some coding for the GPIO ports of a raspberry Pi, and am using the gpiod library. This has been working great. My dev workflow is to do the coding on my Mac in VS Code, then transfer the python scripts to the Pi, ssh in to the pi and run the code from there. The problem I am having is that I don't have the gpiod library installed on my Mac, because I wouldn't want to run it there, and so I don't get the intellisense in VS Code. What is the best way to get the intellisense for the library onto the dev box?
I figured it out. I downloaded the whole library into my projects folder and then added these lines to my settings.json for VS Code:
"python.autoComplete.extraPaths": [
"/Users/[whatever]/Projects/libgpiod/bindings/python"
],
@errant shell are you interested in generic python wasm or just micropython wasm ?
you can do the same with arduinos from browser with telemetrix project
Hey guys, I'm having a bit of trouble with micropython developping on a m5stack device with its uiflow2 web ide.
It's giving me an error that I'm honestly having trouble locating.
Traceback (most recent call last):
File "<stdin>", line 21, in btnA_wasClicked_event
File "<stdin>", line 14, in die_display
TypeError: unsupported types for : 'int', 'int'
Code is here https://sourceb.in/O2BrokZtSY
Is there a sensor that can detect a specific chemical like sugar liquid or ammonia
My apologies
I hybridized some code to make esp32 use a rotary encoder with bluetooth and as a mouse wheel for scrolling in windows, Linux and android if anyone is interested maybe I can try and post the code later
Works like a charm!
Anyone know how to get a 7 segement display module for microbit working? I got the TM1637, but i can't seem to get it working.
How to Use the TM1637 Digit Display With Arduino: In this tutorial, I am going to show you guys how to control the TM1637 4-Digit 7-Segment displays using an Arduino. If you want to displays sensor data, temperature and humidity, or want to design a clock, timer or counter, you will need this 4-Dig…
I just need this for the micro:bit
ok my apologies, im not familiar with micro:bit
nah it's all good
it has been quite hard to find well made documentation for micro:bit in python, i'm definitely thinking of getting a raspberry pi/pico
Bt mouse drivers for the wheel of mouse in rotary. Made the code with gpt for it today. Can scroll webpages and volume easily on bt to Windows , Linux and android
What's micro:bit about?
it's basically a dumbed down arduino
i got it when i was much younger
it mainly uses block coding
ahh ok, i seen something like that, is there a pic of the other side? do you have to use the website to write the blockcode?
you can use the microbit module in any python ide, i got it running on pycharm
its hard to get different modules working such as that display
awesome man, i mainly use c++ but trying to get into python more. been struggling getting it to work right in vscode platformio
ah yeah
i love pycharm, and i have the professional version because of student access!!
Nice!
https://python.microbit.org/v/3/reference
their online IDE seems to be very well made along with nicely laid out API documentation within the IDE itself
https://www.101computing.net/bbc-microbit-counter-using-a-7-segment-display/ here is a tutorial where tehy explain how to use a raw 7 segment display with the microbit
https://github.com/mcauser/micropython-tm1637 here is micropython driver for your display
could i make a gameboy emulator on a raspberry pi pico with micropython
i know its silly :3
Emulators can be quite CPU intensive. You will likely need to drop down into C code, at least of parts of it
There is an emulator here, which runs on Pico, https://github.com/deltabeard/Peanut-GB
And another 😮 https://github.com/Pardok/RP2040-GNUBoy
Thank you
i cant help you if i dont know the question
it shows me no access
How can i give you access
I am getting no output. Trying to run ultrasonic sensor with pi4
Kindly help
hi i cant see the wiring of your pi
can you post a circuit diagram as well as the photo of your wiring ?
your wiring is still not clear , i dont see your pi
also according to this circuit diagram , the wire coming from sensor should go at the start of the 2k resistor and the wire from the pi should go in the middle , but your sensor wire goes to middle and pi wire to the top , which is the exact opposite of what is shown in the circuit diagram
how am i supposed to see what pin you have connected to what wire from this ??
please post clear pictures that show your wiring clearly , i must be able to see your raspberry pi gpio pins , the breadboard , the sensor , all in one frame , without any wire overlapping with any other
so that i can see if you have connected everything correctly
if the wires wont stay in place, tape down the sensor or smth , just make sure that we can understand your wiring @neon turret
Thankyou for your precious time. The problem got solved
I am trying to remotely access raspberry pi4 with ubuntu 22.04 using vnc but i get this blank screen
you can do a lot of things with conductivity sensors or turbidity sensors
(hopefully its this easy) are you running the client side on your rpi?
I am sorry I'm trying to figure out how to use a spectrometer if such a microcontroller works because I want to search for something that might be underground and if I have some type of spectrometer that could look for that specific resource in the soil or even as a rock then it would be easier
But is there a microcontroller that works that's a spectrometer my apologies
there are no spectrometer microcontrollers commercially available that i am aware of.
Engineering one from components and programming it with a rpi would probably be more effort/time consuming/even costlier/impossible to part out than just buying a spectrometer.
some use x-ray, some use magnetic fields. are you prepared to fully engineer a project of that scope?
my guess is probably not - respectfully
if you really HAVE to do it, find the type of spectrometer, read technical manuals, figure out how the type that suits your need works, then spec out parts and electrical and maybe even get a custom pcb made.
I have run the command vncserver on pi and then using realvnc viewer i try to access.
If you are using a RPi4 without a HDMI monitor attached then you need to set a fixed resolution using sudo raspi-config. Choose anything other than default monitor.
https://cdn.discordapp.com/attachments/1085980871418462279/1261065501644292156/VID_20240712_012500.mp4?ex=66924305&is=6690f185&hm=4cb6c50ac9b4728120151671355b51e8401dab7a62ce3decbba2159b4f3c641b&
tried running bad apple on an i2c ssd1306 128x64 display through an arduino uno.
The video was encoded, and sent via serial by python.
It could be a bit more optimized for stable frame rate
nifty !!!
is there an alternative to the device simulator express? i want to get into hardware programming (or whatever term you use) but obviously, dont have the money to buy the hardware to experiment with
@dreamy wasp the code you write on the arduino is written in c++ , i dont see how thats related to python
anyway , in this channel you can ask microcontroller questions that are not related to python directly
i do my Arduino code in python not c++ thats how.....
and thank you, i did not see that this is here
using what framework ??
the code that you flash onto arduino can only be C++ code thats compiled
unless you are using something like pyfirmata ?
ya, im using pyfirmata.
hi guys
arduino uno or raspberry pi 4 8gb ram
which is better
?
I've got the RPI 4 8gb but I am getting an error while using the camera
it is not working
Arduino Uno is a microcontroller with 2 kB RAM. Raspberry PI is a single-board computer. Two completely different devices
you can in no way compare an arduino UNO to a raspberry pi directly, those are two very different things meant to do very different things
anyway
show code , show error , show connection diagram , show photo of your setup
uh
I am not into that mod anyway
BTW I am new to this
I have aproject to do soo
Is sophia made with RPI or ARDUINO or any other microcontroller
(Sophia robot)
BTW thanks
the main brain of sophia that does all the thinking , visual recognitino , understanding surroundings , deciding what actions to take would be done by a computer like raspberry pi ( except a much much more powerful one )
then that computer will decide what action has to be taken , ex , moving a hand , then it will command a microcontroller like arduino to move the hand motor , then arduino will listen to that command and will move the motor
but understand that it probably wont be using an arduino UNO or raspberry pi itself , they will be using an industry equivalent of those two
raspberry pi and arduino boards are used more in the hobby market , they are not used that much in industry
hmm thanks for the info buddy
what are some of the interesting microcontrollers people have tried using?
I've used MSP430s and Arduinos
but I'm curious what kinds of cool things people have done with Jetson Nano's and STM32s
ESP32 (or RP2040) with MicroPython is fun. Lots of RAM/CPU/FLASH, good connectivity
Jetson Nano is not a microcontroller, but a single board computer, completely different class of device
yea pretty much what said above
arduino UNO , nano , etc are base class micrcontrollers , moderately powered (stuff like ATTinay85 would fall in the same category if not one class lower)
then there is stuff like RP2040 , ESP8266, (maybe samd21) which are better , faster , more powerful than above
then there is ESP32 range (wroom , wrover , S2, S3 , C3 , C6 and so on) which is even more powerful and capable
then there is stuff from nordic semiconductors like nrf52840 which is just as capable , but its a little bit different from ESP32
STM32 range is known for its reliablity and power , they are better than arduinos in almost everything
8051, PIC micrcontrollers are ancient technology (well , pic is not exactly ancient , but old) , but still used in the industry for suitable applications because of their proven reliability over decades , they are usually very very very underpowered compared to a modern day microcontrollers like ESP , rp2040
there is also a very high performance range of microcontrollers by teensy , they are very very powperful in a microcontroller form factor (not quite as powerful as a SBC maybe , but very powerful when compared to other microcontrollers)
then there is SBCs like raspberry pi zero , 3 , 4 , Jetson Nano , etc
SBCs are basically a computer shrunk down in size , so they are insanely more powerful than microcontrollers ( with a heafty price )
I've just bought now the adafruit circuit playground express (no bluetooth though thinking about it, maybe I shoudve XD). never done anything with hardware and python. what are some good beginner projects once ive grasped the basics of circuit python?
just browse around in any microcontroller based project forum , find stuff thats interesting , ask on here if its possible to make with your thing
since your thing has temperature sensor , IMU , addresable LEDs you can probably do some pretty cool stuff
Awesome! Thank you!!
Im going to keep it super basic (as in no additional attachments). Dont really have that much more money to do anything advanced-ish
huh
i am not sure what your module consists of
can you specify what all sensors and features does your model have ??
Make faster and easier than ever with MakeCode, code.org CSD, CircuitPython or Arduino!
Its this model I got
yes i was referring to same thing
the things i listed above are built into that thing
this all is built into your board , you dont need to buy anything seperately
Ive not had a proper look at the specs till now and im surprised its got that much features packed in for a decent price
Ive got a raspberry pi 3 model b with the tablet screen (bought circa 2015). Never did much with it. Is it possible to utilise both modules with each other?
is it possible ? sure
should you ? depends on the project
usually a SBC + microcontroller means a pretty involved project
your rpi 3b can be turned into loads of different stuff , maybe even a small tablet
there are practically infinite project options you can choose from
so it just basically boils down to "what you like to do / a project idea you have in mind / what you would like to make after browsing around on project forums / youtube "
Just want to for the future. For now, to get started Ill play around with the circuit express and then once i get my paycheck, ill get using my rpi 3 again
Spent around £200 for rpi 3 due to certain issues and since then, did fuck all with it 💀
OOOOOOOOOOOF
I know 🥲. I short circuited 2 rpi 3 by just touching the metal parts of the motherboard (dk what you call them) so had to buy another one
At least when I built my pc last year, it all went well (booted it up first time, with no issues)
Hi guys, I'm actually building a voice assistant using an external esp32s3 microcontroller. I am running it locally on a platform io project. Now I want to transfer it to cloud. I am confused between aws ec2 instance and aws iot core in combination with a lambda function and s3 for storage. Any suggestions?
we cant help you decide if we dont know what your project does and how it requires external services
It's a voice assistant system. It takes in audio recording through an imnp441 mic and saves it as a recording.wav file. This recording.wav file is further processed with speech to text, then a LLM to generate response, finally a text to speech
Just got my circuit express playground. Just need to find a micro usb cable 💀
quick questiona about the CPE; does it only work if you load only one python file onto the circuit?
Bro who know how to connect pc to laptop
Wow I just found out about wokwi which lets you play around with simulated microcontrollers in a browser.
This is a gold mine
Salute,
I’m an undergraduate in E.E and I have some bg in python… basically, I’m interested in embedded systems, microcontrollers and smart things..
Can anyone help with load of materials (free ones helps better) to get started.. i was researching and saw stuffs like micropython, circuit python, Arduino, Ada fruits, etc.. I need pointes to clear roadmaps, courses, simulation labs to get me started here.
Thanks.
hey im texting from wio terminal
Hi mate, honestly python won't get you far with actual embedded. Get your self a cheap like $0.02 stm and a $1 controller from aliexpress. Theres virtually no way you'll ever in the field of embedded know exactly how much of anything your gonna need cause you actually will learn the limits of your projects as you start expanding it. Learn memory management, quite simple but its an important aspect to learn what this whole junk about low level languages not being safe is, and it'll teach you good programming skills as you will have to make sure your code is both efficient and secure. It'll teach you about schematics, reading them, making them etc.... Aswell as different designs in microcontrollers. It'll give you a small but useful insight into the field of electronics aswell as electricity, and low level system languages. It'll teach you how to read documentations and actually how to research for products you wanna buy as there are soo many trashy stuff out there. Its honestly one of the best things you can do with your time. Take it from someone that has dozens of hours waisted on esps, arduinos, stms, arms, etc...
Thanks RYN, do you have any recommendations for courses online where I can get started with this
I honestly don't prefer courses like this, in the world of microcontrollers not a lot of useful ones exist and the best way to go and learn is by starting with no idea of what your actually doing which forces you to adapt. This is honestly not motivating and isnt fun but embedded Dev is one of the hardest jobs (I've been programming for 7 years and have worked with a lot of stuff in different areas). I feel like you starting out and tryna continue with guidance is one of the worst things you could do for this job cuz there simply isn't any tutorials . ofc you will find some here and there but nothing that will ever guide you completely. So just look into mirocontrollers, sensors, programmers, etc... And find stuff out on your own which will in turn teach you adaptation in a field which is constantly like none other developing , as for help one of the most professional and best servers is the official arduino server
That's gonna be your best bet as users there are usually very experienced
Hey im trying to execute this idea I have for a macro board / steam deck idea using a raspberry pico pi. Would anyone help me with this? im not sure what exactly I need, i'll list all the supplies I currently have: Raspberry pi pico, switches, keycaps.
Guys, does anyone have some experience with using sensors for solving real world problems at a professional level?
yes
can you elaborate ? its not really clear what you want
did you have a question about it ?
i am doing a project on thermistors which will be used for determining the temperature of a lithium ion battery
cool , sounds straightforward
but i still dont understand what your question is
i want some doubt clarifications and suggestions
then go ahead and directly ask the questions that you need help with , dont just say "i need help with this stuff" or "has anyone ever done this X thign ?"
Yea. do phones these days come up with automatic warning alerts which can prevent lithium accidents?
lithium battery safety is a very vast topic , temperature is one of its components.
phones have a dedicated power management IC that manages lots of aspects about the lithium battery in the phones.
and with the help of main controller IC communicating with the power management IC , the phone for sure can give you alerts when there is something wrong with your battery , like if the battery is overheating.
is that all you wanted to know ?
Yea. but how do those things work? Like they directly use a thermistor kinda thing or something else
yes , they use some sort of thermal sensor , either thermistor or very small thermocouple ( i have seen both being used in different kinds of batteries but thermocouple will be costlier as it will need extra components and whatnot)
it mostly depends on the application , costs , what the IC supports etc
but the concept is the same , monitor for the battery temps and if it goes too much , cut off the battery from circuit
I work with resin and I want to make a dispenser to dispense the proper amount of resin and then mix it so I can add colorant by hand and make it so that it's equal parts because that's what resin has to be equal parts of hardener and the resin itself so I want to make a machine that can properly make it down to the gram my apologies
okay , you just totally changed the subject from your original question
but , it is still not clear what help you want exactly ?? like , what is your question ?
Hopefully microbits fit under this category..
I was wondering if there is a way to read radio broadcasts or other data from a microbit using python. I know about BlueZero however it seemingly only works on Linux (based on what the PyPi says). I already have a script that works with reading serial. But I would like to be able to receive data wirelessly. (Without the use of 2 microbits).
If anyone knows anything that can help that would be great :D
When you say radio broadcasts, what exactly do you mean? FM radio? DAB? BLE? Or something else?
BLE I believe. I just need something that can recieve data from the microbit.
So the MicroBit sends data wirelessly, and you want to receive it onto your PC?
Mhm exactly that
Just thought it would be nicer than having to have it usb connected and using serial
BLE is the way to go. There should be examples for the MicroBit/MicroPython side. What OS do you use on the computer?
Bleak is a decent cross-platform BLE package for Python. I have used it on Linux, but should work fine on Windows also https://github.com/hbldh/bleak
Aaa I saw this before. Tho how would I descern the different addresses?
does the microbit support wifi ?
I don't think so
but it supports ble ? huh
So that it can connect with your laptop and download data. I think it is probably to expensive to add wifi support or something
Because at that point may as well be using Rasberry Pi XD
esp32 chip costs like $2 , and it supports both wifi and ble
so its not expensive
what microcontroller does the microbit use ?
MicroBit has nrf52. Do you have a MicroBit v2? Otherwise BLE is going to be ... painful - v1 had too little RAM
ahhh nrf52 , now that makes sense
Yep I got V2 thankfully
looks like BLE is the only viable option if you dont want to add extra hardware
Hmm I might just have to test all the different addresses until I get a hit then I guess
I'll come back if I can figure something out. Thanks for the help guys :D
Huh? BLE has advertising - you can set a name for your device, to be included in advertising packets. Then you can monitor for BLE advertisements on your PC (or phone)
Hmm most of my packets recieved has None as the name. Maybe I didn't set the name of the microbit..
Now how would I go about doing that 😅 ..
Is it possible for python code to be translated into mini python
what is mini python ? i have no idea what you are talkin about
Mini python is used for microcontrollers from what I've heard
MicroPython is a separate implementation of Python for microcontrollers. It supports a decent amount of the Python language, but not everything. Also a fair bit of the standard libraries, see micropython-lib git repo. Third party libraries are completely different. So if you have code that works with CPython you must expect some manual porting effort
i think you are referring to micropython (which is not mini python )
and no , you cant directly just translate your python code to micropython
mostly because micropython librarywise is different from regular python
Oh my gosh.. I'm so stupid. I didn't put the microbit in pairing mode thats why it hasn't been showing up...
i mean it doesn't matter anyways, even with lower level languages like rust you'd need a good amount of memory to have your application running on it
thats why c/cpp is prefered
or more or less most languages can't be used
i mean you always have alot of more expensive microcontrollers that can do it but your limited in a sense
and in the world of electronics 5$+ is actually quite expensive so that'll put into prespective what im tryna say
we cant say , it all depends on the code in question
micropython works pretty good on modern microcontrollers like pi pico , esp32 etc
which are like $4
you have a thousand esp32 versions
different stuff meant for different things, don't see how all of them will supports micropython
what
recommending something generic like esp32 can be misleading
and yeah no shit sherlock ofc the pi pico supports micropython
i am not recommending anything to anyone , i am giving you examples of microcontroller where micropython runs pretty well
what the fuck is your point then ? you are saying that "you would need a good amount of memory to have your app running on it "
and i am showing you how a cheap pi pico or esp32 can run your micropython app just fine , and how you dont need to worry much about memory
maybe for a tinkerer a pico or a esp32 is cheap
but not for anything beyond that
i mean maybe you could get some cheap esp chips in a huge bulk
any yes you do need to worry about memory
what even are you saying
we are not setting up a factory to produce 1 million products by shaving off every bit of cent
most people asking here are hobbyists
its a pi pico or esp32 , its cheap , buy it , use micropython on it
you dont need to be scared of memory
yes but as soon as you go to work for a factory that does that they'll put a 32mb stm in front of you and tell you your job
and making them aware of all the possible options is our job
not some bs your came up with
expectations for what ? they dont wanna work for a factory , why you considering they want to ?
and sure , learn stm32 if you want to as well
but that doesnt mean you shouldnt know aobut esp32 and pi pico ( which is what you are implying here )
why not
because not everyone wants to do this professionaly ?
id rather have someone worrying about memory than somebody buying something and finding out later
we cant comment about imaginary code , it all depends on the code
micropython or circuit python is excellent paired with microcontrollers i stated above
it can do A LOT of things , even with all hte memory constraits present
bruh what are you saying
ok here is something from their website
Note that there are several varieties of ESP32 – ESP32, ESP32C3, ESP32S2, ESP32S3 – supported by MicroPython, with some differences in functionality between them.
So off the bat the H series isn't included there, and specific S and C series are supported
micropython is obviouslly hardware dependent , just like other languages like c/c++
what even are you trying to say ?
so either tell people to buy one of those or just don't say anything about products
i told you that AFTER you said all that stuff about how it doesnt matter and allat , not initially
how about you go back to watching better call saul and call it a day buddy?
how about you mind your own business and not tell what to do to other people ?
yeah mb for giving people good advice
you just stormed in with no point and managed to create unnecessary noise , bravo
plz dont sue me sir 🤣 goofy ahh guy
anyway , looping back to this
show your code , we will see what can be done
no there's education too, so RYN has a point
the future should not be built upon broadcom closed chips and adafruits breakouts ( even if they are wonderfull to start with )
what should the future be built upon? just curious, not trying to argue
sadly by using local mcu foundries, but an awfull lot of countries have lack of them
so it is just wishfull thinking for now until open hardware spreads
pi pico is open source last i checked
and ESP32 has huge market share and people use it , even if some might not like it
sure, i will correct myself
"not everyone wants to do this professionally , some do it because they like it and want to , not necessarily because they want to work as a product designer in a company "
to be clear , i am not at all saying people shouldnt use STM32 , people absolutely should use them , they are wonderful chips
more soft cpu would be nice too
A soft microprocessor (also called softcore microprocessor or a soft processor) is a microprocessor core that can be wholly implemented using logic synthesis. It can be implemented via different semiconductor devices containing programmable logic (e.g., FPGA, CPLD), including both high-end and commodity variations.
Most systems, if they use a so...
BUT
there are also chips like esp and pico that are just as capable and wildly popular (at least at the hobby project level)
Well I was trying to see if there's a way of converting my code because I want to make it so if you put in how many liters or grams of regular resin you put in at pumps in an equal amount of hardener and it tears or subtracts the weight of the cup in grams my apologies @elfin sphinx
^
- No need to apologise after every sentence
- what do you mean " convert your python code to micropython" ?? Converting python code to micropython would mean that you already have a python code that does what you want . Do you have the machine ?
what exactly is happening ? can you give as much detail as possible about it ??
and yes, if you have the code , as already pointed out , show your code
are you like , looking to create the hardware as well ? or you have a ready to go machine that has all the mechanical assembly done and you just need to program it ?
yeah and if it is a one build , the shortest path is probably telemetrix or firmata + the cheapest arduino hooked to a PC
sometimes no need to make a tailored solution generic will do
Well I want to know if I could transfer python code into micropy so it makes it easier if I'm having a problem at least I know that it might be a translation error from python to micropy I'm going to be working on it I just need help with figuring it out
can you show the code that you are trying to translate ?
and explain what help you need exactly ?
#===[import]===#
From time import sleep
#==============#
Sleep(3)
Resin=int(input('how much resin are you planning on using? In grams /n'))
Mixing_cup=20 #grams
Harder=resin
Dispense=resin+Hardener-mixing_cup
Print('dispensing...')
Sleep(4)
Mixing_question=input('would you like to have this unit mix your resin parts?,yes or no\n')
Sleep(4)
If Mixing_question.upper=='YES'
Sleep(6)
print('mixing')
#time that would take to fully mix the resin
elif
#take off plate sorry
okay , lets say we translated this code to micropython
how would you run it ? like , where is the actual microcontroller that will run this code ? where is the pump that will dispense the resin ? where is the weighing sensor that will weigh the resin as it is being poured on a plate ?
I'm working on that I'm just need to find the right parts ones that can be easily be changed if needed and everything else I'm just seeing if I could get python translated into micropython to make it easier after I get it done I was thinking maybe a micro Arduino but that might not work so I have to look for micropython circuits sorry
@elfin sphinx
Yes I'm going to be working with pumps it gets the weight of the silicone cup before takes how much resin you need in equal parts take away the cup in grams and then asks for the mixing the reason why I thought of mixing it is to minimize air bubbles because I tend to get a lot of air bubbles in my resin sorry
-
You cannot "translate" your python code into micropython , thats not how that works. Micropython is similar to python in terms of syntax and some standard lib functions only, but most of other stuff is different.
-
So you will need to write the code in micropython itself , you cant write it in python and use a tool or smth to convert it to micropython.
-
Micropython is hardware specific , meaning , the stuff you write for one microcontroller will be slightly different than the other. Also ex. you will need to use the
boardlibrary in order to manipulate pins of your microcontroller or use them in general (this library is not present in your python , so how would you write code in python and translate it to micropython ? ) The choice of your motor (pump) , the choice of your sensor , etc will affect the code you write. -
This can be a pretty "intermediate" level project along with the assembly you will have to do and whatnot. ( what i mean is , this is not an easy project aimed towards a beginner)
I suggest you start with designing your machine , where you want the parts to go etc , choosing the parts that fit the requirements , etc etc
then worrying about writing the code after that is done
I have a design in my head it's supposed to be small it's going to be a multi-base resin type of printing and mixing station where I can do multiple things at once with resin so I just don't have one device that makes resin for epoxy moles but can do resin printing make prototypes instead of using a 3D printer although I would love to use a 3D printer it just doesn't get the right amount of detail plus it leaves strings where they might be supposed to be no strings and causes a jam and then you have to make sure that filament is undamaged otherwise it will break off due to dry rot sorry
is it worth buying an raspberry pi as a beginner/intermediate programmer? i wanted to test out some physic automations and learn more about hardware but idk if it’s a good investment
Go with what you think might work it's not really up to us because we might say something specific that might dissuade you so go with your heart my apologies
why are you apologizing ? you havent done anything wrong
i understand you want to make some sort of machine that mixes different resins , correct ??
i cant understand clearly what you want to say , its all confusing
i dont know what you mean by "physics automation", but if you want to get into hardware, you should start with something like an arduino uno and a kit of basic stuff like breadboards , wires , etc etc
raspberry pi is just a PC shrunk down in size , is there a need for that to you ? if yes, then buy it , if not , then dont
i mean like, programming your coffee machine to heat up 10 min before you wake up or something like that
i was also thinking on using it to run a small server soon as i enter web development
well that would depend on the specific machine , if it allows you to automate it or not
but in general , to get into hardware, arduino is the most used path
rpi is decent as a web server ( but there are cheaper alternatives out there like a second hand laptop)
Does anyone have any learning resources for raspberry pi?
which raspberry pi ? model ?
also what do you want to learn when you say "learning resources" ?? there is LOTS of stuff to learn about rpi , what do you want to learn specifically ?
raspberry pi 4
Automation and robotics
what kind of automation ? and how much electronics knowledge do you have ?
i'm currently in my third year, studying electrical and electronic engineering
ahh great ,then you already have a decent knowledge of electronics
there is not really a "curriculam" or "roadmap" to learn these kind of things , you just start doing stuff , and learn stuff if you encounter something new
if you feel like they are taking some X thing for granted, learn those things and move forward
i am sure some people here will have some resources that might help , but the key imo is to just do projects and try out new things
ex, lets say you want to make a simple 4 wheel robot that can move when you press certain buttons ( rpi here is a bad choice imo , its extreme overkill , but oh well 🤷♂️ )
you would start by figuring out how many buttons you gonna have , what each of them will do , and laying out the general outline for the project
then you would divide the big "robot building task" into smaller subtasks , like firstly you would learn how to interface 1 button with the rpi , then how to interface multiple buttons with the rpi , then learn how to drive motors with rpi ,then learn how to do both button press detection AND motor driving , etc and then build from there.
and for learning this kind of stuff , i just use google and youtube , literally just google "how to do X with rpi" and read and watch bunch of stuff , and then continue this again
best learning resource is coming up with the stupidest idea or some childhood idea and tryna build it
don't put any expectations on the thing your gonna do
don't start dreaming about how cool your stuff is gonna be
just think of something and build it
What's the best way to control robot from website connected to world?
or easiest. I mean from a persons own website,
me use python-wasm in a webpage and telemetrix over websockets so no need for website at all just a browser
less latency and less points of faiture in the link
Nice, do u have a video you recommend to learn how to do it by chance?
there should have been a french video last pycon FR but sadly technical issues, so only doc is some slides and test code
but if can get telemetrix first to work without websocket then it will be simple
as long as you start from tested code here https://github.com/pygame-web/showroom/blob/main/src/test_telemetrix.py
was used to drive both the real thing and digital twin and with webcam feedback for telepresence
This is really cool thank you @spiral sandal
I made a Domain name subdomain from 000webhost site that uses sql to control led but was difficult to change all the codes to make other functions work while keeping WiFi esp32 connection from disconnection or connecting at all @spiral sandal
i used esp8266 and did not have trouble, and from outside/wan i use nginx ssl+websocket wrapping instead of just websockify/lan
could be fun to have esp32cam doing both robot control and visual feedback and have micropython on it https://github.com/lemariva/uPyCam
To try everything Brilliant has to offer—free—for a full 30 days, visit https://brilliant.org/SamMeechWard/ . You’ll also get 20% off an annual premium subscription.
Control anything, build AI edge devices, or just host your web apps. A Raspberry pi really is the Swiss army knife for developers.
Chapters:
0:00:00 - What is a Raspberry Pi
0:01...
Its a swiss army knife
I have a curse of frying them
tbh if you are doing compute stuff , a raspberry pi is not required
you can do everythin the pi can with a spare computer or laptop you got lying around
by no means you need to buy a new pi
only appealing factors to buy would be the form factor and power consumption imo
I use pi48gb for saving power, does like 25 to 50% of what i7 does matching i7 8gb.of memory. Way faster booting on pi. Vs code and cura run nicely on it. Arduino ide run s great on pi,even better than my i7.
you didnt just compare a rpi4 to a i7 machine 💀
rpi is fine for light computing and web browsing and stuff , but its limited
a full fledged desktop processor like i7 will obliterate the performance of rpi4 in terms of heavy workloads
i dont know if i want to downgrade to a severly limted PC just to save those 20 watts or so
Im still on one one of those old spinny drives on the i7. I do feel rpi4 is faster than i7 in compiling code on arduino ide. My i7 takes a half hour to boot and with rpi4 I don't have to feel bad for leaving it on for a couple days like the i7 and its power hungry 3gb gpu. For work I can't do on rpi I do on i7 but for everything else the the rpi smashes the numbers very well, just lacking the higher quality video on youtube. I've never ran Linux Natively on the i7 only windows but maybe I should?
200 to 250 watts on pc vs 10-15w is much bigger than a 20w difference. I don't look as.a.downgrade, more as complimentary
again , rpi is fine for light desktop usage
also , your PC is bottlenecked by HDD most likely , swap it out for a SSD ( nvme preferred )
if your PC actually takes half hour to boot , there is probably something seriously wrong with it
Yeah I think I changed the virtual ram a while back, might be that or a old hd. Never used a ssd as of yet but I can't wait to try
i just quoted what you said here , i dont know what power your machine consumes
I use pi48gb for saving power, does like 25 to 50% of what i7 does matching i7 8gb.of memory.
a pi 4 consumes around 20 watts to 30 watts , and you said its 50% of what your i7 did , so thats a 20-30w difference
I ment 25 to 50% of software on windows I normally use, my apologies for not being more clear
try running a benchmark software , you will see the difference
try to run a game , you will see the difference
try to run AI/ML trainings, you will see the difference
try to do photoshop and stuff, video editing and stuff
if all you ever do is light desktop usage then by all means use a rpi
but i doubt thats what devs do , most of them need the full fledged machines
yeah Photoshop and video editing I would not. Browsing reading, compiling, running generic discord apps work great on pi with just sd. Pi seems to be running vs code decent and loads faster on raspbian than on winodws. Pi loads 20 to 30 browser tabs no prob. So many things Linux can do that Windows can't do the same
Like instaling soft from terminal. I'm amazed how much new software runs on raspbian these days. Its like every year more mainstream soft gets ported over. My windows matching wants to go into update mode or doing something with HD that slows it down every time I use if, its super anoying, I need to reinstall, way overdue
all the examples you just listed fall under the "light coputing" umbrella , which the rpi can do just fine
True
and yes , HDD is a very bad bottleneck for PCs , change it out for SSD, you will really feel the change ( try to go for a m.2 NVME SSD if your mother board supports it ) , if not SATA SSD are always there
as long as your machine is not very old , the SSD should pretty much fix the speed
and you might want to change the SD card in the pi to a SSD or smth similar
SD cards will wear out overtime and will be corrupted
Nice thanks for the tip, I'm strapped for cash but one day ill make it happen, what have u been been up to for developing lately?
I need to do that . I have a good one but its kinda old now already. Seems good, I need to backup everything and hope for the best for now
nothing much interesting
but i do have an interesting project idea in mind , a gesture mouse
like i hate having to use mouse just to click the little thing and then go back to keyboard . So i want to make a BLE glove that i can wear on my hand that will have mpu6050 IMU units on two of the fingers , and with gestures that i would do on a trackpad , i can do in the air and then the glove can interprete it and send as mouse commands or smth
its just the idea , i still havent worked out the details , maybe i can give it more time on the weekends and figure something out
how aobut you ?
I love that idea. Anything g to make life easier and more egonomic. I used rotary on esp32 to control wheel like a mouse wheel to scroll up and down a webpage. I used ai to smash up some code atoms and it worked. It connects via ble flawless and actually useful. I hope you make your idea and share it, I really like glove controllers since nintendo
ill have to check out those mpu6050
nice
sure, ill upload it on gh and send the link once its done
Awesome. I been holding off on my plant watering project. Just needs one last feature implemented and I think its ready for prime time
what feature ?
the code is so long its hard for ai to do it all correctly a lot of the time but more or less was taking a break for the project. I was able to put a clock on it so waters at certain time s with certain functions and many other features makes the code a mile long
Reverse motor after it waters to clear the tube
i kinda dont like using AI to write code for me 😅
it feels like i have to spend more time explaining him what i want to happen , correcting its shitty code , instead of which i can just write my good code in the first place
ahh ok
I'm slow to learn code and horrible writing and remembering what to write but I'm good at understanding and editing on many code structures once I'm familiar
but to correct and edit code , you would need to understand what the correct code is , in the first place
If you can add that feature to my code that would be amazing, I tried a few times bit I keep breaking code lol
when/if i have the time , ill ping you , send over your github repo , maybe ill take a look
Ai breaks down what I don't understand and what I don't understand I experiment with and what I can't figure out I try and if trying don't work I move on to the next thing. Kinda patchwork like but until I learn to write code its what I got
or you could just ask your question here directly
maybe you should drop messing with AI and learn to code
you are not in a race , its fine if it takes a bit of time , everyone learns at different pace
Ok, I don't have github but I can use paste in or something. Thank you, I have some coding apps and to learn c++ basics and a couple pdfs, I have an adversion to some math cause it boggles my brain but you are right 100%
I'm still learning c++ features and its versitility, its mind blowing how complex it is, I love it. It at the same time I'm like "what does it all meen"
<@&831776746206265384>
!warn @worn whale No advertising here. Please read our rules
:incoming_envelope: :ok_hand: applied warning to @worn whale.
I'm working on a small project, where I'm trying to connect my Arduino Uno with an Xbox controller, but I'm having some trouble understanding the Xbox controller wiring.
Question: How can I configure it to look left, right, or have no input (off)?
- To look left: I send a + signal to the pin.
In other words to look left: You send a + to the pin on the right
- To look right: You need to connect the output of the "look left" pin to the pin next to it (I'm not sure if this is correct).
In other words to look right: You have to connect the left pin to the right pin
Problem: I don't know how to set it up so I can control looking left, right, or neither.
Here are a few pictures to help explain.
"connect my Arduino Uno with an Xbox controller"
cool , show us how you have connected it , show us the wiring diagram/ circuit diagram and a photo of how everything is connected together
look left where ? look right where ??
how can an arduino look left or right ?🤷♂️
its just xbox controller connected to an arduino UNO right ?
also those pictures tbh dont really make much sense to me if i am being honest
please explain ana overview of what you are trying to do
Ok, first, I apologize for not including a diagram. I don't know how to create one, so my bad.
"Look left where? Look right where? How can an Arduino look left or right? 🤷♂️"
I mean on the Xbox controller—I want to make the right joystick move to the right or left (to look right or left).
"Isn't it just an Xbox controller connected to an Arduino UNO, right?"
Yes, but it's not connected through a USB. It's like PIN 13 connected to button A, etc.
"Also, to be honest, those pictures don't really make much sense to me."
You're right. I was trying to show how the Xbox controller is made, but to be honest, I don't even understand it myself. Someone who doesn't understand trying to explain is not the best combo.
"Can you please explain an overview of what you're trying to do?"
For example, I want to play a game, and I need to walk to the objective. To do that, I have to look right and then left. But I don't know how to make it so I can look right, because you need to have the two pins "connected" (I think, I'm not sure). I can't use a +, - , or GND.
As I'm typing this, I've realized that if I use a 3.3V on the right pin, it will make me look left, and if I use a 5V on the right pin, it will make me look right.
I think I've solved my problem.
Thank you for the help—just talking this through with you made me understand it better! 😄
so i assume you want to connect the buttons of the xbox controller to directly arduino , bypassing all the electronic circuitary in the controller and using it just for the buttons ??
if yes, firstly get 4 tactile switches, hook those up to the arduino , and get the USB communication between your PC and the arduino working
figuring out how to wire up the switches in the xbox controller is the easy part
arduino UNO does not have the capability to act as a USB HID device built into it , so i am not sure how you are going to do the USB part
i assume you want to connect the xbox buttons to your arduino UNO and then connect your arduino UNO to your PC via a USB cable and then have the arduino UNO show up as an "xbox controller" , is that correct ?
Fist I'm not making a Xbox controller, in this aspect all I'm doing is tearing a light on and off but for me I'm using a Xbox controller. so like if I want to look left I tern the "light" off/on
"if yes, firstly get 4 tactile switches, hook those up to the Arduino , and get the USB communication between your PC and the Arduino working"
No?
"figuring out how to wire up the switches in the Xbox controller is the easy part"
Not doing that.
"Arduino UNO does not have the capability to act as a USB HID device built into it , so I am not sure how you are going to do the USB part"
I'm not going to, I'm planning on just having this as like a "macro" but for Xbox (the console)
"I assume you want to connect the Xbox buttons to your Arduino UNO and then connect your Arduino UNO to your PC via a USB cable and then have the Arduino UNO show up as an "Xbox controller" , is that correct?"
No I'm having it as like a thing to play games, more or less for me on an Xbox.
ohhhhh so you are modding your xbox controller so that you can turn on some LEDs depending on what direction button is pressed ?
no
💀
do you want the xbox controller to function normally , as it was before, after you have done whatever you have done with it ?
I am really confused as to what you want to do actually
ex - " in this aspect all I'm doing is tearing a light on and off " , i have no idea what tearing light means , like are you fading it ON and OFF ? like dimming or smth ?
"so like if I want to look left I tern the "light" off/on " , "look left" as in when the left button is pressed ??
and "i tern the "light" off/on" , which light , i wasnt even aware that you were using some LEDs ??
please assume i know nothing about it and explain without ommitting anything
i mean that as like the A button is a "light" you tern it on and off
like i want to jump i have a + send to it. i meant the light as a figurative object ig
you cannot "turn a button on or off like a light" , that makes no sense
its an input component , not an output component
kk we done
Is this good if I'm a newer person to Soldering and working with Microcontrollers? Amazon.com
should be fine for quick solder jobs like soldering pin headers to arduino and such , def dont use this for longer sessions
and these soldering irons have a tendency to work fine for a few days and then suddenly stop working after a while , so dont expect this thing to last long ( it might last long but the chance of it breaking is much much higher )
Do you know of good one's for newer Soldering users?
and is not like $100 USD
i dont have a specific link , but i had something similar to this and it has lasted me for a LONG time
it was for like $12 or smth , it has no adjustments or anything , so it just straight up goes to max , but i have done soldering with it just fine
usually the more shit they try to shove into less money, and make it adjustable and shit , the less reliable (in my eyes ) it is
So you're saying just get a basic type and that should be better lol
yes
kk ty
i have the fancy one too , i dont use it much , it is very limited in terms of its heat output
it cant even melt a medium solder blob properly , it cant solder more than 3-4 simple hookup wires properly , it struggles to generate the amount of heat needed, even at max temps set
dang
does this look good https://www.amazon.com/Soldering-Ceramic-Adjustable-Temperature-Repairing/dp/B09DSDBC7G/ref=asc_df_B09DSDBC7G/?tag=hyprod-20&linkCode=df0&hvadid=693642117589&hvpos=&hvnetw=g&hvrand=10768321737287857887&hvpone=&hvptwo=&hvqmt=&hvdev=c&hvdvcmdl=&hvlocint=&hvlocphy=9009387&hvtargid=pla-1463066031535&mcid=c7454086624038eca5e8e210b45580a8&gad_source=1&th=1](https://www.amazon.com/LDK-Soldering-Adjustable-Temperature-Replacement/dp/B083L8BXRC/ref=asc_df_B083L8BXRC/?tag=hyprod-20&linkCode=df0&hvadid=693071814223&hvpos=&hvnetw=g&hvrand=10768321737287857887&hvpone=&hvptwo=&hvqmt=&hvdev=c&hvdvcmdl=&hvlocint=&hvlocphy=9009387&hvtargid=pla-883826104031&mcid=bd96e04bbbf5348f9013f3b7d34c8f85&gad_source=1&th=1)
looks the same as previous no ?
dang it wrong link lol
1s
dang it the link i had saved did nott save
This is $18 ish USD thats not bad, ty
nw
(btw i didnt mean that one specifically , its just an example i found , i bought mine from a local shop, its similar to this one without the light at the front )
mine is 50 or 60 w , i dont remember exactly , but it has no problem generating the heat , it can melt big blobs , can solder loads of stuff no problem
ik ik, i just found a different one and its 60w.
yep looks good to me , no unnecessary bits and bobs , just a basic soldering iron
and hakko is a good company too , so looks good 👍
try to see if you find extra tip for this one , this one seems to have a conical tip , try to find a chisel tip too if you can ( if you cant its fine too , it just means that you have to use your current tip with a little care since you dont have a replacement and some solder jobs would require extra effort )
also you might wanna get a brass solder tip cleaner thin , it keeps your soldering tip clean
What is a good type of solder for this type of stuff?
the brass cleaning thing is not exactly required if all you do is small solder jobs , but its pretty good in keeping the clean tip
Oh I see that's nice to know
i dont research about that one lol , i just buy whatever our local shop has
most of the stuff should work just fine tbh , buy a solder paste box as well , it makes it easy for solder to stick to surfaces
if you want to know the diameter then my solder wire has 0.6mm diameter
Nice. What is the solder paste needed for?
is it for like bonding
lets say you have a surface where the solder is supposed to stick to , but it isnt , you can apply this paste over that surface and it will make the solder stick to it (usually , in most cases , in some cases you might have to roughen the surface up a little)
an example of this is wires , a lot of the times , when you strip some end of a wire , solder sometimes likes to not stick to it , which makes it hard to solder them
but if you just dip that end of the wire into the paste , and then reapply solder to it , it works !
i think there are some solder wires that have a hollow core that have flux inside of them which makes it easy
but i have the paste on hand anyway, its 50 cents , dirt cheap
Oh that's great to know thank you.
if im going to be buying an ESP32 is this the one i should be buying?
i've used arduino a lot but never any other brands of microcontroller boards like this
most cheap reflow/rework stations also often have a soldering iron attached with adjustable temp. it gets you set for real work and less cables in the end
esp32 makes a range of different products and microcontroller boards
the selection of correct one will depend on the project
if you wanna buy for learning purposes , then sure , S3 is fine , so is S2 and so is the most basic one commonly called only ESP32
you will probably buy more than 1 type of esp32 boards when learning
if you can , go for S3 , its the newest one of the three
https://gist.github.com/sekcompsci/2bf39e715d5fe47579fa184fa819f421 here is a quick comparison char to compare different features of the most common boards
esp32 c6 is also pretty cool , it supports new wifi 6, 5.0 bluetooth
and what about like devkit vs not devkit ? I wasn't really clear about what that meant
so ESP32 S3 in itself is the small rectangular chip that you see at the top of that board
devkit is like the board they made which has these other components like USB to serial chip , the voltage regulator so that you can power your chip with USB , etc etc
this board makes it easy for you to use and work with the S3 chip
thats pretty much what devkit means , probably short for developement kit
it seems like boards are either N4, N8, or N8R8 so im assuming those are just the steps in like "how much memory the boards have" like would an N4 be too slow for like, pretty simple projects getting simple communications over wifi and/or bluethooth where timing isn't too important?
like are the big differences between what i could do with an S3 N8, a C6 N8, and a C6 N8R8 just that the S3 is (older and not rlly better in any way other than more documentaiton?), the C6 N8 is just slower than the N8R8?
sorry, i realize these are prob really dumb questions
those numbers probably represent the flash size and external psram
more is usually better , but those things are not that required
flash size is relevent if your program is very huge , for simple stuff (and in cases even some complex stuff , you will not be exceeding the default , so dont worry too much about it )
PSRAM is external RAM for extra usage , its relevent if your program needs to hold lots of data in the RAM , like maybe image processing or smth like that
so bigger is better , but dont stress too much about it
S3 is a dual core processor running at 240 mhz , it is more powerful than the C6 , C6 is a risc V single core processor running at 160 mhz
there is alos some other differences as listed out in the link
3
its not dumb , esp32 has loads of boards and it can get pretty confusing even for people who have worked with it before
if all you want to do is some wifi and bluetooth stuff , you can buy the regular ESP32 , it is available for like 5 bucks or so and does those things like a piece of cake
general rule of thumb is that
ESP32 S series is for high performance tasks , C series is for low power , mid performance but high cost to performance stuff
ok, i swear this is my last question: when you've been using a c6 do you feel like the documentation and stuff has been worse than an S3??
i know that's kinda a weird question that's probably not too quantifiable, im just wondeirng that since it's newer there's a noticeably smaller amount of info about it online
like is coding on them a wildly different experience if you just wanna use the same features
ok wait that's a really good summary! so if im using pretty small quantities where the difference between a C and an S is only going to be a little bit for the whole project and it's not gonna require crazy high performance, then i should go w/ C series right?
i havent used C6 yet so i wouldnt know
but its been quite some time so i "assume" that the docs shouldnt have much of a difference in terms of quality
again depends on why are you buying the board
if you want to buy it to put it in a circuit and use that circuit , then sure , choose the C series if the task is not that intensive or S series if the task is intensive
but if you wnat to buy it so that you can learn more about esp32 , then i would say go with the S series so that you are not limited by the performance
if you want to gauge according to resources available , the basic ESP32 by far has the most amount of information about it on the internet
does it have wifi and bluethooth tho?
ofc
this thing
it supports wifi ( 2.4 ghz ) , bluetooth classic and BLE (4.2 i think )
ok cool! i think i've mostly just been getting caught up in the names of things i dont know (my goal of this board was to learn about it while using it in diff projects) so i was hoping to try to find something with a BUNCH of info that would also work as both "basically an arduino w/ wifi and bluethooth" and as a more powerful board once i learn more about it
this would fit the definition of "basically an arduino with wifi and bluetooth" pretty nicely
cool! and im assuming for the ammount i know, the 2u or things like that won't affect me at all that much lol?
2u ?? not sure what you mean
u2 lol or like u1
ill send a pic
those
like the 2u at the end or 1u at the end
maybe it's some sort of like version tracker?
oh wait maybe it stands for update?? so like the U is the more (updated somehow? idk) one
umm , not really sure
check what esp32 they are using and its specs
i would try and stick to the standard boards
ESP32 , S2, S3 or C3 , C6 these are the mainstream ones and by far the most popular
as long as the board uses one of these chips as its core , it doesnt matter that much what the other naming they have going on
ex there are probably 100+ differnet types of boards that use ESP32 ( the basic one ) as its main component , all of them are more or less the same , they differ in minor aspects or have some extra features like a built in screen or Lora module or smth like that , but the brain is still ESP32
what you have shown here , i havnet used it , i dont what it is so i cant say if its good or bad
what i can say is i havent seen this board used that much
ok, well thank you so much! this has been super super helpful!!!
if you want help , show us your setup , the code that you ran , the error it gave you, explain what is supposed to happen and what actually happens
i burned the screen i think because i tryed the same code on another board and it works fine
i'll just use that one
oooof
what course or tutorials do you recommend for starters? I have seen few videos to get an idea how they work on a higher level. A structured approach suits me.
Some of the resources i explored had a big load on number system, conversion and so on. I am familiar with those concepts and unsure how much of those I can skip
Since electronics in general is a vast field and there is just soo much to learn
what you learn depends on what you want to do at the end of the day
till now i have not seen a good "roadmap" for this kind of stuff, the usual way is to just buy an arduino or smth , buy a sensor kit or whatever beginner kit and just start making stuff
when you encounter something you dont understand , learn that topic and so on
https://embeddedartistry.com/beginners/ there is this that tells you stuff about being an embedded dev
that's really great thanks!
i have seen esp32 mentioned mainly in what i explored so far, and that it has many features. i have no idea about either arduino or any other micro controller. which one do you think i should start with?
my way of learning is starting out with the hardest stuff and take a long time figuring it out by looking up every topic and self learning. I'm thinking of going the same way for this
esp32 is pretty cool , but i dont think its a beginner board
if you are brand new , you should start with arduino UNO R3 imo
UNO is a simpler board, and its probably the most popular beginner board for people who wanna explore this stuff
it has loads of amounts of shields and so on that you can plug into it to make different things
it also has huge documentation/resources available, so if you are stuck , you are pretty much guranteed to get an answer online
i dont think you should start with complicated stuff , start simple
its like sitting in a F1 car trying to figure out what every thing is and how to drive it when you dont even know how to drive a regular car
when you say online are there any communities or basically online