#microcontrollers

1 messages ยท Page 8 of 1

elfin sphinx
#

what i meant is stuff like online blogs , youtube videos , maker sites , etc etc etc

but sure , there are communities for this stuff on discord too

there is the official arduino server, and bunch of other electronics/embedded related servers

#

there are some reddit communities too

bitter swallow
#

oh nice good to know

#

is there a significant gap between them?

as someone who never touched, I see it as simply attaching wires and coding

#

there's more to it, which i have yet to know

#

i was going to choose adruino after light research, esp32 looks cheaper

#

i have to rethink

elfin sphinx
elfin sphinx
# bitter swallow i was going to choose adruino after light research, esp32 looks cheaper

well it would depend where you are looking , here i can get an arduino UNO cheaper than an ESP32

dont try to buy the "original arduino board" , its VERY expensive because its geniune board ( like $25 )

because arduino is open source, chinese manufactureres have copied its schematic and made countless clone boards ,you can get these boards for a fraction of a price ( usually around the $3-4 mark )

#

you could ( and should ) get both boards imo

start with arduino UNO , get familiar with simpler stuff

then when you are ready to play with stuff like wifi and such , move on to esp32

willow star
bitter swallow
#

amazon shows adruino as $5 more expensive

elfin sphinx
# willow star Are the cheap clone boards (at least mostly) as good as the original? In the sen...

yep , its the exact same working wise

the clones are cheaper because , firstly they are made in china , and secondly because they might not be using the highest quality components , so for long run the reliability will be different
but for all intents and purposes , the clones are just fine , i have only ever used clone boards except when they provided us the "genuine" boards in college
difference is mostly just in terms of PCB color difference, components looking a bit nicer and everything , functionality wise , they are pretty much identical
yes, you can use the same IDE , the exact same code on either and it wont make a difference

if you are curious about the difference between them , i think the arduino server has a thread or a post or smth about this topic

elfin sphinx
# bitter swallow amazon shows adruino as $5 more expensive

i cant even remember the last time i bought electronic components from amazon

amazon sellers price their stuff terribly , you should use a more electronic focused site

firstly take a look at your local electronic shop , see if you find it there , if not , check for local websites , if not then there are sites like mouser, digikey , adafruit , etc
and last but not least , there is always aliexpress

elfin sphinx
willow star
elfin sphinx
#

if you are that tight on budget , then sure ig , buy an ESP32 , its not a bad option either , just not what i would recommend a beginner to go with

#

(you will need stuff like breadboard and wires either way btw )

bitter swallow
#

wait a minute

elfin sphinx
#

kit is what i would recommend too

bitter swallow
#

i can buy a kit for one

#

and just the microcontroller for other

elfin sphinx
#

yep

bitter swallow
#

the electric components would work same way with both right?

elfin sphinx
#

yep

bitter swallow
#

cool good to know

#

are electrics from amazon generally lower quality or anything? it's my first time hearing other sites you mentioned (not aliexpress), I'll take a look at them

#

I'm not aware of any shops nearby that provide microcontrollers, let alone the kits

elfin sphinx
#

and sure , since everytime you buy components from amazon , you are probably buying from new sellers , so everytime there is qeustion of "is this seller good or not"

but with dedicated website , the seller is always the same , so after ordering once or twice , you know if a site is good or not

#

amazon stuff is not necessarily low quality , its just overpriced

elfin sphinx
bitter swallow
elfin sphinx
elfin sphinx
#

i dont recommend nano , uno and nano are pretty much the same nano is just smaller in size

but UNO will be better since you are just learning , it supports the shields that you can buy which the nano wont

north badge
#

i get you

#

esay plug

bitter swallow
#

i already put up with learning easy ones while I usually start with most complicated

#

no thank you

elfin sphinx
remote storm
#

Heyyyyyy

remote storm
remote storm
#

Long time

elfin sphinx
elfin sphinx
#

more people , more chances of help , more eyes to fact check if i say something dumb

remote storm
#

So i am planning to build smthg different this time lol(totally not an arcade controller)

remote storm
elfin sphinx
#

i have heard of those yeah

remote storm
#

Is that possible with an arduino or a raspberry module?

#

Like i have the rgb strip

#

Its just lying there so i thought i would build smthg with it haha

elfin sphinx
#

with a raspberry pi , yeah
not sure about arduino

tbh i am not sure how those things work , how they understand what color is on what part of screen and so on
ill have to check

#

its like 2AM and i am about to crash , remind me tomorrow, ill check

remote storm
#

So basically i asked gpt. And it says it takes the input through hdmi, then it looks for the pixels at edges then it just picks up that and changes colors accordingly

remote storm
elfin sphinx
remote storm
#

Hell yeah man

remote storm
#

Wassup

#

Any info on that?

elfin sphinx
# remote storm Any info on that?

not really ๐Ÿ˜…

from what i found , one DIY project makes use of a raspberry pi and USB webcam to check the colors on screen
but it seems a bit overkill to me

imo , an inline circuit that takes the HDMI from PC as input , extracts the color info from that and then outputs the HDMI signal as is
which sounds complicated to me , unless there exist some module for this on somewhere

#

on second thought , maybe you can incorporate something like HDMI splitter which will split the input coming from video source , then send one of that to TV as is
and send second of that to your raspberry pi using some sort of USB capture card or smth

#

TLDR , getting the raspberry pi to recognize the colors on the TV is the hard part , lighting up the LED strip accordingly is the easy part

remote storm
#

Thanks alot man

#

Thats a really crazy amount of intel

#

A question tho, which raspberry pi module do i need and how much will it cost?

elfin sphinx
remote storm
#

It recommended a raspberry pi zero 2 or 3 model B+

#

But it added a note that if i plan to use the cheaper zero 2 i must use a capture card along with it

#

To make it more efficient

#

It cant handle it lol

#

๐Ÿ’€

elfin sphinx
#

honestly speaking , i dont give a crap what GPT says , it a toy AI at the end of the day

remote storm
#

Hope it doesnโ€™t advance that much in next 5 years

#

๐Ÿ˜ญ๐Ÿ™๐Ÿป

elfin sphinx
remote storm
#

I see

elfin sphinx
#

the HDMI port on rpi is for output , not input

remote storm
#

Any raspberry pi alternatives which are cheaper ? You know me lol i am broke ๐Ÿ’€๐Ÿ˜ญ

remote storm
#

Right

#

You did mention that earlier

#

Mb

elfin sphinx
remote storm
#

My plan is to make it under 3.5k

#

Lol

elfin sphinx
remote storm
#

Yeah

#

It costs like 4-5k to buy the same thing and like 15k for a really good one

#

I was like imma try to make it cheaper haha

#

But ig not everything can be made real haha

#

Imma still try it with raspberry pi zero 2W

elfin sphinx
#

if the rpi zero 2 w can handle the load, your plan would work

remote storm
#

If it fails well i will just make other projects with it

#

And play with the board

#

Its a win win lol

#

๐Ÿ˜‚

remote storm
#

Or lemme check discord list lol

#

I think i can find one with appropriate tags

#

Ohh damn lol

#

Cant post here

#

Can you send in dms pls?

elfin sphinx
#

sure

remote storm
elfin sphinx
#

( if any mod is reading this , maybe you can whitelist the links i sent here that were deleted ?? They are legit electronics communities . I would open a modmail to get them added, but my old one is not yet closed so i dont know what i am supposed to do there )

radiant oriole
#

Hi, This is Sayed.
Im working on pymodbus simulator; i having some problem, Anyone can help me?

elfin sphinx
cloud hinge
#

@elfin sphinx are you familiar with ble coding and raspian?

elfin sphinx
cloud hinge
#

@elfin sphinx good morning

#

I spent all yesterday trying to write code with ai to get cool functions but only got a couple working but working good

elfin sphinx
elfin sphinx
#

if we talk about stuff i like , then its the embedded stuff , i dont like doing simulations , designing analog circuits and all

#

unless its for some project i want

cloud hinge
#

@elfin sphinx do u know much about services and triggering or starting a python .py file? I'm trying to start from bt but the services don't work in bt pairing on some libraries

errant wigeon
# elfin sphinx ( if any mod is reading this , maybe you can whitelist the links i sent here tha...

Modmails get closed in a variety of ways, and multiple threads/topics in a single modmail are not an issue. It's a communication vector so don't worry about having multiple topics in a single thread unless we ask for managing things on our end. If those servers are servers you think are worth adding, go ahead and open a modmail with them, though we audit the server and sometimes conclude that for some reason or another it's not something we can whitelist

errant wigeon
elfin sphinx
cloud hinge
# errant wigeon could you elaborate on what you're trying to do? Bluetooth in python is a diffic...

Ok the cats out of the bag, I'm trying to program esp32 to a rotary encoder just to use the button on pin 21 to pair with with rpi4 raspian os. I've got it to pair with blekeyboard and blemouse but bleserial library it won't pair. Raspbian says no services can be used on this device with blueserial library. I have a bunch of scripts made to test with mixed results. Script to shutdown says awaiting connection but when I send for instance 000 I want the script to connect to turn off rasspbian os. If I run command in terminal it works to turn off pi. I was also able to make wheel of mouse work on pi with rotary but I thought it would be nice to have a bt wireless power button. Seems related to bleserial. I've used ble serial for other projects successfully but to some reason I get the services issues with that library

cloud hinge
elfin sphinx
cloud hinge
elfin sphinx
cloud hinge
radiant oriole
#

I'm using pymodbus simulator to generate modbus data from a csv file,
i have msp430 based microcontroller, which has been designed with rs485 modbus. From MSP430 micrcontroller it sends request "sending 58", pymodbus receive it and reply the value:
thats the thing.
Problem is : Pymodbus has "frame not ready" message and it cant send to Microcontroller.
Not pymodbus simulator sends it through rs485 modbus module, and micrcontrollers A+, B+ GND pin connected with that pymodbus rs485 module.

cloud hinge
#

I never seen the project done wirelessly so I thought it would be a fun challenge

elfin sphinx
cloud hinge
elfin sphinx
#

the button press is just a signal for the microcontroller to lets say execute a function
you can write whatever you want , however long prompts / commands you want in this function

cloud hinge
cloud hinge
elfin sphinx
#

and i am not sure what you meant by the safety feature

