#microcontrollers

1 messages · Page 27 of 1

true cradle
#

esp32 i suggest u buy the nodemcu one

#

one is esp32 other is 8266 different builds each

cedar jasper
#

any micro capable of runing a 7 inch touch screen?

true cradle
#

rpi

#

raspberry pi

#

@cedar jasper

timber ferry
#

ugh. make a robot?

true cradle
#

whats your def of cool stuff ? advantage of pice is small size so u should refer to some projects which take low space and low computing power since as far a i remember memory of pico is a little less

fathom grove
#

Hello!

#

I got an rPi pico

#

i use it for general

spiral sandal
#

the first one will not fit on a mini breadboard ( even if the pin was not bent), and will reset itself, at any close GSM activity nearby because of poor shielding. it will also have network problem on heavy load if used with stock micropython

#

it's dead cheap but there are others as cheap that can fit into mini breadboards ( pins writing are rotated 90° )

timber ferry
#

which ones

#

could you tell me a little more about the close GSM reseting thing too please?

#

@spiral sandal

spiral sandal
timber ferry
spiral sandal
#

can't tell, but if you are beginning with python you'd better go for ESP32 + 4MiB psram wroom type

timber ferry
#

i can do both python and c

#

i used arduino before

#

nob but still i got exp

#

noob*

spiral sandal
#

the cheap ones work fine with arduino so you won't lose any money ( iirc they are less than $2.50 )

timber ferry
#

well i don't own an arduino i did projects with it in groups. i'm gonna buy this esp for personal projects. like exploring myself

#

its actually my first time purchsing a MC for myself. i'm gonna start with small projects to maybe hosting some webs too

#

and my reasoning in buying ESP is bcz its cheap

spiral sandal
#

esp8266 is cheap, fun and 5volts tolerant, but using it with python require skill because it only has 32k sram useable

timber ferry
#

hmmmm you can say i'm rather novice in all these. i'm 10th grader. self learning from youtube.

spiral sandal
#

then go esp32 + psram, it's not cheap but it won't fail you

#

esp32cam is also a good choice though not much free pins

timber ferry
#

like this one?

#

heres its describtions

spiral sandal
#

search for one with PSRAM

timber ferry
#

do you mean these?

true cradle
#

u can get a arduino as well while u are at it there are many projects and fun stuff which can be done in conjunction with both

timber ferry
#

i got a budget of 6.5$
:'>

true cradle
#

oh

timber ferry
#

yeah.. .. . .. .

#

so i'm trying to be sure about what i buy before i actually purchase it

#

i'd buy a rp pico but esp has wifi modules

true cradle
#

well u should prolly look up some projects first

timber ferry
true cradle
timber ferry
#
  1. mq2 gas sensor that sends E mail notifications.
  2. web hosting a simple web
  3. moisture sensor that waters plants auto when low rating
#

these 3 seems basic

#

i have code ready for them

true cradle
#

i used to tinker a lot in class 10

timber ferry
#

but tinker removed esps idk why

true cradle
#

u mean tinkercad?

timber ferry
#

i use some other web for esp simulations now

timber ferry
true cradle
#

no i mean i have a box full of em arduino modules rpi and stuff in real life

timber ferry
true cradle
#

except for drones and one with lots of servos i made almost all of em

#

its like lego...

timber ferry
true cradle
#

now they are literally lying in dust

timber ferry
#

i understand. well after a year of searching and youtubing and getting bored i realized i should buy one or i'll fall out of interests

timber ferry
true cradle
#

i wanted to make the big ones but i cant access 3d printer too often

#

and they require a lot of 3d printing

timber ferry
#

awh. idk i don't have any 3d printers

#

maybe in future i will

true cradle
#

i had in my school

timber ferry
#

i just got a pc last year

true cradle
#

3d printers and the plc stuff cost a lot high maintenance also its better to go to a nearby workshop

timber ferry
#

now i buy MC. later i will buy parts for my MC. maybe then i can save moeny for 3d printer

true cradle
#

lol

timber ferry
true cradle
true cradle
#

lol if u wanna do basic projects u should prolly just by a arduino nano and u can still have a bit of money left to buy sensors and jumper cables

#

there isnt much u can do with esp32 as of now without other modules to use with it

timber ferry
#

for some reasones a nano is more expensive than a esp here

true cradle
#

ooh

timber ferry
#

literally the market here made a syndicate to make arduino 3x expensive here.

#

bcz its popular. esp fair price bcz its not popular

true cradle
#

wow wait lemme see how much it costs in my amazon

timber ferry
#

sure

#

but it was suppos to be cheaper than the uno

true cradle
#

$10

timber ferry
#

oooo

true cradle
#

700inr

#

70 inr 1$ so 10$

timber ferry
#

welp i have 6.5$ max budget :<

#

inr is ugh ruppies ?

true cradle
#

yes

#

it wasnt so expensive a few years ago

#

i mean i bought a uno for arnd $5/450 inr at that time

timber ferry
#

yesss a few years ago there were sooo cheap. for some reason arduino is alooot more expensive now

true cradle
#

its out of stock as well in many places

#

well then go for esp then

#

nothing else to be done

#

get a esp32

timber ferry
#

hmhmhmhmhm ok......

#

my kidney hurts using the last of my pocket money rn now lol

true cradle
#

be carefult to buy one in which the pins are already soldred

timber ferry
#

wait what

#

i should not get pre soldred ???

true cradle
#

u should get pre soldred

timber ferry
#

o0o0o0oo

true cradle
#

thats the best soldering urself is a pain in the ass

timber ferry
#

yes i agree.

#

i hate soldering

true cradle
#

some products just give the pins along with the board

#

my school ordered a few nanos once i swear my eye power increased after soldering them

timber ferry
#

lmao

#

i feel u but not entirely

true cradle
#

lol

#

well i checked it seems esp32 can run micropython and c++ both seems nice to me

timber ferry
#

bcz the most soldering i did was on arduino uno just 4 pins

true cradle
#

more powerful and better than arduino at lower price

timber ferry
#

i bet esp will over take arduino at this rate

true cradle
#

wifi connectivity seems better as well

timber ferry
#

bcz it feels like arduino is the apple of MC

true cradle
#

so for general public or beginners people might still choose arduino because it has larger number of tutorials and stuff

timber ferry
#

yeah.

true cradle
#

lol i still feel rpi is the best

timber ferry
#

its hard reading articles and low quality video for esp

timber ferry
true cradle
#

yes but it is like a own minilaptop

timber ferry
#

toooo much powerr

true cradle
#

it works with all sensors ever created for mc

true cradle
timber ferry
#

when i'm in uni i'll buy a rp 4b instead of a laptop and use remote desktop to use my pc in my rp4b

timber ferry
#

yeah a touch one

#

and a mini keybord

true cradle
#

i have 3b+ runs nice but unfortunately i forgot to buy a fan or heatsink

timber ferry
#

touch screen 10k case 1k rp4b 8k keybord i already have.
so almost in 20k i can just use that its cooler and just remote desktop my pc from it so its efficiant too!! laptop with my pc power will cost 120k+

true cradle
#

1k rpi4b?

true cradle
timber ferry
#

nice

#

do you like have a job already?

true cradle
timber ferry
#

class/grade/college?

true cradle
#

rpi 3b+ was 2.5k inr few years ago

#

high school 12 th grade

timber ferry
#

rpi is expensive now too much demand for it

true cradle
#

prolly i couldn't find it in Amazon scrolling 2 pages

#

dunno why demand rose or stock fell

timber ferry
#

yeah it is

#

bcz its tooo goof

#

good

true cradle
#

mostly people bored during lockdown

timber ferry
#

its just too good everyone wants it they can't produce enough

timber ferry
true cradle
#

i think if u but in local shops u can geta bit cheaper i saved a few bucks that way

timber ferry
#

impossiable to find it in local here

#

i tried

#

EVERY LOCAL SHOPS

true cradle
#

sed where do u live?

timber ferry
#

bangladesh

#

what about you

true cradle
#

ah india

#

lol i said inr

timber ferry
#

oooo hey neibor

true cradle
#

so u know Bengali?

timber ferry
#

i AM Bengali

true cradle
#

ah i am from West Bengal

timber ferry
#

kolkata ?

true cradle
#

but i think Bengali is a bit diff in both countries

#

yes

timber ferry
#

nicee. not so different. we have slightly different accent

#

some very minor words we use are like muslim cluture words and urdu words too. that makes our speaking slightly like very slightly differnet

true cradle
#

yah lol i saw that when i used to play coc and joined a Bengal only clan