cloud hinge
# elfin sphinx well , you cant really use the RPI to turn itself on when its off , right ?? cau...

Can if you had a dedicated esp that senses somehow if os is on. Could use esp now perhaps. Safety cause u don't want to abruptly turn off computer while os is running. Don't want to corrupt anything. It would be a smart sense that only powers off relay or what not when os is not running, so could have a over ride in software. Like a wireless esp screen to both ble on rpi and and WiFi on the other esp32 to receive comands

elfin sphinx
#

( which sounds unnecessarily complex to me tbh )

#

if your pi is connected via LAN to your router , you could use the Wake On Lan protcol to issue a wake up command to your raspberry pi using any other device on the network

cloud hinge
#

Yes another esp32.

elfin sphinx
#

so there wont be a BLE connection between the ESP remote in your hand and the raspberry pi itself like previous ??

cloud hinge
cloud hinge
#

oh wait your right

elfin sphinx
#

ESP32 while communicating over wifi can take anywhere from 150 to even upto 250 mA

cloud hinge
#

just brainstorming on feasiblity. Maybe someone could have real use cases for it. I don't know if ill make it but great to think things out, thank you

#

I think wireless might be more finicky for deep sleep esp wifi

elfin sphinx
elfin sphinx
cloud hinge
# elfin sphinx not sure what you mean by this

Deep sleep to put esp32 into low power mode to take up least amount of energy but still able to receive packets for turning on and doing things then getting tired and going back into a deep sleep

elfin sphinx
# cloud hinge Deep sleep to put esp32 into low power mode to take up least amount of energy bu...

you cant put ESP in deep sleep and still receive wifi stuff
you need to put it in "modem sleep" or smth similar
the current consumption will reduce than usual , but its still there , maybe you could bring it to 100mA from 200mA , but it will still consume lot of current
(unless that mode is supported in light sleep too, in which case the current will be even lower , but i dont think light sleep supports that )
we usually dont pay much attention to it but ESP32 in normal operations is a VERY power hungry device

cloud hinge
elfin sphinx
#

not to mention that power saving with ESP32 is a vast topic and is tricky to get right

elfin sphinx
cloud hinge
elfin sphinx
#

its complicated to make and hair pulling to debug if you want to save as much power as possible

elfin sphinx
#

how would you know its soo true if you havent even tried it ๐Ÿ’€

#

anyway , those are the options

#

the ESP32 + relay is possible too , just the sleep part is hard to get right

elfin sphinx
#

if you want to know about the " if the rpi is on or not before shutting down" , you could maybe read the status of the green LED that is on the board of the rpi

or maybe you could hook up some wire to some GPIO that spits out data when system is running or smth

cloud hinge
elfin sphinx
#

i am not sure about the exact details , but it should be totally possible to detect if the pi is on or not

elfin sphinx
#

i would suggest you get a relay module btw , and avoid using a bare relay

cloud hinge
elfin sphinx
#

not sure what you mean

#

" software i was thinking that only sends when os is running"

what software ? running where ? sends what ? through where ?

cloud hinge
#

have the software blink a gpio port so esp32 could detect it? Some code or what not that auto runs when os is booting?

elfin sphinx
#

wait , why do you want to know if the OS is running or not before turning off ?

#

the way you turn the pi off is via BLE right ? so if there is a BLE connection , you would know that the os is running

#

or are you referring ot the future project that you are gonna make with the relay ?

cloud hinge
#

so when pushing esp32 button on accident u don't shut off rpi without shutting down properly

elfin sphinx
#

lets say , you want to shut your PC down , and it is currerntly on , what do you do and what do you want to happen ?

cloud hinge
#

with the one click way I made earlier with your help

#

I made it to schedule for one min shutdown

elfin sphinx
#

so for that command to work , the pi has to be on , otherwise it wont work

#

so when you are issuing that command , you kind of know that the* pi is already on

cloud hinge
#

Hte?

#

I see nm

cloud hinge
#

a better way

elfin sphinx
#

you are confusing me a lot

cloud hinge
elfin sphinx
#

maybe post your requirements , types of connections and every last detail about what you want to do ( write it considering that new person helping has 0 knowledge about what you are doing , so you should explain to them in as detail as possible , starting at the start )

someone will help you , or maybe ill take a look later

cloud hinge
willow star
#

Wow, a microcontroller with a touchscreen sounds very cool, I'll need to look into that
Or just working with screens in general

cloud hinge
stone grail
#

Hello I use a raspberry pi Pico and I would like to code it using micro py but I wasn't able to find an optimal IDE, I would appreciate having some suggestions.

elfin sphinx
quasi hare
#

Anyone here knows how to connect HTML to raspberry pi? I want to fetch data from the board and display on the frontend using HTML and then this shud be deployed on server running on raspberry pi. I'm using mqtt protocol

cinder crow
#

Im kinda lost
Which is the correct channel for Machine Learning stuff?

elfin sphinx
#

also , how "live" is the data ?

quasi hare
# elfin sphinx HTML is not something that you can "connect" > I want to fetch data from the bo...

Let me explain the concept to you. I'm using a microcontroller, specifically the Wiznet W5500 EVB, which will send data to your website or HTTP server. This data will indicate whether the band and mat are connected or not. So, the website you're creating needs to function as a client for my device. I'll be sending information via the TCP/IP protocol, and you'll need to receive it as the client.

Additionally, we need to add a page for new devices where we'll input an IP and port. If the connection is successfully established using this IP and port, the status of that device should be displayed on our main page

Using the second method for message transfer via MQTT, we need to create a webpage on our Wiznet W5500 EVB. This means that when you enter the device's IP and port into a web browser, a page will open. On this page, there should be two boxes labeled "MQTT ID" and "Port Name." When I enter the correct MQTT ID and port, the connection with my MQTT server will be established.

But where the MQTT ID and port we provide on this page will go needs to be defined in the device, meaning in the MicroPython code.

this method we use for configuration of our device

Actually we are using wiznet w5500 evb module, Yess it has inbuilt ethernet module , actually it is based on rp2040

We can say it is a combination of ethernet w5500 and rasberry pico

rasberry pi we use here only for data collection fromย ESDย ย Device

#
import network
import machine
import time
from umqtt.simple import MQTTClient

def w5500_init():
    nic = network.WIZNET5K()
    nic.active(True)
    nic.ifconfig('dhcp')
    while not nic.isconnected():
        time.sleep(1)

def connect_mqtt(server, port, client_id):
    client = MQTTClient(client_id, server, port)
    client.connect()
    return client

def is_band_connected():
    band_status = machine.Pin(11, machine.Pin.IN).value()
    return band_status

def is_mat_connected():
    mat_status = machine.Pin(10, machine.Pin.IN).value()
    return mat_status

def main():
    # Initialize W5500 module
    w5500_init()

    # MQTT Broker details
    mqtt_server = '192.168.1.14'
    mqtt_port = 1883
    mqtt_client_id = 'YOUR_MQTT_CLIENT_ID'

    # Connect to MQTT broker
    mqtt_client = connect_mqtt(mqtt_server, mqtt_port, mqtt_client_id)

    try:
        while True:
            # Check Band status
            if is_band_connected():
                print('Band connected')
            else:
                print('Band disconnected')

            # Check Mat status
            if is_mat_connected():
                print('Mat disconnected')
            else:
                print('Mat connected')

            # Publish Band status to MQTT
            topic_band = 'topic/Band_Status'
            message_band = 'Band connected' if is_band_connected() else 'Band disconnected'
            mqtt_client.publish(topic_band, message_band)

            # Publish Mat status to MQTT
            topic_mat = 'topic/Mat_Status'
            message_mat = 'Mat disconnected' if is_mat_connected() else 'Mat connected'
            mqtt_client.publish(topic_mat, message_mat)

            # Delay for 1 second
            time.sleep(0.1)

    finally:
        # Disconnect from MQTT broker
        mqtt_client.disconnect()

if _name_ == "_main_":
    main()

this is the micropython code which I already used in our device which use mqtt protocol for communication

random thicket
#

I don't know if this is the best server to ask this, I have a raspberry pico and I'm trying to use a HMC5883L but I can't read the i2c.

strong pine
#

there exists a fairly active raspberry pi server

elfin sphinx
# quasi hare Let me explain the concept to you. I'm using a microcontroller, specifically the...

i am still kind of confused tbh

i am not sure what you meant when you said

This data will indicate whether the band and mat are connected or not. So, the website you're creating needs to function as a client for my device
"as a client for my device" , what device ? what do you mean by client ? in a server client architecture , server is the one sending http to the client , and client is the one requesting the http , not sure what you meant by that . also what is a "band" and a "mat"

also "second method for message transfer via MQTT" , i am not sure who is communicating with who , i am not sure what all devices are present in your network , i am not sure who wants to talk to who

can you maybe explain your project and then we get an idea of what you are trying to do ?

elfin sphinx
quasi hare
#

By live, I meant the statuses should be updated in real time

#

this table should get filled up dynamically

elfin sphinx
# quasi hare this table should get filled up dynamically

i still have no idea how this table should g et filled up , where the data is coming from , what all devices youy have in your netowrk
i assume the connection protocol between your node devices is mqtt , then who is the mqtt broker

also i am not sure what is all the ip addresses and ports in here

elfin sphinx
random thicket
#

@elfin sphinx thanks for the reply. yes, I do need help. I just wanted to make sure this was the correct place before spamming code and photos.
this is the code i use to scan for i2c devices
`import machine
sda=machine.Pin(16)
scl=machine.Pin(17)
i2c=machine.I2C(0,sda=sda, scl=scl, freq=400000)

print('Scan i2c bus...')
devices = i2c.scan()

if len(devices) == 0:
print("No i2c device !")
else:
print('i2c devices found:',len(devices))

for device in devices:
print("Decimal address: ",device," | Hexa address: ",hex(device))`

the output was.
Scan i2c bus... i2c devices found: 1 Decimal address: 13 | Hexa address: 0xd

elfin sphinx
#

it looks like the code is detecting your magnetometer on I2C bus just fine

random thicket
#

@elfin sphinx When I try to read I only get 0,0,0
this is one of the codes i tried to use

`from machine import Pin, SoftI2C
import math
import time
import struct

i2c = SoftI2C(scl=Pin(17), sda=Pin(16), freq=100000)

declination=(0, 0)
i2c.writeto_mem(0xd, 0x00, struct.pack('B', 0b111000))
i2c.writeto_mem(0xd, 0x01, struct.pack('B', 1))
i2c.writeto_mem(0xd, 0x02, struct.pack('B', 0x00))

declination = (declination[0] + declination[1] / 60) * math.pi / 180

data = bytearray(6)
xs=1
ys=1
xb=0
yb=0

while True:
i2c.readfrom_mem_into(0xd, 0x03, data)

x = (data[0] << 8) | data[1]
y = (data[4] << 8) | data[5]
z = (data[2] << 8) | data[3]

x = x - (1 << 16) if x & (1 << 15) else x
y = y - (1 << 16) if y & (1 << 15) else y
z = z - (1 << 16) if z & (1 << 15) else z

gain = 1

x = x * gain
y = y * gain
z = z * gain

x = x * xs + xb
y = y * ys + yb
print(x,y,z)
time.sleep(1)`
broken python
#

hello everyone , i need help guys who have a public http serveur and can host in the this serveur a bin file
i work in OTA update using gprs, the sim800L module dosen't support https protocole

errant shell
# quasi hare

If you want to show historical data, then you must store the data in a database. Device -> MQTT -> (broker) -> data receiver -> database
Then from the browser. HTTP request -> flask web server -> database -> HTTP response

If you do not need historical data, then you can enable MQTT over WebSockets in your MQTT broker - and let the browser JavaScript listen directly for messages using WebSockets

bitter swallow
#

hello

#

is it possible to code arudino with python or just c++?

errant wigeon
#

the pinned post has links to some information regarding that, but loosely it's mostly just arduino c/c++

bitter swallow
#

thanks for the info!

vestal surge
bitter swallow
vestal surge
elfin sphinx
elfin sphinx
elfin sphinx
random thicket
#

@elfin sphinx thanks for the help I will be trying to solve this on my own ๐Ÿ‘

bitter swallow
elfin sphinx
short crane
#

Hello y'all, i don't know if this is the best server to ask this question. I'm new to programming with python(about 2 months), i have a dream project i will love to build which is a smart farm. This smart farm will have features like automatic feeding, watering and individualized animal tracking for optimial care-giving, i have no experience in technology before now (coming from medical background). what technology should i be looking to learn and what is the path of study for a project like this?

errant wigeon
# short crane Hello y'all, i don't know if this is the best server to ask this question. I'm n...

Do you currently own a farm and have livestock, or is this a project idea you have?
If you own a farm I'm going to suggest you go with a professional product.
If it's just a goal you want to work towards, automated plant watering is a good place to start: it involves a lot of the same concepts as building blocks, gives you some experience with automation, tracking, hardware, electronics, etc, and 'failure' is a dead plant, not an animal so you can also learn about reporting/warnings in a 'safer' way

short crane
opal forge
#

Did anyone here ever run some kind of user inteface using kivy on raspberry pi?

#

Is it possible to run It in docker and do I Need desktop version for that?

elfin sphinx
#

technically you dont have to have the desktop OS , you can manually install the X server and configure it , but imo its a bit tidious
if you have a powerful pi ( pi 4 or 5 with 2 gig or above RAM) , you can run the full desktop and a GUI app on top of it imo

if resources are important , then you could set up the X server only and go from there

elfin sphinx
# short crane Hello y'all, i don't know if this is the best server to ask this question. I'm n...

every individual thing you mentioned is a "thing" on its own
there is not really a fixed "roadmap" for these kind of things

just plan out main stuff you want to do , and then work on those individual things, ex lets say you want to set up a smart farm that 1) feeds and waters the animals periodically 2) does Individualized animal tracking

also i am not really sure how you would "feed" the animals ??
lets say you have a machine that feeds the animals on command

now depending on how "smart" you want this to be , the technology used will be different.

ex . it can be as simple as programming it to feed and water animals at fixed time of the day
now to enhance this , you could add a weight sensor to the spot where you will drop its food , this will measure the weight of food and you can estimate if the animal is eating the food or not
this could be fooled if some other stuff falls ont hat spot and adds weight on the weight sensor ( so the food will be finished but the sensor will show that the food is still thre)
to overcome this ,you might use something like computer vision or something similar

so you see , the complexity goes on increasing the more you want to enhance it.

#

also "automate the farm" is a bit of vague subject and i am not really sure what part you want to implement yourself vs what part you want to just buy ready to go

ex - lets talk about monitoring the cattle.

there are number of ways you could go about it with their pros and cons
such as geofencing the cows using a GPS tracker or smth similar

now i am not sure if you are interested in building this GPS monitor yourself or you want to just buy one that is ready to go and then use these hardware components and write software for them

#

if you are really not sure what you want , but want to get into all this "electronics stuff"

my advice is , just buy an arduino kit and start doing projects that you see online that interest you
(ex - a good beginner project for you might be arduino based automatic plant watering system )
and try to learn new things, thats pretty much all i can say to you

there is not really a fixed roadmap for this kind of stuff like there is for say learning a programming language

#

the only "roadmap" i know of is doing engineering in electronics or similar branch

short crane
elfin sphinx
#

๐Ÿ‘ having a fixed set of features you want and requirements will really allow you to make quick hardware choice

#

also i think the farm should be the big goal you walk towards

but you should start with simple stuff in the beginning

#

otherwise you might just get overwhelmed

opal forge
#

I have a question not related to python but how do you secure your code from being stolen?

spiral sandal
#

you open source it, put a permissive license on it and then it cannot be stolen, and probably will live way longer

#

a part from that there are a number of SOC which allow for burning some fuse and set crypto/tpm at a very low level

opal forge
#

Also what about storing some kind of device ids/API tokens

#

I want to primarly make them secure

spiral sandal
#

you want SBROM and encryped storage ( nand/emmc can be dumped easy )

#

you can experiment for cheap with allwinner socs you can burn fuse from usb/fel mode you will find docs on https://linux-sunxi.org and armbian forums

opal forge
spiral sandal
opal forge
spiral sandal
#

system on chips you can find on dev boards like "orange pi" , "Libre Computer" "lichee pi" etc ...

opal forge
spiral sandal
#

from most people yes

opal forge
# spiral sandal from most people yes

Okay, im reading more and more about it and it starts making sens but i still dont understand than
where the encryption keys will be hidden to make it safe?

spiral sandal
#

inside the cpu there are a bank of fuse you can shortcut and burn to make a bitstring that is hardwired forever and make the chip unique

#

only write once

opal forge
spiral sandal
#

indeed they cannot, so don't loose the key yourself

opal forge
#

?

spiral sandal
#

it will only allow stuff signed for it

opal forge
quasi hare
iron umbra
#

How tf do I understand coding for microcontrollers๐Ÿ˜ญ

#

I have this uni project due for traffic control and pedestrian crossing and itโ€™s eating me already

iron umbra
elfin sphinx
iron umbra
#

Called smart systems

#

Coding an arduino is going to be the end of me

spiral sandal
iron umbra
#

Whoaaaa Iโ€™ll check those out

spiral sandal
#

when you are done with both, learn async and blink the led while playing pong ๐Ÿ˜„

iron umbra
#

What should I be doing or watching thatโ€™ll make me significantly better at circuitry stuff

#

Cause my projects due in like a week and I donโ€™t know anything it feels like

spiral sandal
#

i guess stay with some arduino blinking led tutorials on YT

willow star
spiral sandal
willow star
#

Oooh that makes sense

spiral sandal
#

for screen ssd 1306 should be enough, i2c ones may be slow did not test

spiral sandal
elfin sphinx
#

but yeah , if you want to start out , get your hands on a basic arduino UNO kit , and just start doing stuff

you will find loads of youtube tutorials , blogs , articles about it

iron umbra
# elfin sphinx did they not teach you about it ??

it just felt like cognitive overload to me, they showed us an arduino for the first time and then baam now we gotta make a whole smart system after 2 weeks and figure out all the hardware and software for it.

#

and then we're required to have so many features, to get enough marks

elfin sphinx
iron umbra
#

this is the main project

#

is this supposed to be easy or medium difficulty or smth ?

elfin sphinx
#

i still dont know what the required behaviour is , you just posted the overview

#

but from what i see , i would say this is beginner to a bit above beginner level

from what i can seee , its just few LEDs , few buttons , and an ultrasonic sensor
i am not sure what those 7 segment displays and LDR / Thermistor are doing there

opal forge
#

Hi im having a problem with runing kivi with good graphics on my raspberry pi 4b, so i connected my raspberry pi to my Acer screen with micro hdmi -> hdmi cabel and when running simple app im getting realy bad graphics on the screen

#

Also Im runing server version ( meaning no desktop only cmd )

#

While when running same code on my PC with linux graphic is 10x better

#
import kivy
kivy.require('2.3.0') # replace with your current kivy version !

from kivy.app import App
from kivy.uix.label import Label
from kivy.uix.gridlayout import GridLayout
from kivy.core.window import Window
from kivy.graphics import Color, Rectangle
from kivy.core.window import Window


class Main(App):
  def build(self):
    window = GridLayout(cols=1)
    # with window.canvas.before:
      # Color(.2,.2,.2,1)
      # self.rect = Rectangle(size=(1200,600), pos=window.pos)

    label = Label(text='Hello World')

    window.add_widget(label)
    return window

if __name__ == "__main__":
#  Window.maximize()
 # Window.fullscreen = True # Making it go to F11 mode
  Main().run()
elfin sphinx
opal forge
#

It Looks like resolutions would be different

#

Like the text gets much bigger than it should ( the cursor as well )

elfin sphinx
#

then yes , firstly set the correct resolution for your display

opal forge
#

That looks like "blured"

elfin sphinx
#

and what does it look like when its "good" ??

opal forge
#

Im stupid

#

Works fine now

elfin sphinx
#

๐Ÿ‘

opal forge
elfin sphinx
#

if the good image is from your laptop , you can just screenshot it right ?

#

no need to use phone to capture the photo

#

also you could have just said that "text looks wayy bigger than its supposed to be and blurry "

when you said "graphics" i thought something like , video or pictures or smth

opal forge
#

It's on the screen of my Monitor which is connected by hdmi to raspberry pi