timber ferry
#

oooo

#

you say dada we say vaiya

#

you say baba we say abbu

true cradle
#

ah

#

how do u know all that?

timber ferry
#

i mean we're 99% pretty similar. and i saw kolkata movies before

true cradle
#

ah cool

#

ok i GTG gn

timber ferry
#

oki bye bye

true cradle
#

u can ask if u have any doubts in dms

timber ferry
fathom grove
#

does someone of you own a Raspberry Pi Pico mcb?

errant wigeon
fathom grove
#

if anyone owns one

#

jusg

#

just

errant wigeon
#

Yup I've got one

humble kraken
#

I too have one

steep dune
#

ohhh , what convinced you to buy one?

quick spoke
#

Is this normal? I'm trying to upload like 4 lines of code in main.py on an ESP8266

Uploading to /...
Reading file status
[1/625] Writing file blink/boot.py (0kb)
[2/625] Writing file blink/main.py (0kb)
#

It also fails routinely, yet I can just run the code quite easily

hallow igloo
#
hallow igloo
true cradle
#

yep i see thx 🙂

timber ferry
#

@true cradle

#

yoo

#

i got que

true cradle
#

yes

timber ferry
#

can esp32 run some python libraries?

#

like pywhatkit

slow zealot
#

Hi all. Need some python help 😛
Have a 7 segment display i want to light up on my raspberry pi via a dict in my code 😕

#

have made a dict lbr, that have the right on and off combination, Only need to compare the dict with GPIO pins in some way so it will light up

sinful steeple
#

Hey! Has anyone here managed to successfully install Micropython on the ESP32-S2-Saola-1?

onyx glade
quick spoke
#

I appreciate the response though!!

onyx glade
quick spoke
#

It was a learning experience, haha

quick spoke
#

Shot in the dark, but do you all know of any 3/4 or 1" electronic valves that can operate at 5 volts? The options we found are either too small, too expensive (>$20/valve), or operate at 12 volts. I'm willing to modify or build it myself, but just to wanted to pick your all's brains about it.

true cradle
quick spoke
true cradle
#

oh ok lemme see

quick spoke
#

I've struck out on other forums and websites. No rush! I'm pretty sure I'll have to just find a 3/4" valve that's easy to turn and strap a servo to it

true cradle
#

is 1/2" fine or does it have to be wider

quick spoke
#