#

directly

#

And the system doesnt no have desktop support

elfin sphinx
opal forge
#

Okay so the problem was that raspberry was trying to fit On full screen window size of lower size

elfin sphinx
opal forge
#

I just need to make window bigger

elfin sphinx
opal forge
opal forge
#

Do you guys know some GUI frameworks which support packaging for linux? Im planing to create some Kind of self-service checkout and working with docker would be hard also using linux packages may make it easier and more reliable?

cloud hinge
#

Are there rules against mixing others c plus plus code and sharing online?

supple oxide
#

If you mean modifying and sharing the code, you will have to look at the license. Some licenses require the original author be mentioned, others require you to reuse the license for your new version, etc.

#

If you want to be sure, just read the "LICENSE" or "LICENSE.md" file in the project root

#

If the project doesn't have a license you will have to contact the original author and ask for permission.

cloud hinge
oblique creek
#

My peepos

#

Hola

#

I require assistance with calibrating a light sensor

#

Please respond

#

I am dying ๐Ÿ˜ข

errant wigeon
#

What sensor do you have?

azure sluice
#

Any drone guys in here? Iโ€™m programming an autonomous boat using adupilot and mavlink. Iโ€™m looking for a flight controller that dependable but not overkill for something like a boat that doesnโ€™t experience the kind of stress a air platform would

floral musk
#

guys can you give me idea what i can do with esp32

#

?

elfin sphinx
errant wigeon
#

Weather stations/air quality stations are a particular favorite project of mine

cloud hinge
# floral musk guys can you give me idea what i can do with esp32

Sky is the limit, there are a ton of code examples online and in arduino ide . I hope to make a web radio soon. Go on YouTube and search esp32 then refine the results to day, hour, month and year to see what's going on in the world of esp32. Can make watering systems for plants, the sky is the limit of your imagination with reference and skillz. If you have any more questions let me know and ill try point you in the right direction. The l298n is a great motor controller for using pwm to change speed of motor, forward, reverse and stop for two motors individually and its very inexpensive, can use with small motors up to 25w max.

elfin sphinx
zealous storm
#

anyone able to help i want to setup my raspberry pi 4 with a custom data set on yolov5 and a pico micro controller

cursive hamlet
#

Is anyone familiar with headless pico running, I have a code that works flawlessly when run through thonny but breaks when run headless and I have spent hours trying to figure out how to fix it and I can not do it whatever I try

elfin sphinx
cursive hamlet
#

Thank you both for the replies, the file is saved under the name main.py which does run when powered but unfortunately the code doesnโ€™t work as when launched from the computer. The issue was that when running headless there is no console for the error message to print into. But in redirecting the error message to my LCD screen I get the message โ€œcouldnโ€™t determine sd card versionโ€

#

Which is very strange because it works fine when run via the laptop and I am connecting it to the same power so I am not sure what could be causing the difference

#

Any help would be greatly appreciated!

elfin sphinx
glass locust
#

Good evening lads, is there anyone of you who could guide me on robot and sensors training ? I have a college project that requires training a robotic arm to detect and segregate garbage. require some helpful insights on what approach to take !

errant shell
errant shell
oak root
#

Good evening, I am just getting started with python and microcontrollers. Any suggestions on where I should begin? I purchased microcontrollers from adafruit and looking like I can work with micropython or circuitpython. I have Sublime Text or vscode. Seem to like sublime text more.

#

When I have a question I go to the internet and that turns into a rabbit hole that has no end

elfin sphinx
oak birch
#

@iron umbra You can ask here

iron umbra
#

Can anyone join VC and give a lil advice on microcontrollers?

#

haha thanks mtrr

elfin sphinx
wind stone
#

I was soldering and this was making a lot of smoke, my dad said I should have a fan but I forgot, I was blowing it away from me, is this bad?

spiral sandal
#

not just a fan but a smoke extractor so toxic fumes go outside or at least work under opened window , avoid repeated exposure because yes this is bad.

willow star
elfin sphinx
#

for a makeshift solution , buy charcole sheet , attach it to the back of a 12v PC fan , and then use that to suck those fumes in and keep it near your window , so it sucks the fumes in and then throws out the back out of the window

hasty pewter
quasi hare
cloud hinge
wise hazel
#

how do I make input() run in asyncio?

hallow igloo
#

Yo does anyone know where i can find some useful info on autonimous programming using python for something like a rover using a raspberry pi???

elfin sphinx
#

!rules 10

hasty zealotBOT
#

10. Do not copy and paste answers from ChatGPT or similar AI tools.

elfin sphinx
cloud hinge
#

@elfin sphinx if i use fabgl code and someone elses code and put them together can i share them on github? i made something really cool i would like to share but im not sure on the licencing. i also used chat gpt to make it

elfin sphinx
#

not sure what fabgl code means
and for someone else's code , check that code's licence and follow it
if they dont have one , shoot them mail or smth

cloud hinge
spiral sandal
cloud hinge
spiral sandal
#

you probably can as long as everything derived from that work is labeled GPL v3 too

cloud hinge
#

i would not have a clue...

spiral sandal
#

ask a lawyer then

cloud hinge
#

is there a way to find out besides git?

cloud hinge
spiral sandal
#

open an issue on github asking kindly for permission and what you want to do with it and keep track of the answer

hallow igloo
#

open an issue on github asking kindly for permission and what you want to do
with it and keep track of the answer

cloud hinge
#

awesome guys, ill look into that, thank you

#

i think it might be beneficial for some in the community hopefully

spiral sandal
#

if on posix then put stdin in non blocking mode and use select() on it

wise hazel
#

its this code thats giving me problems:

#

await asyncio.to_thread(input, prompt)

#

it gives me this error:

#

AttributeError: to_thread

#

on CircuitPython

sacred pecan
sacred pecan
wise hazel
#

ok

dim vapor
#

what is the difrence between micropython and circuitpython?

sudden iron
#

Hi all. I have a switch box, running on arduino. Everytime i turn one of the switchs for example , it prints "strobe.switch.on" on the serial monitor. I would like to write something in python that gets that printed value and transform everytime it prints something like that, to press the "s" keystroke for example.

So something like
Pyinput
Input keyboard

errant wigeon
#

For "Big Enough" chips, MicroPython is a lean and efficient implementation of the Python 3 programming language that includes a small subset of the Python standard library and is optimised to run on microcontrollers and in constrained environments. CircuitPython is a fork from MicroPython which has some minor changes to MicroPython in an effort to simplify experimenting and learning to code on low-cost microcontroller boards.
The boards they support can be found here:
https://micropython.org/download/
https://circuitpython.org/downloads

Micropython tends to make use of as much as it can on each chip it's on, and that means the api from one chipset to another might have a fairly large difference. Circuitpython in contrast attempts to maintain the experience from one chip to another so it's more familiar, but that comes at the cost of some features not being as optimized as in Micropython

elfin sphinx
cloud hinge
#

As much as i respect peoples license to code it looks like it could be holding back major innovation if everyone who wants to post new code based on old code has legal roadblocks. I see both sides but its interesting. Like what if you want to ask permission to use someone's code and it takes years for them to get back? Society keeps moving along but the codes that have been created might never be released. Am I correct in this assumption?

elfin sphinx
#

i would just post the code and in the readme say that - this XYZ part of this system uses code of ABC person's project over at <insert their link>

#

it might violate the licence, not really sure , but yea , i would just do it

cloud hinge
#

Thank you for the insight

#

i texted the authors with the github issues feature on github but it looks like the project hasnt been worked on since 2022

willow star
elfin sphinx
#

if their code is open source and they dont care to put a licence on it neither do they reply to messages , i doubt they care to take stuff to legal action

cloud hinge
cloud hinge
wispy lintel
#

Is vdhl part of micro rollers and is it hard to program the corrections functions to micro trollers with vhdl

errant wigeon
#

Do you mean VHDL?

#

If so, VHDL is a hardware description language for things like FPGAs, which are chips that let you actually change how the chip works on the inside. A micro controller is much more set in stone as to what it can do.

VHDL is.. not terrible? But I didn't have fun learning it and didn't retain any of it. It's really powerful if that's the level of programming you need, but it also consumes a ton of power and for a lot of things you don't need it.

#

almost all of my personal needs for microcontrollers are hobby projects like weather stations and smart home controllers.
FPGAs are great for really high speed processing, but for a lot of things I need there's something cheaper and simpler. And since it's a hobby project, simple is nice

wispy lintel
#

Sorry

errant wigeon
#

No worries, I assumed that's what it was after I couldn't find anything related to vdhl
but yeah, you can do a lot with an fpga and VHDL, that said it can be overwhelming very quickly

wispy lintel
#

I am looking at doing a capstone and am thinking of doing a flashing light microcontroller.

errant wigeon
#

The way you write vhdl is to describe the circuit itself, rather than just the code like you would with a python program. With that comes the fact that the circuit does a lot of things at once, so where lots of python code is single threaded, hardware does a ton of things at the same time. So the way a program works on an fpga is different, and that can be a difficult thing to mentally understand.
Also the language itself is rigid and feels different than python. (But like in the 'fortran feels rigid and can do a lot of amazing things' kind of way)
If you're thinking of that for the capstone, I'd encourage you go for a micro controller before you do anything with vhdl

wispy lintel
#

I am thinking of implementing VHDL with using a microntorller

errant wigeon
#

I don't know if that's possible, could you describe it in more detail?

wispy lintel
#

Never mind as it does look like to be uisng C++ for that reason

errant wigeon
#

ah, ok so you want to write vhdl to blink an led, not put the vhdl on a micro controller. I think I follow that a lot more now

wispy lintel
#

I see that VHDL is mostly used for hardware testing but are there like components that can be associated to vhdl

errant wigeon
#

Why are you interested in VHDL vs something else?

wispy lintel
#

The book for the class ask to learn VHDL

#

College course as am going for CS

errant wigeon
#

Ok. I think that makes sense.
Really quickly, VHDL code is usually deployed to an FPGA, but you can simulate the circuit on the computer. So you can write VHDL to blink an LED, but to put it on something else you'll need an fpga.
FPGA's are different than micro controllers. They are confusingly similar, but they are different.
https://www.reddit.com/r/ElectricalEngineering/comments/120pgl8/what_is_the_practical_difference_between/
https://rushpcb.com/fpga-vs-microcontroller-understanding-the-key-differences/
These two links help describe their similarities and differences

wispy lintel
#

Thank you for that

errant wigeon
#

(Fixed the reddit link, I copied the wrong one)

wispy lintel
#

Any advice to survive the mebedded systems course.

errant wigeon
#

Take it step by step, and ask questions when you don't understand what's going on.
Embedded courses have changed a lot since I took them, but at their core it still covers the basics. Micro controllers are simple machines, that's why you can talk about how they're built at their most basic level. That said, it's easy to get overwhelmed. Focus on 'what actually needs to happen' one step at a time.
It's similar to programming, break everything down to really simple steps. Read datasheets, write notes as you read it, etc.

wispy lintel
#

This is a eight week course as well and so Iโ€™m trying to break a step-by-step so then I can accomplish it within that specific time we are expected to do between 16 to 20 hours per week and so it will be a part-time job for me

#

To survive this course at this is really important for me to graduate as so that I can be able to complete my CS degree. Thank you very much again for your help and all.

wispy lintel
#

@errant wigeon

elfin sphinx
cerulean timber
#

Iโ€™m having issues trying to get this ultrasonic sensor work, is there anything wrong with the wiring?

floral spruce
#

I can't really see any of that wiring, so not sure ๐Ÿ‘€

cerulean timber
#

lemme take some better pics

floral spruce
#

I mean first thing that looks like it could be off, the little black breakout that's providing power from USB, how is that currently connected to whatever the blue board is?

#

Because it doesn't look like they share ground

cerulean timber
#

this is essentially what ive done, sorry just redid on tinkercad

#

im pretty sure its the faulty black wire on the gnd pin of my ultrasonic, its really loose but the school hasnt provided enough FF wires sadly

floral spruce
#

Because I can't see in that original photo where the black board and the blue one are sharing a ground

#

You have the gnd of the sensor going to the blue board, but there's no gnd going to the black board that I can see

cerulean timber
#

This part??

floral spruce
#

Ah okay so is that grey wire the one connected the gnd of the black board to the blue board?

cerulean timber
#

Yeah the grey goes to the black board and the blue goes to the ultrasonic

floral spruce
#

Okay so that probably isn't the issue, what's going wrong at the moment?

#

Are you just getting bad readings?

cerulean timber
#

its not reading anything other than 0

#

could just be chatgpts horrid code though

floral spruce
#

did you write the...

#

Ah

cerulean timber
#

yeah

#

๐Ÿ˜ญ

floral spruce
#

Then yeah, maybe share that

cerulean timber
#

yeah im not sure what this is actually doing, i was just trying to test the ultrasonic sensor

#

i have 4 on me, none of them are working with the code, so im assuming its a code issue

floral spruce
#

This seems rather odd, why do you have a 10 second delay after setting the trigger pin high? Correct me if I'm wrong, but the way an ultrasonic sensor works is you set the trigger pin high, and then you wait for the echo pin to go high, and you can figure out the distance based on that.

At the moment you set pin1 high, then sleep for 10 seconds, which is a longgggggg time, it'll take that sensor a fraction of a second to read the distance and set the echo pin high, so you're never going to see it in this configuration.

cerulean timber
#

yeah that might be the issue

floral spruce
#

You can probably just remove those two lines after pin1.write_digital(1)

#

Just set it high and then call your measure_pulse

#

Let me fact check that though

#

It may be a bit different to what I'm thinking

#

Ah okay so maybe you do need a falling edge for it to then send out the pulse, but seems like the trigger pin should only go high for a couple microseconds

#

Is that sleep currently in seconds or ms?

cerulean timber
#

theyre ms

floral spruce
#

Then you'd want to change it to sleep(0.01)

#

To get 10 microseconds

cerulean timber
#

im not sure what its doing, its still reading 0

floral spruce
#

Send the code you've got at the moment, we'll take a look at that

cerulean timber
floral spruce
#

As in after setting it high

#