Wider :(

true cradle
#

ok what do u need it for?

quick spoke
#

A 1/2 that works on 5v may be a reach option if we get desperate

#

We have low pressure water coming from a water tower we build in the middle of nowhere supplying water to our crops, think like 3 psi and flow doesn't reach sufficient amounts unless the pipe is 3/4" wide

true cradle
#

do u need power equivalent to 3/4" or just need more output

quick spoke
#

Our solar panel and batteries supply 5v

true cradle
#

hmm

quick spoke
#

Power equivalent? I'm not sure I understand

#

I'm a chemical engineer, not electrical, by trade, so I'm a bit of of my element here

true cradle
#

i mean u want water output at high. pressure with 3/4"

quick spoke
#

Oh! Just 3psi, some latching valves have a minimum pressure requirement

true cradle
#

how much psi does a 1/2" valve have?

#

so i can give u 2 solutions currently either u can modify the nozzle urself for 1/2" valve making it wider

#

and give it external power supply using lion battery

quick spoke
true cradle
#

then u can just get ur custom nozzle

#

widen ur current nozzle of the valve

quick spoke
#

Huh? Wouldn't the necked region restrict the flow if it was a 0.5" valve?

true cradle
quick spoke
#

oof

#

I understand you now

#

what about a 5v to 12v step up module?

true cradle
#

using preferably li-ion batteries

hallow igloo
#

hey there! i got a simple question, is pi pico good for using python?(i new to microcontroller)

#

im*

true cradle
#

so there isn't much connection whether it is good for python or not it's same as asking is ur windows laptop good for python

#

basically matter on ide

#

pico has thonny

#

which is good for beginners

hallow igloo
#

so does it mean that i cant use all the sensor with it?

true cradle
#

you can it has pins

hallow igloo
#

i heard it doesnt support all?

#

is that so?

#

coz i want to use it with multiple sensore

#

sensors*

true cradle
#

depends on number of pins available

hallow igloo
#

like bmp mpu 4 servo and couple of led

true cradle
#

led need only one pin servo same

#

more than enough

hallow igloo
#

yeah thank you for the help dude

true cradle
#

u have to power the servo externally for better performance

#

and ground will connect to board

hallow igloo
#

its the same battery so i dont think there will be a problem

#

how can i switch heavy load with pico?

#

mosfet?

#

or bjt?

true cradle
#

hmm

hallow igloo
#

?

true cradle
#

idk i never tried or see them before so lemme run thru their docs

hallow igloo
#

ohk

#

let me know

#

!

true cradle
#

bjt

hallow igloo
true cradle
hallow igloo
#

haha thanks

solemn oasis
#

Does anyone here know about any Raspberry Pi Simulator?

raven imp
#

anyone who knows something about raspberry pi gpio's and relay?

timber ferry
#

Yeah why?

timber ferry
heady quest
#

hey I need help with connecting a python program to my lego mindstorms brick, any ideas?

#

I found an API for it, but I can't use it with vscode

#

hello?

#

anyone?

raven imp
onyx glade
#

I coded for 8 hours straight yesterday via ssh onto my raspberry pi 4, and my power supply broke and shot out 9v and it fried the thing…

#

The OS was Ubuntu server 20.04, if I use a raspberry pi 3b will it probably work with the same sd or will I need to figure something else out?

#

(Avoiding reinstalling stuff)

steep dune
#

@onyx glade too bad about your power supply - could you send a pic of supply and the box it came in -- maybe others have same type ?

true cradle
#

use either rechargeable batteries for steady supply or some powerbank another option would be small invertors

#

essentially still rechargeable batteries

humble kraken
humble kraken
onyx glade
#

It was dumb in retrospect but I just didn't have a good one to use.

steep dune
#

@onyx glade i use a old ATX power supply for my projects s , clean 3 , 5 , 12 V - just a new cable adaptor - then i dont have to worry about , under AMP or UNDERVOLT , because if i use LM317( 3V ) or 7805 , 7812 , they have odd voltage related to temp behavior

#

for my RPi i use a adafruit supply specifically for a pi 3

stray raptor
#

drgh vhj;ujrghj.kl;'

#

oiu

#

,,

hasty zealotBOT
#

:incoming_envelope: :ok_hand: applied mute to @stray raptor until <t:1652588287:f> (9 minutes and 59 seconds) (reason: duplicates rule: sent 4 duplicated messages in 10s).

onyx glade
#

Any debugging help? I recently bough a new rpi 4 and when I set it up, I set it up to connect to my network VIA the raspberry pi imager. Upon boot it works but when I went to ssh into it, the pi disconnected from my router. I restarted my PI but this time it wouldn't even connect once.

#

The RPI is running on Ubuntu Server 20.04, I connected a display and it says: brcmfmac: brmcf_sdio_txfail: sdio error, abort command and terminate frame, writing this ever 1 or so seconds.

#

Update:
I just swapped the os with raspbian and am updating everything, but I was able to ssh in.

#

Connection died midway through

onyx glade
#

Update 2:
I had a wifi adapter laying around so I decided to give that a shot, it seems to work fine now. Do you guys think I could've gotten a bad board?

tropic horizon
#

try a different cable?

onyx glade
tropic horizon
#

oh I misunderstood

onyx glade
#

I might have gotten it working

#

Idk what I did, but I'm at a new record for connection time lol

#

Nope

true cradle
#

u could use ethernet

true cradle
#

WiFi chip BCM4345/6 -----> RPI 4 wifi chip

#

it might have something to do to initialize the wifi chip

onyx glade
#

I just bought the thing, so I'm starting to consider returning it and just buying a new one

#

I do appreciate you looking into it a ton though!

true cradle
#

yeah as far i remember rpi has a warranty period

#

np

onyx glade
true cradle
#

but if u want a stable wifi connection i think ethernet is the go to choice

onyx glade
true cradle
#

oh welp

#

well u should probably return that board ig ...

onyx glade
delicate knoll
#

there is a python library for power measurement via current transformer on esp 32?

errant wigeon
errant wigeon
onyx glade
spice relic
#

holistically, if you had two of the same kind of usb device connected to a microcontroller, is there any good way to reliably distinguish between them? or is that a situation of wanting to avoid that design altogether

true cradle
#

as both will be assigned different ports by the rpi

spice relic
#

not a bad point actually, thanks 🙂

next charm
#

Hey guyz I'maa having a problem with esp8266 I wanna control my home appliances with esp btw it cant handle my relay even if added a transistor

timber ferry
#

I want to use some pyautogui and pyqt5 and some more audio library in my esp32 but it seems I can't use them there for some reason can anyone help me?

gentle vapor
left oasis
#

Pyautogui is only supposed to be desktop

timber ferry
timber ferry
#

I want a message box to pop up when I plug in my esp32

true cradle
#

design a gui then should be possible in esp

rigid tangle
#

hi all, am trying to program the ESP32-Cam Wrover Module, but I've been getting this error for quite some time also I looked at most fixes online and none of them work. Is anybody here able to help with this or has worked with this module before? Help 😦 😦

true cradle
#

problems like this are either the com port or the board is fried

spiral sandal
spiral sandal
#

and 5volts power pin , 3volts is not enough for most esp32cam, otherwise yes bad com port , bad cable or board fried

rigid tangle
#

alright thanks, guess I just have to get a new one

soft latch
#

does anyone know how to controll led screens in ardrunio

true cradle
finite orchid
uncut hamlet
#

Anyone with FRAM / I2C experience that could potentially help me figure out something ?

wintry junco
#

hey can we use f-strings with ssd1306 in micropython

gentle vapor
#

Micropython supports f-strings, I'm not sure what you mean with "with ssd1306", a string is a string

balmy ravine
#

I need help setting up my rpi pico

#

@true cradle I need help with my rpi pico

true cradle
#

what help?

balmy ravine
#

@true cradle can u help or not? NP if u can’t

hallow igloo
#

What's the best micro controller to start with python? I have an Arduino Uno, but that uses a different language.

open ingot
#

raspberry pi

true cradle
timber ferry
hallow igloo
hallow igloo
gentle vapor
#

it supports Micropython and Circuitpython, which gives you a chance to explore both

#

CP support the Seeed Xiao boards, which are pretty cheap too, MP should run on the Xiaos too, though only the samd21 one is listed on the site. RP2040 boards are great for python, I don't advise SAMD21 boards in general for lack of RAM.

#

cheap ESP32 or ESP32S2 boards would be good too, the LOLIN S2 Mini for example

#

4MB flash, 2MB ram, gives you a chance to play with wifi

#

all of these have prices in the $4-$6 range

tired lintel
#

Guys, do you think I would be able to make rc car with rpi4?

Does it store code like arduino? With arduino i can upload code and when its plugget to power it would do that. But with rpi4 you'd have to manually run the code?

carmine kestrel
#

@tired lintel Use your favorite search engine with the keywords "RC car with rpi4 programming with python," which supplies many step-by-step examples and YouTube videos in different price ranges. PS4 controllers can even be used to steer the car.

true cradle
# hallow igloo No, I know python already, just want a micro-controller to learn electronics.

let me chalk it up for you rpi u can basically install your ide and run any project on it , Arduino runs c++ but their is a way to run python on it
https://www.google.com/url?sa=t&source=web&rct=j&url=https://docs.arduino.cc/learn/programming/arduino-and-python%23:~:text%3DThe%2520Arduino%2520IDE%2520does%2520not,available%2520directly%2520in%2520the%2520editor.&ved=2ahUKEwiqqsCdvfT3AhWKSWwGHQBkDTMQFnoECA8QBQ&usg=AOvVaw1wKim_JxP5AlJ1kCIKbFK-
otherwise u could also go for espew which it's official and inbuilt ide supports micro python

true cradle
timber ferry
tired lintel
#

Do you think I can make a wifi hotspot for my rpi so I can connect my phone to to access it's flask application?

true cradle
boreal creek
#

Hi guy! i have a question about DIY project, when we use arduino for project and when to pick the other type of microcontroller ? for example drone, electronic toy car or cleaning bot, etc. Because as i known, except for Ras pi, arduino and some other microcontrollers both have the same abilities

tired lintel
#

Can you have Flask webserver on a RPi Pico?

#

I do know I'd need a wifi module, but is it a long shot to even try?

#

I rather just get RPi 4b for this project then.

true cradle
next charm
boreal creek
true cradle
#

looks nice aesthetically idk how it works tho never used it

errant wigeon
# boreal creek Hi guy! i have a question about DIY project, when we use arduino for project and...

Typically you pick the micro according to your design constraints. The pinned message in this channel has a description of programming with python on microcontrollers, but here's a list of circuit python compatible boards: https://circuitpython.org/downloads
Sometimes you need low power consumption, sometimes you need lots of chips, sometimes you need lots of ram. That's the kind of variables you consider when exploring which chipset to you.

errant wigeon
# tired lintel Can you have Flask webserver on a RPi Pico?

A pico is a microcontroller, and it doesn't have much peripheral hardware (no onboard wifi). A rpi 4b is a full embedded linux system, so you can run just about everything that can run on a linux kernel. The pico is great, but you're right you'd need to try to get a wifi module with it. You could switch to an ESP32-S2 or something of the sort, but a rpi4b might be easier if you really want the flask webserver

tired lintel
stuck tulip
#

you mean phish?

#

oops, never mind 🙂

boreal creek
spiral sandal
#

avr or stm32 mcu are very common and arduino ide can handle both

spiral sandal
boreal creek
#

ah ok ! thx, i'm new to embedded, so should i pick arduino for learning and practicing ?

spiral sandal
#

MCU and SOC are two different worlds

boreal creek
#

wow i'm confused with those boards

#

it's a lot

spiral sandal
#

orange pi though has both an MCU and SOC, but the mcu part is very hard to program it's an old or1k design

spiral sandal
boreal creek
#

which one is the most easiest and flexiblity ?

spiral sandal
#

it's two different jobs

#

but afaik no one ever got sued because the movie player crashed mid movie in a car

boreal creek
#

i mean like which board is the best for studying embedded programming for beginner ?

spiral sandal
#

i'd say any board will do since after a while they will all look to you the same because you'll know how they are made and work. but in the process you may destroy a lot of them so maybe pick a bag of cheap ones first

#

esp8266 is really very cheap

#

cheaper is the stm32 "bluepill" but it's harder for beginner

#

and has no wifi

#

these are stil MCU

#

esp32 is not really an mcu it's a dual core and can run like (and probably faster) a personnal computer of the 80"

boreal creek
#

wait ?if i code wrong, will the code destroy the board ?

spiral sandal
#

it could

boreal creek
#

OMG

#

there was a guy on youtube make tutorial about UNO board

#

is it cheap and good enough ?

spiral sandal
#

esp8266 is way better than uno

#

it can do the same ( at beginner level) as a uno and more , for cheaper

boreal creek
#

wow

#

wait does it explose when i make a mistake on coding

spiral sandal
#

also esp8266 is 5 volts tolerant like arduino uno

#

so less "magic smoke"

boreal creek
#

does microcontroller make fire or shocking if i set up it wrong ?

#

i've never touch any board before

spiral sandal
#

well avoid touching them first, they don't like static electricity

#

and no they should not make fire, that does not mean you don't need to have a bucket of sand at hand on the workbench

#

better safe than sorry

#

fire hazard is real for board with li-ion cell and bad design

#
boreal creek
#

can u power it by computer power ?

#

because it seems more safety than battery

spiral sandal
#

a separate quality 5volts supply is usually better/safer

#

especially when playing with motors

boreal creek
#

do u hknow any youtube channel teach about embedded programming ?

#

like a recommend

spiral sandal
#

no i still use books

#

and datasheets

boreal creek
true cradle
true cradle
mystic haven
#

@rose furnace why did you spam this message over like 10 different channels? ...

#

!rule 7

hasty zealotBOT
#

7. Keep discussions relevant to the channel topic. Each channel's description tells you the topic.

dry fulcrum
#

<@&831776746206265384>

mystic haven
#

you can get help, but use the help channels, there's #❓|how-to-get-help, don't just spam your way toward getting quick help

calm tapir
#

!mute 858614454623010847 1d If you don't care about our rules then you definitely won't get help here

hasty zealotBOT
#

:incoming_envelope: :ok_hand: applied mute to @rose furnace until <t:1653672488:f> (23 hours and 59 minutes).

onyx glade
#

To anyone who has knowledge of rpi clusters, do they operate under the same concept as a botnet, just local?

#

I mean the sense that they all operate by themselves, but the way the operate is dependent on one rpi.

icy quarry
#

So basically it just mens a group of rpi doing something in a coordinated manner somehow

pine cloud
covert mica
#

Hello, Guys,
I have no idea, what can I do... I mounted EEZYBotArm MK2 arm and I have coded simple code to cotrol him. I got stuck...
I run the script ServoFirmata for firmata protocol in Arduino IDE, then I run python code.
I have installed pyfirmata library. I choose a board in Arduino IDE and run the script, next I run the python code.
I had been running python code in file before I decided to run line-by-line code in a python shell.
Firstly, I import library and SERVO and Arduino variable from pyfirmata's module. Secondly I set board variable, which It is connector with Arduino board. Then I run SERVO mode on the pin and at this moment servo starts rotates in infinity.
The same thing happens when I type: board.get_pin("d:3:s"). I need your help.
Full test code typed in the shell:
First version:

from pyfirmata import Arduino, SERVO
board = Arduino("COM5")
board.digital[3].mode = SERVO

After these lines servo starts rotating all-the-time.
Second version:

from pyfirmata import Arduino
board = Arduino("COM5")
pin1 = board.get_pin("d:3:s")

After these lines servo starts rotating all-the-time.

Help, Guys... Gimme a hand.

covert mica
#

ech

#

problem solvefd

#

solved

sage flare
#

hi guys,i have a problem with pymata,I've been trying to use a hc-sro4 sensor with my arduno uno and then I got this error

#

'''py
from random import triangular
from tkinter import OFF, ON
import speech_recognition as sr
from pyfirmata import Arduino
from pymata4 import pymata4
from socket import socket
import time
#used to check if the arduino port selected is the right one
#board = Arduino('/dev/ttyACM0')
#print(board.get_firmata_version())
#led = board.get_pin('d:10:o')
#red = 9
#blue = 8
#yellow = 5
trig = 10
eco = 11

board = pymata4.Pymata4( com_port='/dev/ttyACM0', arduino_wait=10, baud_rate=57600)

def the_callback(data):
print("Distance is: ", data[2])

board.set_pin_mode_sonar(trig, eco, the_callback)

while True:
try:
time.sleep(1)
board.sonar_read(trig)
except Exception:
board.shutdown()

#r = sr.Recognizer()

#try:

text = r.recognize_google(audio)

print("You said: {}".format(text))

#except:

print("Sorry, cannot understand what u said.")

#board.digital[red].write(ON)
#board.digital[blue].write(ON)
#board.digital[yellow].write(ON)

#with sr.Microphone() as source:

print("Say anything: ")

audio = r.listen(source)

#try:

text = r.recognize_google(audio)

print("You said: {}".format(text))

#except:

print("Sorry, cannot understand what u said.")

#if text == 'red':

board.digital[red].write(OFF)

#elif text == 'blue':

board.digital[blue].write(OFF)

#elif text == 'yellow':

board.digital[yellow].write(OFF)

'''

#

I hope someone can help me

subtle fable
#

Did you mean to put that as parameters on the line before? Why are you calling Pymata4() multiple times?

rigid tangle
#

Hi all, I am working with the BMP280 sensor, form keyestudio, but when i upload the test code...I don't see any readings on the serial monitor, just saying "BMP Test". Any idea what is matter. I have my connection in I2C mode.

sage flare
#

raise RuntimeError(f'Firmata Sketch Firmware Version Not Found')
RuntimeError: Firmata Sketch Firmware Version Not Found

onyx glade
agile bridge
#

Hi I have a normal raspberry pi 4b with 4gb of memory and am using a 16gb SD card

Im also using a 3rd party raspberry pi nightvision camera, and i got it working after changing in the config.txt in boot with the start_x = 1 command

But now two days later i tried to use libcamera-hello and got this error

Made X/EGL preview window
[0:01:42.607683880] [2022]  INFO Camera camera_manager.cpp:293 libcamera v0.0.0+3544-22656360
[0:01:42.627085727] [2023] ERROR CameraSensor camera_sensor.cpp:591 'ov5647 10-0036': Camera sensor does not support test pattern modes.
[0:01:42.647450519] [2023]  INFO RPI raspberrypi.cpp:1356 Registered camera /base/soc/i2c0mux/i2c@1/ov5647@36 to Unicam device /dev/media3 and ISP device /dev/media0
[0:01:42.648312648] [2022]  INFO Camera camera.cpp:1029 configuring streams: (0) 1296x972-YUV420
[0:01:42.648655119] [2023]  INFO RPI raspberrypi.cpp:760 Sensor: /base/soc/i2c0mux/i2c@1/ov5647@36 - Selected sensor format: 1296x972-SGBRG10_1X10 - Selected unicam format: 1296x972-pGAA

also when trying to use cv2 for videocapture(0) i get false on the first variable returned

true cradle
agile bridge
#

I only changed two lines in config.txt to make it work

#

but now a few days lateri t doesnt work

true cradle
#

did u by chance plug in the camera after starting the rpi?

#

anytime?

true cradle
agile bridge
#

nope, i plugged it in beforehand and havent dissconnected it since

true cradle
#

seems likely it's only a setting problem

#

do u have camera enabled in settings?

agile bridge
#

but how, i literally didjnt change anything

#

of course

true cradle
agile bridge
#

like, when doing libcamera-hello the camera opens up for a second then crashes with that error messege

true cradle
#

what did u change inur config.txt

#

also send link for ur cam module

true cradle
agile bridge
true cradle
#

did u remove those nightlamps and screw them back on anytime?

#

ir lamps*

agile bridge
#

nope

agile bridge
true cradle
#

wow that's srsly strange then

true cradle
agile bridge
#

trying to find

true cradle
#

ok

#

if nothing works

#

just reload ur raspian

#

os and try again

agile bridge
#

oh god no

#

not again

#

i really hope it wont come to that

#

ive done that too many tim,es

#

at this point

true cradle
#

lmao send the changes here when u find em

agile bridge
#

i commented out camera_auto_detect=1 and put in start_x=1 and gpu_mem=128

true cradle
#

hmm

#

i see

#

give me a sec

true cradle
#

the camera module are now updated apparently

#

so no need to use the old ones

agile bridge
#

What do you mean

#

Regardless of whether i change config or not

#

It still aint workin

#

But it worked 2 days ago

#

I have just reset settings back to default

#

still get this

Made X/EGL preview window
[0:00:47.580062856] [1602]  INFO Camera camera_manager.cpp:293 libcamera v0.0.0+3544-22656360
[0:00:47.604756117] [1606] ERROR CameraSensor camera_sensor.cpp:591 'ov5647 10-0036': Camera sensor does not support test pattern modes.
[0:00:47.639684967] [1606]  INFO RPI raspberrypi.cpp:1356 Registered camera /base/soc/i2c0mux/i2c@1/ov5647@36 to Unicam device /dev/media3 and ISP device /dev/media1
[0:00:47.641070890] [1602]  INFO Camera camera.cpp:1029 configuring streams: (0) 1296x972-YUV420
[0:00:47.641610222] [1606]  INFO RPI raspberrypi.cpp:760 Sensor: /base/soc/i2c0mux/i2c@1/ov5647@36 - Selected sensor format: 1296x972-SGBRG10_1X10 - Selected unicam format: 1296x972-pGAA
#

and still recieve nothing when using opencv

#

so default settings aint workin for me

errant wigeon
prime arch
#

hallo. Has anyone used U-Blox ZED-F9R or F9P GPS with ROS? I am writing a python code in ROS to send and receive data from GPS.
I have some doubts on sending data to the u-blox module. Kindly let me know if anyone have any experience.

More details:
Default IMU alignment in module = manual. Should send command to change it to Automatic.
Wheel tick data (Velocity data) outside the module should send as a publisher for correcting the GPS data.
I just need some example scripts that has similar or same purpose as above. Kindly support and Thanks!

potent rover
#

does anyone know where they sell micro usb adapter?

#

for my rasp pico

#

this is the example in my highly detailed drawing

cyan folio
#

What is microcontrollers?

opal lodge
# potent rover does anyone know where they sell micro usb adapter?

that very much depends on where you are in the world and where you prefer to buy from
but a quick google search for "micro usb to usb b adapter" (without the double quotes) should give you plenty of options
make sure you get the male and female connectors right for your requirements

drifting mesa
# potent rover no one sells it with 2 ends
opal lodge
potent rover
potent rover
#

its more expensive than the actually rasp pico 😂

gentle vapor
potent rover
#

one

gentle vapor
#

it's a male-male micro USB to USB A

#

it's just weird because the USB A plug has no casing around it

#

also it will plug your pico upside down with normal USB plug orientation

#

fits well in my hub, not as well in my laptop's ports

potent rover
sharp idol
#

So im trying to make Simon says from scratch. I’m not familiar with micro python though. What would be the best way to save a series of button inputs?

dim palm
balmy ravine
#

here is my code. I have a HC-SR501 PIR sensor co nnected to my pico but it isnt working why?

balmy ravine
#

@potent rover @true cradle

brisk plover
#

trying to control the microphone port and make it work in a certain way or any way that i need to

Receiving sound in a certain way, storing it in a certain form, stopping storing it in another way, and like that, converting it to other things

trying to learn a program language that i need to build robot mind 😔
i dont know what i need to have and learn

some people say i need
1-cpu
2- a driver api to interact with for Python to touch the microphone.
ok what about knowledge that i need for know how use 1 and 2
python? something specific

sharp idol
#

Has anyone used the on board pi pico rtc? I tried youtube but everyone seems to be using an expansion board or another.

void zenith
#

Finally got it done. It's a robot that pulls pucks from a conveyor belt and sorts them based on color. All the detection part was done using opencv.

sly depot
sly depot
sharp idol
tired schooner
#

Hi fellow coders

#

I have a project where a RPI Zero W is my host machine, so I'll try my luck here (this is obviously not very related to microcontrollers since any linux machine would have the same functionality)
basically, I send a BT signal via a remote to my RPI and it has to turn my lightswitch on

#

Issue I'm having: remote is BLE(low energy), so it "shuts off" after 5 mins
which means when I click the shutter again after 5 mins, the remote first has to connect to my rpi and after like 5 secs, it works as intended
this is shit because who wants to press his shutter/lightswitch twice for it to function properly?
(current fix: on connection, it just assumes I clicked the button, so it toggles the lightswitch)
this still takes 5 secs however, too frickin' long
any intakes on this? can I intercept the BT signal before it's even connected?
currently the shutter just acts as a keyboard and there's a script running in the background:
once shutter is connected, wait_for input, if input, toggle lightswitch

balmy ravine
#

I need help

#

I want to make a project with my pico but I don’t know what a specific component is called

#

It releases things on command

sharp idol
balmy ravine
#

Thanks for replying

#

I am trying to make a catapult and need an electronic device that will release the arm on command

#

so releases objects

#

@sharp idol

sharp idol
#

How are you storing energy, a spring on the arm?

#

Also I might pass out, if I do I’ll reply when I wake up.

balmy ravine
#

ok

#

The arm (piece of wood) will be connected to an extended spring and then connected to the electronic I don't know yet, when a button is pressed the electronic will release the arm, the springs tension will cause it to fly out. It will then hit a piece of wood to stop the arm and to make whatever is in the catapult to fly out

#

@sharp idol

fluid gull
# cyan folio What is microcontrollers?

Microcontrollers are typically low-power packages containing CPUs + Flash ROM to store code + a small amount of RAM + sensors, that typically run only one program in a loop, without the overhead of running an operating system; they are typically embedded in physical applications (think doorbells, car key fobs, microwave ovens, etc.)

true cradle
#

what is life of a rpi 3b+ would it be fine if i host discord bot long term using it?

opal lodge
# true cradle what is life of a rpi 3b+ would it be fine if i host discord bot long term using...

don't know but have not had any fail on me or anyone else i know irl yet (and as a total that is quite a few units that has been in service for many years)
what can fail is the micro-sd card if you run them long enough and have to much writing happening to them even if you buy high quality cards, so don't neglect backups, also for other contingencies
actually, the two times it has happened to me after many years of service the samsung cards could not boot as my root file system required read-write but could still be mounted read-only on another computer and copy all the data off the cards
the cards small on board memory contoller goes into a hardware locked read-only mode when it thinks the card risks data integrity with any more writes to protect any data that might be on the card

sharp idol
sharp idol
sharp idol
#

Do i need a 5v regulator for AA batteries?

humble kraken
humble kraken
sharp idol
#

That’s a lot of acronyms. I’m assume MCU is micro controller unit and not marvel Cinematic universe but what is LDO and why are 4 AA dropping close to half if voltage

true cradle
#

nice thank you for your responses guys

sharp idol
#

Does anyone have a good resource for created a bluetooth remote and a bluetooth recieve using two picos? Want to make an rc car from scratch

cyan folio
rigid tangle
#

Hi, Say I want to send only the value of temperature read from a sensor connected on an Arduino board, to an esp32 board, how do I do that using serial comms?

timber ferry
#

hellooo

#

can anyone help me using esp32 ?

#

i don't know if i need some sort of driver board to use 3 servo motors

wicked flax
#

Is it possible to do direct port manipulation using esp8266 and micropython??

#

i cant find instructions about it online

timber ferry
wicked flax
timber ferry
#

Tx and Rx pins in arduino are used for serial communication more accurately its called UART (Universal Asynchronous Receiver Transmitter). You can use this to communicate with any other device that has UART protocol(just make sure the baud rate or bits per second are same for both).

#

same for esp32 and esp86266

wicked flax
timber ferry
#

ye

wicked flax
#

i was not asking how to program it
i was asking how to directly control its registers using code in micropython
or is it even possible
in an arduino the avr_dude library lets us do this

timber ferry
timber ferry
#

And idk why there's soooooo minimum micro python libraries. there aren't even any sound or i2s library released

wicked flax
#

(usb a or b)

wicked flax
royal willow
# rigid tangle Hi, Say I want to send only the value of temperature read from a sensor connecte...

responding late, but you should be able to connect the 2 devices using UART. UART has an RX pin (read) and TX pin (transmit), if you connect read->transmit and transmit->read between the 2 boards, you could communicate back and forth between the devices using some sort of UART library. You can probably just connect the arduino transmit to the esp read as you dont need communication the other way, but this is something I would look up to make sure

#

but UART is what you are looking for, look up how to connect have 2 microcontrollers talk to each other through uart

sharp idol
#

Does anyone know if the SH90 servo is continuous and if so how to use it with the pico? Everything I’m finding is 180 but I can physically spin it 360.

visual gale
#

hi i was wondering if anyone could help me figure out of to include the library cvzone with arduino uno using a zip file of cvzone. Ive already tried and for some reason it wont work.

#

i keep getting "Arduino: 1.8.19 (Mac OS X), Board: "Arduino Uno": Specified folder/zip file does not contain a valid library
"

timber ferry
#

can anyone help me how to install modules from github to my esp32 micropython

#

anyone? n one? ok..

sharp idol
#

Im not getting any input. I made sure tx and rx are connected correctly. I can connect to the hc-05 but Im not recieveing the hello nor is the terminal showing any recieved data

#
from machine import UART, Pin
import time

uart0 = UART(0, baudrate=9600, tx=Pin(0), rx=Pin(1))
uart0.write('hello')  # write 5 bytes
while True:
    print(uart0.read(5))
    time.sleep(1/2)    ```
hallow igloo
#

Wow

#

why did I not check this before

timber ferry
#

❔Can someone help me figure out what type of MOTORs should I use for my Robotics project?❔

#

I want to use DC motors.
I need a ~1700g/cm torque or 1.7kg/cm torque to make my robot walk.
I'll use 2 motors (bcz it has two legs)
🚩 Now I'm not quite sure on which motor to use.. a 4 or 6 volt DC motor? 12 volt? But the 12 volts would be a over kill 🚩

#

📝Robot weights around ~1kg
📝 7×7.5 inc diameter robot
📝Materials are mostly Plastic [PVC (leg) and PET (body)]

#

✨Can anyone Suggest me something? ✨

sharp idol
#

I’ll try that @timber ferry And look at these https://a.co/d/ghWDNiB they use Han combined torque of 1.6 kg/cm using two. Use the L298n motor controller

craggy sundial
#

MICROCONTROLLERS

sharp idol
timber ferry
#

also import os

timber ferry
sharp idol
timber ferry
#

you might need to do something like this

import os, machine
from machine import UART
os.dupterm(None, 1)
uart = UART(0, baudrate=9600)
uart.write(‘Hello’)
uart.read(5)
os.dupterm(uart, 1)
sharp idol
#

Gotcha. I should be okay without duplicating the terminal.

timber ferry
#

i havn't gotten to the uart things on my project yet so i'm sorry if i'm wrong in some things

sharp idol
#

Apparently I either lost or threw away my Bluetooth module (it was hc05 and I can’t use it with my iPhone) so I have to wait for my new one to get here today.

craggy sundial
#

who knows AVR programming here right now

stable lantern
#

What do you think? 🙂

craggy sundial
stable lantern
#

yes

#

but first i've made arduino code

#

and next i go to code in python

#

always ";" on the end of line 🏀

#

hah

sharp idol
#

Finally fixed my bluetooth problem. bt = UART(0, baudrate=9600, tx=Pin(0, Pin.IN), rx=Pin(1, Pin.OUT)) Had to specify pin in and pin out. also assumed that tx was out and rx was in since ya know, transmit and recieve.

craggy sundial
#

so u can indeed code in python

#

in ardiunoo

#

and make projects work

#

nice

stable lantern
#

no no no

#

communication by serial port

#

python app is sending data about servo pos to arduino

#

and arduino reads it

craggy sundial
#

welp

#

i have'nt really worked on arduino smh

#

i need to really learn arduino ig

craggy sundial
stable lantern
#

yes

#

origninal

craggy sundial
#

we only have access to fake ones here then

#

i mean we can buy

#

but

#

the fake ones are inexpensive

#

and have literally the same functions

stable lantern
#

yea, but that was a gift

craggy sundial
#

cool

stable lantern
#

arduino isn't hard

hasty zealotBOT
#

Hey @craggy sundial!

It looks like you tried to attach file type(s) that we do not allow (.c). We currently allow the following file types: .gif, .jpg, .jpeg, .mov, .mp4, .mpg, .png, .mp3, .wav, .ogg, .webm, .webp, .flac, .m4a, .csv, .json.

Feel free to ask in #community-meta if you think this is a mistake.

#

Hey @craggy sundial!

You either uploaded a .txt file or entered a message that was too long. Please use our paste bin instead.

#

Hey @craggy sundial!

You either uploaded a .txt file or entered a message that was too long. Please use our paste bin instead.

craggy sundial
#

uh

#

smh

#

i need to read rules again mayhaps

#

ig

#

this is ti

#

so

#

this is my lab project, the schematic and hardware stuff is complete

craggy sundial
#

the problem is

#

the ADC is not working

#

on protesus it shows this error

#

i have tried diff commands in the program

#

but nope

#

been on it for forever now

#

today was project submission

#

but since code wasnt complete

#

i asked for more time

#

i have no idea now, for whats wrong with the code

median oyster
#

hmm

craggy sundial
errant wigeon
#
ADMUX |=(1<<REFS0);//setting the reference of ADC
ADCSRA |=(1<<ADEN)|(1<<ADFR)|(1<<ADPS0);

I also don't see where these are defined, so you should probably check to make sure you're setting the registers bits correctly

craggy sundial
#

And play with the program some more

#

Will give update later

craggy sundial
craggy sundial
#

I mean, wdym they're not defined

#

I'll read a bit more bout it too

errant wigeon
#

are those predefined avr values or are they defined by your program?

craggy sundial
craggy sundial
#

ATmega8

errant wigeon
#

ok cool, it's been almost a decade since I went through the avr data sheets so I'm rusty on it

craggy sundial
#

Lemme open

errant wigeon
#

There's a section that starts on page 201 that tells you about the adc, it's registers, and how to set them

#

pg 214 has the registers listed out in a table

craggy sundial
#

Ye i see em

craggy sundial
#

Didn't specifically read this pdf

#

I have lab course named

#

Microprocessor and microcontroller

#

And the project also belongs to that course

#

We had lab tasks, manual

#

Probably missed something out

#

Should also review them again

errant wigeon
#

if you can figure out which line is throwing the locked error, you can try re-enabling the adc right before that line. Without knowing the line throwing the error it's taking me a really long time to step through the code

craggy sundial
#

I get you

errant wigeon
#

Once ADCL is read, ADC access to Data Registers
is blocked. This means that if ADCL has been read, and a conversion completes before ADCH is
read, neither register is updated and the result from the conversion is lost. When ADCH is read,
ADC access to the ADCH and ADCL Registers is re-enabled.
This also might be associated with why you're running into a locked error, but again without know where the error is coming from it's hard for me to pinpoint it

craggy sundial
#

It must be at least

craggy sundial
#

Smh

craggy sundial
#

Althoug its already known

#

🥶

#

Is it because its ATmega8

#

Smh

craggy sundial
#

@errant wigeon KEIHHHHHHH

#

ITS WORKING

#

AAA

craggy sundial
#

Can't help, that's a Sick component

#

Lit

errant wigeon
craggy sundial
#

And i made another unsigned char to store the adc value

errant wigeon
#

Nice, good job working towards the solution!

#

How is it wired up and what are you running through it?

tropic sandal
stable lantern
# tropic sandal bro how did you connect python code from ide to the robot? and using which all c...

robot: https://www.thingiverse.com/thing:1454048
I just made python code sending data by serial and arduino code reading it
using pyserial library

next crescent
#

hello guys, does upip support every pypi library?

#

such as discordpy, tensorflow.......

#

or the libraries should be compatible?

next crescent
#

Thank you so much !

wet ether
next crescent
#

I want to make an AI on my esp32 and I want it to interact with me through discord

#

But it’s too much space for a simple esp32

#

So gotta make it light somehow

wise ruin
#

using better handler will be better for controlling

past oak
#

how do you do configparser with micropython?

vivid nebula
#

Has anyone experiences with the pi pico? What frequency can I measure with micropython? I want to control a motor, that has an encoder with about 500 Hz. Is micropython on a pi pico fast enough or have I to use C++ for this task?

snow hare
snow hare
stable lantern
steep dune
#

ohhhh you can do differnt parts ? can you invent new mechanisms ?

austere tulip
#

I was working on a micropython project with some displays. Now the fonts are written in a bytearray and I have no clue how, from that bytearray the characters are being rendered. Anyone has any idea on that?

stable lantern
# steep dune ohhhh you can do differnt parts ? can you invent new mechanisms ?
stable lantern
#

with arduino 😄

#

communication between arduino and python app on computer with serial port

little swallow
#

İ have a Arduino code and in this code have a private code and i want send to another people but another people shouldn't see the code

#

How can I make

balmy ravine
#

!code

hasty zealotBOT
#

Here's how to format Python code on Discord:

```py
print('Hello world!')
```

These are backticks, not quotes. Check this out if you can't find the backtick key.

balmy ravine
#
print('Hello world!')
shadow sun
#

Can you use python on an arduino?

fierce pawn
#

hi, don't know is it true channel

#

I'm trying to connect two computers with ftdi (or usb ttl)

#

and send and receive data from eaxh other

#

with serial communication

#

I started with c++ but later thought maybe python might be easier for this

#

any advice for should I use python and roadmap

steep dune
#

try .... pyserial

leaden rune
#

hey I know this is a stupid question but what can I do with a raspberry pi pico that doesnt need any kind of wire or breadboard ?
Just a raspberry pi pico

gentle vapor
leaden rune
#

yeah I made a rubber ducky

#

hmm so other than that you cant do anything ?

#

ok thank

gentle vapor
#

if the issue is soldering, other RP2040 boards have solderless connectors like stemma QT/qwiic

leaden rune
#

nah my friend give it to me as a gift

#

I dont know what to do with it other than ducky

gentle vapor
#

yeah you want to add stuff, with buttons you can make a macropad, with LED strips you can make LED stuff, etc.

dawn jacinth
#

hi all. If anybody here has experience with working with arduino, motor drivers and motors with encoders and would be willing to help me get a project running I would be happy to pay for the help. Please dm me!

hasty zealotBOT
#

9. Do not offer or ask for paid work of any kind.

royal harness
#

i’m good with radios

thin wyvern
#
Hello, im currently trying to program a laser via the serial interface using python. If you have any expirence programming serial devices please let me know im very knew to this and could use some extra knowledge. ***I have all relevant documentation for the laser**

This is my current code, along with the commands in the documentation. As of right now I am just trying to turn the device on. When running the code I can verify that it recognizes the device and i can open and close the port but when i write the "on" command to the device nothing seems to happen

thin wyvern
#

i was actually able to get it to turn on and off and figured out the problem now i need to read the data

#

it is a laser distance reader so i took a measurement but im not sure how to read the results of the module

spiral sandal
#

use ser.in_waiting to see when you need to read and how much

thin wyvern
#

@spiral sandal [13:33:43] -> 0xAA 0x00 0x00 0x20 0x00 0x01 0x00 0x02 0x23 [LENGTH=9]
[13:33:44] <- 0xAA 0x00 0x00 0x22 0x00 0x03 0x00 0x00 0x00 0xB5 0x01 0xFE 0xD9 [LENGTH=13]

#

that is what i sent with the test software the sent is length 9 assuming 9 bytes while the other im assuming is the recieve which is 13 bytes

fluid gull
#

HI, WHO ELSE is PUMPED for the Raspberry Pi Pico W that just went on sale today????

#

it's $6. With wifi. Wish I had a use case for it.

tame shuttle
#

what's the advantage over like an ESP?

waxen wolf
#

can i change speed of motors using an arduino uno?

soft marten
#
import serial
# import json

serialNumber = ''
def getSerialNumber():

    ser =serial.Serial(port='COM6', baudrate=115200, bytesize=8, parity='N', stopbits=1, timeout=1,  rtscts=False, dsrdtr=False)
    
    with open('./certificate/RootCA.pem') as f:

        lines = f.readlines()
        root =  ''.join(lines)
    # print(root)
    rootcmd = "AT%CMNG=0,16842753,0,"+root

  
    ser.write(rootcmd.encode())
   
#

guys i am tring to write RootCA certificate to my board

#

when i hit enter nothing happens

#

my certifcate doesnot upload

#

and when i am using the monitor to see the chnages i am not able to run the script on the same port

#

is this the correct way for writting certificate to the board

spiral sandal
#

@soft marten i'm not a helper just a standard user why did you direct message me ? btw sorry i cannot help you on that

opal lodge
# soft marten ```py import serial # import json serialNumber = '' def getSerialNumber(): ...

this doesn't have to do with your problem, but if you are going to read the whole file anyways, why not just do:

with open('.certificate/RootCA.pm') as f:
    root = f.read()
```and you might want to do `ser.close()` when you're done or instead just wrap it in a:
```python
with serial.Serial(port='COM6', baudrate=115200, bytesize=8, parity='N', stopbits=1, timeout=1,  rtscts=False, dsrdtr=False) as ser:
soft marten
#

When I am running the script i can't run the software (nRF Monitor) to see the result i ma use software for this it shows. A long permission error

soft marten
#

when i am running both that give me this error

#

p raise SerialException("could not open port {!r}: {!r}".format(self.portstr, ctypes.WinError())) serial.serialutil.SerialException: could not open port 'COM6': PermissionError(13, 'Access is denied.', None,

soft marten
soft marten
# soft marten

this is the software i am taking aboout i am not able to run my script that write to the port and run this software to see output at the same time

#

i have to close this software an than run the script and viceversa

#

@opal lodge

opal lodge
soft marten
opal lodge
soft marten
#

how can i use multiple ser.write in the same script

#
    ser =serial.Serial(port='COM6', baudrate=115200, bytesize=8, parity='N', stopbits=1, timeout=1,  rtscts=False, dsrdtr=False)
        ser.close()
        ser.open()
        
        securityNumber = 55
        f = open("imei.txt", "r")
        public  = f.read()+"-public.pem"
        f.close()

        with open('./certificate/RootCA.pem') as f:
      
            lines = f.readlines()
            root =''.join(lines)
    
        # f= open("private.pem","r")

        root = root.strip()
        root = "\"\n"+root+"\""       
        rootcmd =f"AT%CMNG=0,{securityNumber},0,"+root

     


        # print(rootcmd)
        ser.write(rootcmd.encode())

        ser.close()





        ser.open()
        with open(public) as f:
      
            lines = f.readlines()
            root =''.join(lines)
    
        # f= open("private.pem","r")

        root = root.strip()
        root = "\"\n"+root+"\""       
        publiccmd =f"AT%CMNG=0,{securityNumber},1,"+root

      
        ser.write(publiccmd.encode())


      
        # print(rootcmd)
       
        ser.close();

#

@opal lodge

#

i was waiting for you

#

@opal lodge

#

?????

opal lodge
# soft marten how can i use multiple ser.write in the same script

i don't think i quite understand what you want to do, so i'm guessing here
if my guess as to what you want is correct i would probably go with something like:

    with serial.Serial(port='COM6', baudrate=115200, bytesize=8, parity='N', stopbits=1, timeout=1,  rtscts=False, dsrdtr=False) as ser:

        securityNumber = 55

        with open('certificate/RootCA.pem') as f:
            root = f.read()

        root_cmd = f'AT%CMNG=0,{securityNumber},0,"\n{root}"'
        # print(root_cmd)
        ser.write(root_cmd.encode())

        with open('certificate/public.pem') as f:
            public_cert = f.read()

        public_cmd = f'AT%CMNG=0,{securityNumber},1,"\n{public}"'
        # print(public_cmd)
        ser.write(public_cmd.encode())
opal lodge
soft marten
#

what i did was arite my certificate to the board

#

@opal lodge

soft marten
#

errors

#

i think i need to close() the port and open it again

opal lodge
opal lodge
soft marten
#

nothing has chnaged you just using f string

opal lodge
hybrid linden
#

wow there are serial soluations

#

ive been having the exact some problem

#

at this

opal lodge
hybrid linden
#

do know how to just read text with it since thats all need

#

i just need to sends commands to my controller

soft marten
#

Yup

#

How to send multiple write command

gusty eagle
#

Hello,

I'm looking for an AM decoder in the VHF range that I could bind to a microcontroller without any luck so far, anyone got some reference?

opal lodge
next charm
#

Hi guys

#

i need help

#

I wanna code an 20x4 LCD display as a dino game

#

someone pls help me 😦

#

: )*

#

Lemme give u pics of the controller board i have and the display

#

@past epoch

#

I have made these PCB's from JLC pcb and did some extenuating like relay module, rs232, rs484, WiFi, bt, rom, lcd and keypad also I designed I am working on a bcdc project but anyways I wanna make a Dino game guys just provide me code plsss

gusty eagle
gusty eagle
#

Initial signal coming from an antenna

soft marten
#

do i need to use AT%CFUN=4 before using ser.export()

#

and than again use AT%CFUN=1 after that

#

bcz my script is not working regularly

#

its working 2 out of 10 times

opal lodge
soft marten
#

Yes

#

I need to upload my device certificate to the board

#

I. Am using At command for that

opal lodge
soft marten
#

I will show you the screen

opal lodge
soft marten
#

It will easier to show

opal lodge
# soft marten It will easier to show

i don't typically do PMs on discord
and if you write in the channel someone else with more expertise in the area then i have might be able to help out as well

soft marten
#

Pls chk the msg

#

Let me just show you

#

I have no problem sharing it here but can you look it up first

opal lodge
soft marten
#

I will showing you the issue

#

Don't wrry

#

Just chk the pm

#

I cant openly post here

opal lodge
soft marten
#

already wasted so much time

#

device name is nrf9160dk

opal lodge
# soft marten device name is nrf9160dk

oh, an LTE board, looks like a cool piece of kit
unfortunately not hardware that i have access to, but i can check if there is any good documentation for it on how to interact with it

opal lodge
# soft marten thanks

wow, i can't faulter them on the documentation front, other then that there is so much of it that one can drown in it
there is really a lot of documentation on this one and it seem to be able to do a lot

soft marten
#

Yup

#

What i need to do now just find. A way to write my certifictae to the board

#

@opal lodge thats why I asked you for sharing my screen

opal lodge
soft marten
#

Yes

#

Using AT command

#

In a python script

#

Bcz i want to add it to many device

#

Using pyserial

#

@opal lodge

opal lodge
soft marten
#

Yes

#

With software you do for the single device

#

Either way you need the script to make certificate

#

And than add it to the software

#

So it's better to make script

opal lodge
soft marten
#

I use software just to chk the output

#

Like does my script works

opal lodge
soft marten
#

I will upload certificate to upload also

#

But after this step

#

I need to register device first

#

But for that purpose i amazing the script

opal lodge
soft marten
#

Yes

#

I don't know anything else

#

I am also new

#

Learning things

#

😐😐😐

#

So have you chked the script

opal lodge
# soft marten So have you chked the script

i've been checking documentation and as well as the 15 minute video i linked above
they both say that one needs to put the device into "offline mode" by sending AT+CFUN=4 and then one should verify it by sending AT+CFUN? and get 4 as the answer if it's offline
then you should be able to send in the certificates, this is the exact position in the video that the talk about that specifically: https://youtu.be/rMvW3HXLErk?t=450

soft marten
#

Yup

#

Problem is with script

#

It runs sometime

#

How write it in using pyserial

hasty zealotBOT
#

:incoming_envelope: :ok_hand: applied mute to @hallow igloo until <t:1657056275:f> (9 minutes and 59 seconds) (reason: duplicates rule: sent 4 duplicated messages in 10s).

soft marten
#

@opal lodge how to export Export-PFXCertificate without password

#

i dont want to send password with it as it breaks myscript i have to enter the value

opal lodge
soft marten
#

Can you share resource

#

Thnaks

#

Like it will brekk my script

opal lodge
# soft marten Can you share resource

i only know how to use openssl to do thus, but as i said, a lot of other software will not accept a pkcs12 (pfx) file without a password, much less be able to produce such a file, and there is nothing we can do about that, it just is what it is
using openssl from pem format files you would do: openssl pkcs12 -export -keypbe NONE -certpbe NONE -nomaciter -passout pass: -out bundle.pfx -inkey mykey.key -in certificate.crt -certfile ca-cert.crt
but most software will still request a password for such a file and some will not be able to handle them at all or stop you from providing an empty password
so my advice is just, simply don't do that, write your software to ingest other formats or be able to specify a password for pkcs12 files

soft marten
#

@opal lodge i am getting these error

opal lodge
# soft marten <@936769916072259654> i am getting these error

yeah, that example was for creating a pkcs12 file from pem files, it has to be adapted to work from another pkcs12 file if that is what you want
but wouldn't it be easier to just work with pem files or convert pkcs12 to a collection of pem files and work with those instead?

soft marten
#

i tried somethings but failed

#

as for now lets i have created pfx file

#

and i want private and public key

#

@opal lodge

#

wait i need to clarify somethings

#

eariler my code was ```p

Export-PFXCertificate -cert $newDeviceCertPfx -filePath $newDevicePfxFileName -password $certPassword ```

#

firstly it required me to pass password that i figure it out by passing it a emptey string

#
    Export-PfxCertificate -cert $newDeviceCertPfx -FilePath $newDevicePfxFileName -Password (new-object System.Security.SecureString)
#

this is the code that i used

#

to pass emtey string and bypass password

opal lodge
soft marten
#

np

#

so my public key contain these grabage how do i remve this

opal lodge
soft marten
#

After

sacred summit
#

I am using micropython with an esp8266. I want to use IC2 and I have the following code:

from machine import I2C, Pin
print("Scanning")
i2c = machine.I2C(scl=Pin(4), sda=Pin(5))
print("created ic2")
i2c.scan()

I have nothing hooked up to pin 4 and 5

However the scan causes an error like seen in the image.

Does anyone have any idea of what is going on here?

jagged hatch
#

Umm is this the right place to ask about micropython?

lilac mantle
#

does anyone know a good discord/place for the hardware side of microcontrollers? im trying to get a shelly dimmer 2 running but i want some smart input on what i need

opal lodge
jagged hatch
#

I think python programmers can answer this question too since it’s a general one. When use timing measurements like xxx_ns(), xxx_us()or xxx_ms() does python actually runs or calculates the value with its according accuracy and the hardware (Microcontroller) is where sets the accuracy limit?

#

Let’s say I write pin1.duty_ns(100) the language itself can produce a clean 100nanosecond duty cycle but the microcontroller only has 500nanosecond of accuracy

errant wigeon
# jagged hatch Let’s say I write pin1.duty_ns(100) the language itself can produce a clean 100n...

The accuracy of that is going to be largely dependent on the clock/crystal/oscillator for each micro. It resonates at a specific frequency, and from there you can time how long each cycle takes and then after so many cycles identify that so many seconds have passed. It gets really close too, but over time there is drift and each micro will have it's own small amount of drift. Most of the time that drift isn't noticeable until you check back in hours or days later, so the small duty cycles are pretty darn close to accurate.
Additionally, most things that interface with a microcontroller know that there's a bit of drift and inaccuracy, and their communication protocols are built to be resilient to timing differences within an expected limit.
Since micropython targets a wide variety of hardware to run on, as you pointed out some microcontrollers won't be able to produce a duty cycle that micropython accepts. For those instances you'll need to refer to the datasheet for the chip or board you're running micropython on to see what it's hardware limits actually are (or just do some trial and error testing if that's not an option). In order to correctly identify that a nano second has passed, the oscillator has to be able to oscillate multiple times a nanosecond and some hardware just isn't built to run that fast.

Here's some links on real time clocks, crystals, and micropython porting
http://jorisvr.nl/article/arduino-frequency
https://www.electronics-tutorials.ws/connectivity/real-time-clocks.html
The rp2040 port features:
https://docs.micropython.org/en/latest/rp2/general.html
the esp port features:
https://docs.micropython.org/en/latest/esp32/general.html
General porting:
https://docs.micropython.org/en/latest/develop/porting.html

The links are more so you can read further if you're still interested than they are necessary reading.

jagged hatch
#

I was digging into 1million ns to 2million ns duty cycle control and with increment of 100. Equivalent to 10000 to 20000 units. The target is a 4in1 ESC connected with 4 bldc motors. The frequency doesn’t need a high precision or resolution because 50hz can work, 500hz can work too. The part needs to be fine tuned is the duty cycle. With 20000 units/values, the motors were having really smooth acceleration/decelerations. Thank you for the informative explanation. It really helped a lot. I was testing on an rp2040 board. And planning to make a flight controllerish board

floral spruce
#

Also anyone got any soldering iron recommendations? I've currently got a micron 2460, which is alright but it doesn't have an adjustable tip and the very point of the tip doesn't seem to get as hot as slightly above the tip which is annoying when it comes to smaller things or tight spaces

errant wigeon
# floral spruce Also anyone got any soldering iron recommendations? I've currently got a micron ...

I don't know how many others will agree, but if you're not soldering a lot of the time, it's less of an issue than a lot of folks make it out to be. Depending on the solder you use, pick an iron at the temp that solder need.
That said, if you can splurge a bit, a temperature controlled irons are really nice.
Mine looks like a reskined version of a hakko (similar to this: https://makeitbreakitfixit.com/wp-content/uploads/2012/12/2012-12-22-02-14-20.jpg) called a tenma, but I bought it through my university when they bought too many soldering stations and I can't find the exact station I own now. But basically it's the same as linked with 'tenma' instead of 'hanko'.

#

I use leaded solder (as soon as I'm done with this solder I'll be using rosin core solder instead) and have a mark at the temp to use, and almost never deviate from that temp, so temp control might not actually be useful. But if you're using the iron all the time, you'll want that control for all of the various things you use it for. So while temp controlled irons aren't a make or break tool, they're very nice if you use it more and more often.

floral spruce
#

Yeah my current iron has temp control, it's mostly the non-adjustable tip that's slightly annoying

#

When I'm at uni the irons I use there are nice with the adjustable tips, makes certain tasks a lot easier

#

Also the current tip on mine seems a little weird since the very point doesn't seem to get hot, I have to go slightly above the point which can end up a little fiddly

errant wigeon
# floral spruce Also the current tip on mine seems a little weird since the very point doesn't s...

That might just be a byproduct of physics: the very tip has a larger surface area to volume ratio, so it radiates or conducts heat faster than heat can be conducted to it.
It could also be an issue of an old oxidized tip, or a dirty tip in general. But my iron's tip isn't the point I use to heat everything up--I use the side as well. Maybe I'm bad at soldering and that's my fault (I am bad at soldering, I avoid it when possible so I don't get practice but I don't know if this is a case of my solder skills being the problem)
Here's a good tutorial:
https://learn.sparkfun.com/tutorials/how-to-solder-through-hole-soldering
And a generic image I can't find the source tutorial for:
https://cdn.sparkfun.com/assets/c/d/a/a/9/523b1189757b7fb36e8b456b.jpg

I mostly solder while being mindful about heat transfer vs surface area vs heat dissipation
I try and get the metal 'hot' faster than the plastics and epoxies and other stuff nearby, and to do so I use the fat of the iron to help transfer heat quickly using a larger surface area to make contact between the iron and the part. After it's hot I try to add the solder and remove the iron once the solder is liquid to stop other parts from heating. If I don't heat the parts and solder enough though I get a cold solder joint and it's cloudy. I have only had one project where that was a problem though, and the real issue was that I was stupid and made the solder point the same point that the remote wire was mechanically bound to the board, so any mechanical movement and strain from the wire was stress directly on the solder joint. The cold solder point failed first, but every point of contact was bound to fail because of that design. The point being cold solder isn't that large of an issue

#

solder wicks, solder suckers, and flux are all amazing to fix various kinds of problems, but honestly you can get really far without any of those aids. The first aid I'd recommend is a solder wick to remove excess solder and break up joints that are accidentally soldered together (but you can use the iron and dab the joint with it repeatedly and slowly manipulate the solder to stop bridging without the use of a wick, so it's not a necessary tool if you're strapped for cash).

oak peak
#

Oddly specific question: has anyone seen/made a python library for receiving DMX512 on a microcontroller? There's plenty of transmitting libraries but I cannot locate the other way around.