So ```py
pin1.write_digital(0) # you probably don't need this
sleep(1) # or this
pin1.write_digital(1)
sleep(0.01)
pin1.write_digital(0)

#

Set it high, wait 10 microseconds, then set it low

cerulean timber
#

oh alright

#

its still only reading 0...

#

theres no interference or whatever, ive tried sitting it down and holding it up so unsure

floral spruce
#

Send the code you've got at the moment

#

wait

#

I think your trigger and echo pins are switched, it might be the angle of the photo

#

But it looks like you had trigger connected to pin 2 on your microbit

#

And echo to pin 1

cerulean timber
#

i think youre right

#

... its still reading 0

floral spruce
#

Send a photo of what your circuit looks like now

cerulean timber
#

one issue ive been having is that the black FF wire on the ultrasonic keeps falling out, but i dont own another wire. every test ive done it stays in though

#

maybe ill tape all 4 of the wires on the ultrasonic together, and then tape the gnd wires together

floral spruce
#

Send the current code you've got, we'll do a check on that again

cerulean timber
#

weird quirk ive found with it, if i put anything super close to the sensor, it reads 3

floral spruce
#

Is dividing by 58 correct? we may as well check that real quick
Speed of sound is like what, 340 m/s, that's 0.34 m/ms, which is 34cm every millisecond. So shouldn't you be multiplying your duration by 34, since your duration is the time in ms that the pulse took? Or actually divide it by 2 to find the real time it took to go one way rather than both, then multiply by 34?

cerulean timber
#

btw this is my actual assignment's code, that code is just to try and get any reading on the ultrasonic

this one just displays a sad face, which is def an issue with the sensor

cerulean timber
cerulean timber
cerulean timber
floral spruce
#

sounds a bit better

cerulean timber
#

yeah its reading numbers, the multiplication value just seems off

#

ive tried a couple, but i think it reads 0, 1 and 2 multiplied by whatever it sees closest. i was holding my phone 30ish cm away and it was reading 2

floral spruce
#

I mean it won't be particularly accurate, and also you're reading this off the microbit display right? That's probably going to be rather tricky

#

Maybe print the values out if you aren't already

#

And check the output

cerulean timber
#

yeah my teacher made this assignment really dumb

floral spruce
#

Because reading them flashing around on the display isn't going to be easy

cerulean timber
#

im not even sure how to print to the serial monitor on mu

floral spruce
#

I'm sure it'd be possible, I wouldn't know how I've never used a microbit before

#

But sounds like a pretty standard feature it'd have

cerulean timber
#

i think it works better on makecode

#

except for some reason it has 40 problems on there

#

sleep isnt defined on there wtf

#

might just stick to mu

hot scaffold
#

I just dug out this pad that my programmer friend gave me a while ago, thinking nothing of it...and I'm completely blown away.

Apparently, once I learn something called CircuitPython, I can make this do whatever I want! ๐Ÿ˜„ It's exactly what I've been looking for!

livid locust
#

finally built a shadowboard builder with a raspberry pi!

vocal fable
#

Wait a rasberry pi is a microcontroller?

#

Its literally a mini computer

livid locust
#

my bad i guess i didnt fully understand what a microcontroller was

#

although, wouldn't this still be the best channel for that message?

#

just messaged the mods and it does fall within the scope

cosmic kindle
#

Do you guys have any idea about rospy

spiral sandal
cosmic kindle
#

I have to use ros2 and gazebo

#

In order to that i need to learn Rospy library

spiral sandal
limber stratus
#

I always wondered if I wanted to actually build my prototype, how would you do this? Has any sent their project to a company thats able to make something ie custom circuit boards, cases etc.. for whatever project

spiral sandal
#

be warned if you do assembly outside your country you will have to deal with inspection/certification from FCC/CE customs etc ... especially if involving wifi

limber stratus
# spiral sandal for samples you can order online and get your board(s) in the mail

Samples? What do you mean? So I have an arduino and been messing around, but its a bit bulky (especially with the bread board) but lets say I wanted to build a drone or idk a remote control car or something. After the prototype is made, are there companies that people have dealt with that build peoples ideas if you send them protoypes?

#

Also, unrelated question, is this channel mostly for Python microcontrollers or ones that can potentially run Python or microcontrollers in general

spiral sandal
#

then they make the board for a quantity and send them back to you

limber stratus
spiral sandal
spiral sandal
#

that's why everybody use carboard and hot glue to design the future

limber stratus
#

Good to know. I had some random ideas, I'd like to create . I was thinking I might try and get a 3d printer to create my own cases to start then go from there lol

#

What are the downside to ESP32? I like my arduino, but ESPs are so cheap.

spiral sandal
#

if using with python, memory too small pick esp32 with PSRAM

#

if you know what you are doing esp8266 is just enough for everything ( though only 1 adc is really short )

cosmic kindle
#

i am make a robot arm can use in insdustury the job of robbot is pick up the pakage from conver belt and place into somewhere else

#

what that purpose i need to learn ros 2

#

gazebo

#

and tf.broadcast

#

i new in robotics i don't have any knowlege

#

and zero work experience

#

in ros

spiral sandal
#

robot arms are really quite complex,expensive and breakable stuff when used in real situations

cosmic kindle
#

i am participating in national competion

spiral sandal
#

with real arm or simulator ?

cosmic kindle
#

yes

#

and i have to do all coding realated stufff

spiral sandal
#

if real you need to build a model of it

cosmic kindle
#

including ros and open cv

cosmic kindle
wispy lintel
#

Does c or c++ works best for microcontrollers.

elfin sphinx
#

most SDKs for common microcontrollers are written in C++....

hallow igloo
#

Where can i start learning how to program an arduino to handle a a mini rover

wind stone
wind stone
hallow igloo
wind stone
#

yeah thats what I would recommend

#

How do you guys make your pcbs? I have a more complicated project (macro pad) the wiring is not particularly complicated just a lot of wires, thinking about going chemical etching.

wispy lintel
onyx shadow
limber stratus
onyx shadow
#

use rust ๐Ÿค“

elfin sphinx
elfin sphinx
astral jacinth
#

I'm happy with EPS32 and ESP8266. I'd recommend it for MicroPython development

#

Plus you get a WiFi included

cloud hinge
#

I was able to make a esp32 cyd positive affirmations sender receiver if anyone wants to try out the code

limber field
#

WIFI on a ESP32 has many uses

cloud hinge
#

loving these cheap yellow displays, for just a bit more than a esp32 can have a touch screen built in. anyone else tryed them out?

elfin sphinx
#

when i search for cheap yellow touchscreen display , all i see is these mobile phone displays

cloud hinge
#

@elfin sphinx

#

cyd or cheap yellow display. the 2.8 inch one seems to be the sweet spot in price and value. just a standard esp32 i think with many awesome features. lots of youtube videos on it. they also have a discord channel for it.

elfin sphinx
# cloud hinge <@671318664280145920>

from what i can see they are just like any other display just with a different PCB colour

but yea i used similar displays with same display driver ICs , work fine

#

also the 2.4 inch displays (the non yellow ones) are like 10 bucks , so they are cheaper ig

cloud hinge
cloud hinge
elfin sphinx
#

i guess , yeah

#

but i rarely encounter a project where all i need is just the ESP32 and a big display
having the ESP32 seperate makes it easy to hook up components and everything

cloud hinge
elfin sphinx
#

these displays might be good for stuff like differet dashboards , status indicators etc

compact in size , have everything integrated in single PCB , cool concept ๐Ÿ‘

cloud hinge
elfin sphinx
#

thats a cool project

cloud hinge
#

have you ran espnow @elfin sphinx ?

elfin sphinx
#

i had experimented with it , but not used in any projects yet

cloud hinge
elfin sphinx
#

nicee

cloud hinge
elfin sphinx
#

yep, just dont have any project idea for it yet

maybe a RC car ๐Ÿคทโ€โ™‚๏ธ not really sure

cloud hinge
cloud hinge
#

I think I'll make two pages for it for more buttons and a front menu if I can pull it off. Need it for my plant watering system

elfin sphinx
#

pretty sure if i do start on that idea its gonna end up in the graveyard of unfinished projects ๐Ÿ˜‚

elfin sphinx
cloud hinge
elfin sphinx
# cloud hinge Lol, what ya working on lately?

Developing a system for a client
they want to make a ESP32 based periodic timer system (something you would use for like a stuff reminder box or smth like that )
and i have to make it low power so it consumes very low power when connected to battery , so just working on that
and apart from that , just fucking around with the 3d printer i recently got

cloud hinge
#

@elfin sphinx I made a esp now positive affirmations sender receiver also with serial interject to send whatever while it sends 40 random positive affirmations can overdue with other text

elfin sphinx
#

ohhh noicee

#

so its like one of the 40 hardcoded affirmation being sent out or if user types something , that gets sent , correct ?

cloud hinge
elfin sphinx
#

you wil you will , dw

i got that client bcoz one of my college friends hooked me up lol

cloud hinge
elfin sphinx
#

(aight i have to dip now , ill be back after a while)

cloud hinge
#

nice, ok man, cheers!

cloud hinge
#

what do you guys think about this project? uses the ps/2 port of regular keyboard with esp32

onyx shadow
#

Hey, I don't have any experince with ESP32 or embedded stuff in general and I'm trying to configure an I2C comms with an external sensor, what may be going wrong there?

#[entry]
fn main() -> ! {
    esp_println::logger::init_logger_from_env();
    let peripherals = Peripherals::take();
    let system = SystemControl::new(peripherals.SYSTEM);
    let io = Io::new(peripherals.GPIO, peripherals.IO_MUX);
    let clocks = ClockControl::max(system.clock_control).freeze();
    let delay = Delay::new(&clocks);

    let sda = io.pins.gpio8;
    let scl = io.pins.gpio9;
    let mut i2c = I2C::new(
        peripherals.I2C0,
        sda,
        scl,
        100u32.kHz(),
        &clocks,
    );
    for address in 1..255 {
        let mut data = [0u8; 6];
        delay.delay(20.millis());
        let result = i2c.write_read(address, &[0xFD], &mut data);
        match result {
            Ok(_) => log::info!("Device Found at Address {}", address as u8),
            Err(_) => log::info!("No Device Found"),
        }
    }
    loop {}
}

I can't seem to read/write from any address and I'm not sure if it's a code or physical problem ๐Ÿ˜…

elfin sphinx
cloud hinge
leaden heron
#

uh can you code an Arduino in python

onyx shadow
frigid frigate
#

Guys, I have to build an ai powered image recognition system for my science competiton.I have made the program but i don't know how to use any microprocessor or build a model. Can anyone please help me

#

to display it in and ofc i can't just take my laptop their and show them

elfin sphinx
onyx shadow
#

It's ground

elfin sphinx
#

yea, then why is it connected to the 5V pin ?

onyx shadow
#

It's connected to ground, perspective issues

elfin sphinx
#

ahh ok

#

and whats the value on those pull up resistors ?

onyx shadow
#

I've been at this problem for a couple of days and can't figure out what's wrong ๐Ÿ˜…

#

they're 2kOhms, should I try a different value?

elfin sphinx
#

it should be fine , but just for peace of mind , try something like 2.5k-3k ish

#

the "recommended" for 3.3V logic is 2.4k afaik

onyx shadow
#

Ok, but is there anything else that could be wrong there?

elfin sphinx
#

make sure you are using the correct address for your module

you can find out the address of connected device using a i2c scanner code example

onyx shadow
onyx shadow
#

I bought a multimeter and measured 100khz on the bus, so I assume it should be working?

elfin sphinx
onyx shadow
#

I think I tried without pull ups, but I'll try again

#

Really no change with 2.2k resistors and without them ๐Ÿค”

elfin sphinx
#

aight , so hardware wise , all seems to be connected just fine

but unfortunately i have no idea how rust works so i am unable to debug your code

how about , you try this arduino code


#include <Wire.h>

// Set I2C bus to use: Wire, Wire1, etc.
#define WIRE Wire

void setup() {
  WIRE.begin();

  Serial.begin(9600);
  while (!Serial)
     delay(10);
  Serial.println("\nI2C Scanner");
}


void loop() {
  byte error, address;
  int nDevices;

  Serial.println("Scanning...");

  nDevices = 0;
  for(address = 1; address < 127; address++ )
  {
    // The i2c_scanner uses the return value of
    // the Write.endTransmisstion to see if
    // a device did acknowledge to the address.
    WIRE.beginTransmission(address);
    error = WIRE.endTransmission();

    if (error == 0)
    {
      Serial.print("I2C device found at address 0x");
      if (address<16)
        Serial.print("0");
      Serial.print(address,HEX);
      Serial.println("  !");

      nDevices++;
    }
    else if (error==4)
    {
      Serial.print("Unknown error at address 0x");
      if (address<16)
        Serial.print("0");
      Serial.println(address,HEX);
    }
  }
  if (nDevices == 0)
    Serial.println("No I2C devices found\n");
  else
    Serial.println("done\n");

  delay(5000);           // wait 5 seconds for next scan
}

and share the output , so we can see if its a hardware issue or software issue

onyx shadow
#

Thanks, i'll try that ๐Ÿค”

elfin sphinx
#

(post what happens when you can, ill be back in few , have to step away)

onyx shadow
#

I think it's waiting for serial forever for some reason

#

I tried different sensors and different esp32 s3 boards, but result is the same

elfin sphinx
#

so , open the serial monitor and press reset on your board

onyx shadow
#

Uh, encoding problems?

10:17:23.883 -> @โธฎโธฎ)โธฎฮ€2โธฎโธฎโธฎ9mโธฎM)nโธฎ
elfin sphinx
#

probably

check that the baud rate of serial monitor is set to 9600

onyx shadow
#

In the code? It is ๐Ÿค”

#

And in monitor itself too

elfin sphinx
onyx shadow
#

rate of 115200 seems to work? ๐Ÿค”

#

But it doesn't seem to scan anything, I'm also very confused why rust code seems to work in wokwi

elfin sphinx
#

yea , so the 115200 buad should be changed to 9600

elfin sphinx
#

this is what you see when you reset the board right ?

onyx shadow
#

Yep

elfin sphinx
#

can you set it to 115200 in both places and check again ??

(you need to recompile and reupload the sketch after you make a change )

#

this is pretty weird issue, i never had problems with this baud rate

onyx shadow
elfin sphinx
#

HUH

why wont it print anything then , at least this line Serial.println("\nI2C Scanner"); should have been printedpithink

onyx shadow
#

I tried a different board, it's the same ๐Ÿ˜…

elfin sphinx
#

different ESP32 S3 board or different model board ?

onyx shadow
#

Different esp32 s3

#

Ugh, I've been using a wrong usb type c port? ๐Ÿ˜…

#

What are default pins for i2c on esp32s3?

elfin sphinx
elfin sphinx
onyx shadow
#

It doesn't seem to be able to find anything ๐Ÿค”

elfin sphinx
#
void setup(){
  Serial.begin(115200);
  while(!Serial)
    delay(10);
  Serial.println("The serial monitor is working");
}

void loop(){
}
onyx shadow
elfin sphinx
#

What does the message say ? ?

#

if it cant find anything , it should print i cant find anything to monitor

#

you see that ?

onyx shadow
#
10:34:50.123 -> Scanning...
10:34:50.123 -> No I2C devices found
elfin sphinx
#

ahhhhhhh, good

so at least something is working

#

ok, do you have any other I2C module ? ?

#

like a dispaly module or whatever
anything that uses I2C

onyx shadow
#

Yeah, I have the same sensor and a couple of screens, but I tried them before too with the rust code

elfin sphinx
#

can you connect one of them which you know works to this setup and see if their address is getting recognized ??

#

bcoz tbh i really dont see why it shouldnt work , you are doing everything just fine

#

so we want to eliminate the possibility of the faulty module

onyx shadow
#

I tried a different one (same model) and the ldc screens, but nothing seems to be working ๐Ÿค”

#

There's physical connection between all the relevant pins

elfin sphinx
#

#define WIRE Wire1
can you change the second line of code to this and try again ??

maybe , the Wire is not the correct interface we want (which it should be , but we try everything we can)

onyx shadow
#
10:45:06.697 -> Unknown error at address ...
10:45:06.697 -> Unknown error at address 0x7E
10:45:06.697 -> No I2C devices found
elfin sphinx
#

Aight , so something

#

can you try different mix and match of pull up resistors , try upto 10k ?

onyx shadow
#

This was without resistors since you mentioned that you didn't have to use them in majority of cases ๐Ÿค”

#

I'll try

elfin sphinx
#

yea, but i mostly use the ESP32 wroom module , rarely used the S3 , so maybe its different on there ๐Ÿ˜…

onyx shadow
#

It seems to be able to find the lcd screen with both I2C0 and I2C1...

elfin sphinx
#

you mean like with Wire as well as Wire1 ?

onyx shadow
#

Yeah, I'm trying it with the rust code too

elfin sphinx
#

not just yet , now we know that I2C bus is workign

now connect your actual sensor to the ESP32 , and see if that gets recognized

onyx shadow
#

Yeah, It doesn't seem to be able to recognize the sensor ๐Ÿค”

elfin sphinx
#

like , not even the Unknown error at address ... thing ??

onyx shadow
#

1 sec

elfin sphinx
#

bcoz if you see the unknown error thing , you might be able to try different pull ups and maybe get it to work

but if you see no device found at all , then it might just be a busted sensor

onyx shadow
#

Is there some sort of documentation on how to calculate the needed resistance?

elfin sphinx
#

what do you mean "for majority of addresses" ?? you have multiple devices connected on the bus ??

elfin sphinx
elfin sphinx
#

Tbh if the screens are getting recognized , i blame this on a faulty sensor module

#

bcoz whenever we see the Wire.endtransmission return code 4 , it means the I2C bus is kind of mess and something is wrong in hardware ( its documented as "other error" )

elfin sphinx
onyx shadow
#

I think it's a problem with this specific sensor model

#

I've seriously been considering becoming a gardener at this point ๐Ÿ˜ญ

elfin sphinx
onyx shadow
#

It works even without pull-up resistors

elfin sphinx
#

as it should in most cases , yea

onyx shadow
#

Different one does...

elfin sphinx
#

where did you get the sensor from ?

onyx shadow
elfin sphinx
#

yea but those modules use different chips, so..

tbh i am not really sure why this is causing problems, i dont see anything wrong in your setup or the code , also the other I2C devices get recognized just fine so.....

whenever i am in situation like this , i just grab an arduino Uno or Nano , connect my sensor to that and see if that works

i suggest you do the same (just make sure you provide the sensor with 3.3V power instead of 5V also make sure you use a logic level converter module between the arduino and module because the arduino works on 5V logic levels )

#

a module like this should be fine for the logic conversion (they are dirt cheap too)

onyx shadow
#

I'd rather just use a different sensor and get my $2 back for these ones ๐Ÿ˜…

#

Thanks a lot for the help, I've been at this issue for a couple of days

elfin sphinx
#

if you dont have any of the stuff i mentioned like the arduino or this module on hand , then yea , thats the most logical option
but if you do have these things on hand , it wont hurt to give it a go in my opinion

either ways, good luck and have a good one

onyx shadow
#

Thanks a lot again, I was able to read the data from sensor ๐Ÿ˜ƒ

pub async fn read(&mut self) -> Result<Aht30Result, Error> {
    self.i2c.write(self.address, &READ_SEQ)?;
    Timer::after_millis(100).await;
    let mut buffer = [0u8; 7];
    self.i2c.read(self.address, &mut buffer)?;
    let temp_raw = u32::from_be_bytes([0, buffer[3] & 0b00001111, buffer[4], buffer[5]]);
    log::debug!("Aht30 raw temperature {:#x}", temp_raw);
    let temp = f64::from(temp_raw) / f64::from(i32::pow(2, 20)) * 200f64 - 50f64;
    log::debug!("Aht30 temperature {}", temp);
    Ok(Aht30Result { temp })
}
INFO - Aht30Result { temp: 26.611900329589844 }
INFO - Aht30Result { temp: 26.60999298095703 }
INFO - Aht30Result { temp: 26.601409912109375 }
INFO - Aht30Result { temp: 26.615524291992188 }
INFO - Aht30Result { temp: 26.598358154296875 }
elfin sphinx
#

wait , this is another sensor right ? it says Aht30

onyx shadow
#

I guess the sensor itself

elfin sphinx
#

ahhh okok

onyx shadow
#

Yeah, this is a different model

elfin sphinx
#

well, congrats !!

#

what are you gonna make ?? weather station ?

onyx shadow
#

Yeah, something similar, seems like a nice opportunity to work with rust and try to send that data to prometheus server

tranquil robin
#

Hey, if I want to program a remote control (in TV remote control style) for my pc with bluetooth, do I program my microcontroller as a wireless "keyboard" or, with a blutetooth master-slave system, let the slave simulates key presses?

elfin sphinx
#

programming smth like ESP32 to act as BLE keyboard should do just fine

#

your PC thinks its just another keyboard

vague knoll
#

you want to run a .bin file on a micro controller ?

elfin sphinx
#

a .bin file compiled for a target uses the instruction set for that target
for example a file compiled for Arm processor uses the arm's instruction set ( and it wont necessarily work on another machine that uses different kind of processor with different instruction set)
so you need to know what kind of chip your smartwatch has, then emulate that somehow on your PC ,if you are able to do that , you can run your code on your PC

#

or maybe the smart watch you have is a very popular smart watch , people have already RE it and have made tools available , so gotta do some googling depending on your exact watch

#

this indicates that the data inside your game.bin file is of binary type

#

yes

#

file command is used to find out the type of file and data

#

yes, thats another type

#

if you do a text file , ti might show smth like ASCII text

#

you need to know the instruction set for your chip , then emulate that using some sort of program , like python or whatever
then you would need to make another software that emulates the screen and buttons of your smartwatch using a GUI library in python or whichever language

#

all of this is insanely hard and really not worth it for running a simple smartwatch game

#

why do you want to run it on PC anyway ?

#

what OS does the watch run ?

#

is it like android based or no ?

#

do you have a link to that watch or smth ?

#

hmm , sounds like another chinese clone smartwatch

#

if you are able to get what microprocessor is used inside the watch , and if its a common microcontroller like STM32 based or smth then you can do some progress

but i doubt its that , its most likely custom chip with its numbering sanded off , so you are most likely gonna get nowhere with this ๐Ÿ˜‚

#

at any rate , the RE server might be able to give you some insights on the .bin file of yours ig

those people know how to exploit stuff and they might be able to give you extra insights

#

whats the chip number ?

#

like apple A7 chip ??? sounds unlikely , that chip is overkill for a smartwatch and probably a lot expensive
not to mention apple doesnt really release stuff like that to others afaik

#

well , good luck with your journey lol

faint lichen
#

hello i got pico mw and i been trying figure out how to get adafruit momo 0.96 oled working?

#

it keep telling me no module

eager dagger
#

did u pip install the module?

faint lichen
#

im on thonny right now trying make it work

eager dagger
#

what library is it that ur trying to use?

#

if u dont install the library with pip, it needs to be in your interpreter's site-packages directory

#

or the same directory where your shell is running. the error message says python cant find that module, meaning its not installed properly or in the wrong directory

faint lichen
#

that what i been trying to do but it keep giving me error

eager dagger
#

ok, what is the name of the module

faint lichen
#

ssd1306

eager dagger
#

ok did you do:
pip3 install adafruit-circuitpython-ssd1306

#

in terminal?

faint lichen
#

im on window 11 it not linux related

eager dagger
#

ok but the rpi is

#

on the rpi itself - you need to run that command

#

you can run that command on windows as well

elfin sphinx
#

and send error message

faint lichen
#

it pico microcontroller i'm trying to make rc car

elfin sphinx
#

also a photo of full thonny editor when it gives error would be great

eager dagger
#

i suspect it's not installed

elfin sphinx
#

usually i drag drop stuff onto the pico, dont know if pip install even works on that thing

eager dagger
#

im not super familiar with the pico - is it micropython or cpython?

elfin sphinx
#

both are different things pithink

#

micropython and circuitpython , both are supported on pico

#

also since its micropython/circuitpython , its kind of board independent (the pip stuff)

eager dagger
#

thats pretty cool. i am building a gui library for micropython on the CYD. assumed it was pretty similar

faint lichen
#

it python

#

it qt cable it simple controller

elfin sphinx
#

it will let you see all the stuff thats on the pico's storage

faint lichen
#

it empty

#

it brand new

elfin sphinx
#

so , you are telling your code to use the ssd1306.py file , but its not actually on your pico , you see whats happening here ?

#

you need to put that file on the pico

eager dagger
#

^

faint lichen
#

im new so i don't know how it works

elfin sphinx
# faint lichen im new so i don't know how it works

i suggest you checkout some tutorial or smth
i currently am busy with smth so i cant walk you through it atm

but if you got to youtube and type in "micropyton with pi pico" you would find tons of tutorials and guides

faint lichen
#

i actually download some file but i have no idea how to use thonny

elfin sphinx
#

yes , thats when you checkout a guide/tutorial

#

on how to use tht thing

faint lichen
#

ok

#

i mess up

eager dagger
#

we have all done it/started somewhere @faint lichen

faint lichen
#

i don't what am doing i put in lib file it still has't found module

icy crane
#

Also you should look at Random Nerd Tutorials.. There they have info on how to use MicroPython on a Pico and using Thonny, and implementing an 0.96" Oled .."Hello World"..

faint lichen
#

ok ty

faint lichen
#

i need help it keep giving me error because i can't import i2c device

elfin sphinx
faint lichen
elfin sphinx
#

make a main.py file on your pico (not inside of the lib folder , outside of that lib folder)

and then paste your main code in there , and then run that

faint lichen
#

ok

#

it still can't import

elfin sphinx
#

can you psot new picture ?

faint lichen
elfin sphinx
# faint lichen

You need to upload the whole folder adafruit_bus_device to ur pico, u have copied it partially

faint lichen
#

oh ok that make

#

sense

#

now i got new error

elfin sphinx
#

Also make sure u upload the folder as is

elfin sphinx
faint lichen
#

AttributeError: 'I2C' object has no attribute 'try_lock'****

#

i'm not sure what it means?

elfin sphinx
#

You are trying to access an attribute that doesn't even exist

#

Can u send photo ? It will tell me what file is causing the error

faint lichen
elfin sphinx
#

Wait, r u using micropython or circuitpython ??

#

The Adafruit library is a circuitpython library(I think) , u cant use that in micropython

faint lichen
#

im using pico

#

which i though they same thing

elfin sphinx
#

pico is the board

micropython or circuitpython are 2 languages that you can use to program your pico

you cant use a circuitpython library in micropython code

you see whats happening here ?

#

what are you trying to make/do ?

faint lichen
#

yeah i know i was trying make rc with little screen come up top

#

as in little altoid tin

#

with wheel and servo everything

elfin sphinx
#

can you try this code ? ?

#

replace the ssd1306 in your lib folder with what i sent

and then use the main.py code i sent

#

this will check if the screen works or not

#

and just make sure you replace the SDA and SCL pin (0 and 1) on line 5 in main.py with what you have ( 4 and 5 ) iirc

faint lichen
#

ok

#

i got OSError: [Errno 5] EIO

#

i think i got cable wrong

faint lichen
#

it make no sense it said no i2c device found??

elfin sphinx
faint lichen
elfin sphinx
#

And ur latest code + error

faint lichen
#

im not seeing led on pico there supposed be on right?

elfin sphinx
#

in your code , you say that your display SDA is connected to pin 4 of pico and SCL to pin 5

but is that actually where the pins are connected ?? it looks to me the pins are connected to pin 0 and 1

so its obvious this wouldnt work

#

@faint lichen

#

also double check the SCL and SDA wires

faint lichen
#

i did

#

ok it seems there a address issue thing going on

#

oled display not found address 0x3c

#

NVM I GOT IT WORKING

#

it usb problem it no wonder

faint lichen
#

i don't understand i got it working bu ti switch usb port and now it keep doing same thing

#

it was working now it back down

faint lichen
#

i totally had just a moment ago

#

i don't understand it it brand new

warped pollen
#

I assume you are on windows?
For me, in the past, this turned out to be a "USB Hub" issue. Windows for some reason who get a serial adapter stuck and any attempt to use it resulted in Permission Denied as the previous "usage" hung up.
I would move the USB plug to a new port on the hub and it would work again.
When I ran out of the 4 ports, I had to restart the hub.
That's when I realised it was a hub issue and connected direct to a USB port and ... it worked.
It only happened once to me, a long time ago, haven't seen this behaviour since and I do use Hubs.
So YMMV.

#

So while you are in that error state re-plug your USB hub and see if it clears.

elfin sphinx
#

if you want your code to run as soon as you turn on your pico , without opening thonny , make a file called main.py and put all your code in there

you have made Main.py file , not sure if thats causing the issue or not

#

what exactly is the issue right now ?

snow shell
#

I ended up making a Simon game out of this circuit.

cloud hinge
#

is there a way to transfer convert everything from vscode platformio to arduino ide super easy? seems seems arduino ide to platform io is much easier for example using .ino for in vscode platformio. would be a nice feature for people who like to switch it over

hasty pewter
placid charm
#

I am extremely unsure of how to get started with robotics. I am completely unaware of anything and assume, for the simplicity of explaining, I am very stupid.
What should I do? I can only afford an Arduino, not a raspberry pi.

#

Would the Arduino UNO be a good starting point?

cloud hinge
placid charm
# cloud hinge yes an arduino uno is a great start, i started with arduino nano. i recomend the...
cloud hinge
# placid charm I was looking at this kit which seems to be affordable enough to me... will it b...

it looks like a nice kit, there are some affordable packages on amazon and ebay too. it pays to shop around. some kits have more components depending on what u need and might be comparible in price. i got the 3 pack of arduino nano clone for a great deal like 2 bucks a piece a long time ago. nano has most of the same features as uno but uno might be a better starting point for easier access to pins

placid charm
# cloud hinge it looks like a nice kit, there are some affordable packages on amazon and ebay ...

I don't have eBay in my region. Amazon just arrived recently yet they charge sky high prices, making it less affordable. Also I am not sure if I will like this or not, hence my hesitation to spend too much money on a starter kit. I like this kit, as it comes with the lights and buttons, meaning I will be able to experiment and play around with combinations and see if this is something I wish to build on.

From my university courses of my choice, one of the ones I want to do requires me to be familiar with robotics and these micro controllers, hence, my wish to enter this field.

cloud hinge
placid charm
spiral sandal
#

5volts tolerant except on ADC and apparently cheaper

placid charm
spiral sandal
#

why not first blink the onboard led ? you don't need component for that

placid charm
spiral sandal
#

just findint its gpio number will enjoy you a full week end ๐Ÿ˜„

spiral sandal
placid charm
spiral sandal
#

programming the light is everything, that's the point of digital electronic. cabling is just boring and source of failure ( and "magic smoke" )

placid charm
spiral sandal
#

problem is "further" and "arduino uno" in the same sentence

spiral sandal
#

if you go further you will go toward STM32 , arm socs or ESP8266/ESP32 and bus with 3.3 volts levels

#

AVR (arduino uno atmega) are old, expensive, don't have enough sram for beginners and 5 volts

placid charm
spiral sandal
#

imho you get digital electronics wrong it is more about coding ( the hard way) than wiring, but everybody need to learn one way or another

placid charm
spiral sandal
#

that's exactly NOT how thgings are done nowadays

#

nowadays we build everything on simulators, run fuzzy tests on them, and only go to prototype after success. That is the only way to lower costs and re-use components efficiently

placid charm
spiral sandal
#

wokwi simulator has far more to offer than the more expensive kit in the store you linked

#

and it should not burn your house if you make a mistake

placid charm
#

Oh yes I have heard of it

placid charm
spiral sandal
#

you can you just have to look at your pc a different way

#

eg save an old pc from e-waste, get a few meters of semi-rigid alarm cable + a decent plyer/cutter and begin to play with soundcard as a dual channel ADC , fun oscilloscope + 6 ways pwm output , or parallel port as GPIO in/out

placid charm
#

I am trying to build the basic blink project, but did I do smth wrong?

#
void setup() {
  // initialize digital pin LED_BUILTIN as an output.
  pinMode(LED_BUILTIN, OUTPUT);
}

// the loop function runs over and over again forever
void loop() {
  digitalWrite(LED_BUILTIN, HIGH);  // turn the LED on (HIGH is the voltage level)
  delay(1000);                      // wait for a second
  digitalWrite(LED_BUILTIN, LOW);   // turn the LED off by making the voltage LOW
  delay(1000);                      // wait for a second
}```
#

Ohh my code was wrong

spiral sandal
#

iirc builtin led on uno is on pin 13 and you wired the 8

tribal burrow
#

making new project and I need to pick hardware, anyone got suggestions?

Requirements
Under 10$/โ‚ฌ per microcomputer
Has a digital output for a relay/led
Can open a capacitivePortal
Can connect to wifi with antenna and Ethernet
Easy to code

Thought about esp32 with ethirnet but i dont really like micropython and would prefer python

elfin sphinx
#

but no "microcontroller" like arduino or esp32 will be running full blown python

spiral sandal
spiral sandal
#

otherwise under $10 i only know "lichee pi zero" that could run full python3

#

but wifi/ether will raise the cost

dry anvil
#

Ok, i kinda need some help. Im doing a project where i am going to be using a raspberry pi to make a steering wheel (bc im too poor for an actual one) but i can't find out how to emulate the xbox one or controller inputs i need. Help would be appreciated.

tribal burrow
spiral sandal
#

hmm given the modules mentionned i'd say you don't want MCU, but more cheap arm socs with at least 512MB ram like *pi boards

hallow igloo
#

can you code the ESP32 in python??

spiral sandal
hallow igloo
#

oh ok

hallow igloo
spiral sandal
#

no idea

hallow igloo
#

same here

spiral sandal
#

note you can also code remotely small MCU that cannot run locally cpython, with telemetrix project

#

really cool with eg wemos d1 mini ( esp8266 )

hallow igloo
#

ok

#

you know the cheapest rasberry pi that i can use and buy in bulk maybe?

spiral sandal
#

i think the point of original "pi" is to be not bulk and quite unavailable to keep high prices, unlike "clones" pi ( cheap == where no one is getting paid to write accurate docs/samples/aftersale )

#

if you want bulk tbh go STM32

elfin sphinx
#

regular python requires lots of resources

#

also what version python does it support ?

spiral sandal
#

tbh python3.13 does not even fit on WII

elfin sphinx
#

ahh ok
micropython is a different story then

kinda important nuance to point out tho

since most beginners just want to copy paste their regular python code on a microcontroller which wont really work and then they will start asking questions "how do i download requests library in micropython" or whatever

spiral sandal
#

aiohttp ftw !

#

requests does not work on web properly !

elfin sphinx
#

requests uses aiohttp under the hood right ?

spiral sandal
#

nope it is synchronous

elfin sphinx
#

hmm

#

what library was it then that was like requests but used aiohttp pithink

#

i thought it was requests itself lol

spiral sandal
#

httpx can do sync/async iirc but never used it

tranquil robin
#

Hey, I need help with Bluetooth on my pyboard lite 1.0 (MicroPython v1.23.0 on 2024-06-02; PYBLITEv1.0 with STM32F411RE) and HC-05 module.
I have this code:

from pyb import LED, UART
import time


uart = UART(2, 9600)
uart.init(9600, bits=8, parity=None, stop=1)


led = LED(2)
print("Starte HC-05 Kommunikation...")
while True:
    data = uart.read()

    print("Empfangen: {}".format(data))
    uart.write("abc")
    led.toggle()
    time.sleep_ms(250)```
I don't get an error

Empfangen: None
Empfangen: None
Empfangen: None
Empfangen: None
Empfangen: None
Empfangen: None
Empfangen: None
Empfangen: None```

I connect RX from my module HC-05 to X3 and TX to X4. But if I try to send a string per terminal with a serial bluetooth app from android, it doesn't read anything. The app also don't get the "abc". But the connection works, if I am interpreting the led of HC-05 correctly

lapis talon
#

hello :D im completely new to microcontrollers and i have no idea where to begin, is there any specific one anyone recommends to start with?

cloud hinge
lapis talon
#

okay tysm!

cloud hinge
cloud hinge
elfin sphinx
weak bear
#

Hello, I try to use a rasspberry for simulate a mouse and recognize the color of a pixel on the computer's screen. The problem is, I have to use only library compatible with circuitpython. Do you have an idea for help me??

cloud hinge
elfin sphinx