#microcontrollers

1 messages · Page 18 of 1

near prawn
#

case.....

#

yeah...umm cases are usualy very risky,expecialy when they are thrid party

#

ill just use my tv and leave it in the open with a mounted fan

#

it does help but the heat stays inside

#

i feel like it was too tight,how long did you have it for?

steep dune
#

can you run a RP3B+ using raspian , using python3.7 and have it run for 6 months or a year with out crashing??

steep dune
#

and yes it will be hooked up to some microcontrollers

clever cloud
#

Hi what i can do with circuitpython

granite escarp
#

is it possible to hook up a excercise bike with Python, I have an AUX cable that usually is supposed to connect to my phone, and I'm wondering if it could transmit data to my PC for games

#

is there any Python library for that kind of stuff?

cedar granite
#

Hey boys,
I'm using an esp32 with microPython to control a 32x64 LED matrix. I'm not using any external libs, the thing is it's quite slow and i'm having difficulties getting an acceptable refresh rate.
The process is relatively simple:
-There is 4 bits A B C D that select the row
-On every of the row I have to select color bits for each pixel and clock it. which means 64 clocks / row
I've already "optimize" a bit by putting it in a function, added @micropython.native, put all the methods as local and everything works nice and with a respectable refresh rate before i add the buffer reading that selects the color bits each pixel...
code : https://pastebin.com/pBrDjzVq
Would you guys have any tips to get the buffer reading or pin toggle faster?
Thanks, have a good one

turbid lagoon
#

I had kali Linux running on a raspberry pi 4 and when I updated and upgraded it through the terminal, it bricked my 64gb sd card. Anyone know why?

keen lion
#

wdym

#

made it read-only?

turbid lagoon
#

No like when I plug it into my computer it makes the sound but does not show that pop up and it’s not in file explorer

#

So I can’t access it @keen lion

short shell
#

does it show up in disk management

turbid lagoon
#

No

#

Yes actually

#

But I can’t access it

short shell
#

wdym you can't access it

turbid lagoon
#

I can’t remember what it said but it said that it can’t start or smt weird

#

So when I click it, it just shows a error

short shell
#

What the error says makes a big difference

turbid lagoon
#

Kinda like it got corrupted

#

Yea I searched the error message and did some reading but nothing I tried worked

#

I lost my sd card reader so I can’t check what it says atm

clear perch
#

Is there anyway I can execute python code with a motion sensor?

short shell
#

possibly

#

What hardware do you have

clear perch
#

raspberry pi

#

@short shell

short shell
clear perch
#

Thank you

stuck thicket
sweet vessel
#

How do I make a program that detects the frequency of the light it gets?

#

What hardware parts would I need?

hallow igloo
#

Hnm

#

Something like this

#

So you can perform calculations based on electrical measured

#

However

#

But it also depends on your light source

#

A lightbulb or a led you are blinking on a board

clever gyro
#

you could connect the tx gpio pin of the pi to the rx of the arduino and the tx of the arduino to the rx of the pi, then set up a serial communication between them

loud fiber
#

yo guys anyone here know about mqtt

cedar granite
#

Hey,
I'm using micropython on ESP8266, and i want to take a measurement and publish it through mqtt. But i want to do it every 10 minutes, Is a big time.sleep() ok or should i use something else ?

floral mantle
#

anyone using pycom devices and find their plugin extremely unreliable?

hallow igloo
#

@cedar granite if you don't expect your script to do anything else during then 10 minutes then it doesnt matter

glass swift
#

is there a way to use a raspberry pie as a usb docker?

fallen night
#

Is anyone familiar with how to enable composed output in RealVNC.
I am trying to use the raspberrypi HQ camera without an HDMI display attached and remote in on VNC
I asked on the forums and have had this responded back to me but not sure how to enable what they have said
https://www.raspberrypi.org/forums/viewtopic.php?f=43&t=281945

keen lion
#

@glass swift Like to extend your usb ports?

#

Thats a bit of a waste even if possible, you don't need a fully functional computer for that

white bolt
#

Ok so I currently have a discord bot thats running off of my raspberry pi. I'd like to make somewhat frequent changes and updates to it, but its a little bit tedious to code it on the computer and then put it back on the raspberry pi. I had the idea of having the pi run the discord bot off of a flash drive. The .py file would be on the flash drive and the execute command would be redirected to the location of the flash drive. I was wondering if this would have any repercussions like possibly slowing the bot or something else like that.

pearl gale
#

If you run linux on your pc you can check out sshfs. Otherwise a git solution for the bot might be better. Code the bot on your pc, push to git, ssh into the pi and pull the latest changes

daring pulsar
#

@white bolt you can use git

pine oasis
#

interesting idea

vernal goblet
#

someone experience with tinyml on micro-controller with tf lite?

young lantern
#

hi i just get my ti 83 premium ce python edition and in a program i made on my computer i use from getpass import getpass how do i get this module on the calc too ? also import os doesnt work

cosmic turtle
#

Could someone explain to me how is Rapsberry PI a connected to embedded*? Just using arm doesn't make it "embedded" or does it?

Sorry if I sound negative, I just find it weird. People call webapps real-time systems nowadays.

full prism
#

Guys so I am using arduino with python and the codes I have entered made my servo rotate to an angle of 180 5 continuous times

#

While the same code I pass it to my friend to test it hold for 5 second at 18p degree which I want thT so wats the error

#

Both our circuit is same

normal elm
#

How are you using pything with arduino?

#

I bet the circuit doesn't matter when it comes to this problem

#

It's a coding issue

#

For a generic servo like sg90 it's a timing issue

#

I don't know how programming boards work. I wonder if programming at different clock speeds is causing this? @full prism

mossy herald
#

Morning, does anyone have a website with project for the Raspberry Pi? Beginner level. Interested in automating watering my plants

vital mulch
#

no

#

but i am working on controlling an RGB LED with a Discord bot

#

Raspberry Pi

mossy herald
severe ridge
#

Hey,
I'm using micropython on ESP8266, and i want to take a measurement and publish it through mqtt. But i want to do it every 10 minutes, Is a big time.sleep() ok or should i use something else ?
@cedar granite it depends on how you are powering your device - any time.sleep() continues to consume at a normal power level. If it's battery powered then a 'Low power mode' might be a better solution. There are a few different ways to implement this, but the simplest way is to put it into Ultra-low power mode and issue a reset at your interval. Miguel Grinberg has a tut on doing this as does Tony Dicola of Adafruit.

kind gazelle
#

Hey can you guys help me out pls? I need code for my rack and pinion. I just need one motor to spin forward when the vex controller is pressed o the forward arrow button and spin forward for he back arrow button. Pls help me out. Thank you!

potent goblet
#

i want to know what acually happens to the microcontroller when we program it

#

does its shape change

#

?

raven wedge
#

Does anyone know if MicroPython works on the STM32 Blue Pill? I don't mind doing a bit of C, was just wondering if it was doable in Python.

haughty mason
#

i just brought an adafruit metro m4 grand central running cuircit python, whenever i try to do anything with it E.G blink an LED nothing happens, any suggestions?

old orbit
#

Any experience with Jetson Nano?

pine pecan
#

hello i have an issue with raspbian tryng to use a gyroscope and accelerometer (mpu6050) but I keep getting the following error

#

Traceback (most recent call last):
File "gyro.py", line 40, in <module>
bus.write_byte_data(address, power_mgmt_1, 0)
IOError: [Errno 121] Remote I/O error

lime swallow
#

Hey guys I wanted to start playing around with breadboards/raspberry pi's, what would y'all recommend in terms of resources?

torpid niche
hallow igloo
#

Hey guys I wanted to start playing around with breadboards/raspberry pi's, what would y'all recommend in terms of resources?
@lime swallow hello I can help with that

#

Get a sd card

#

Some jumper wires ofc

#

Resistors

#

Some transistors

#

Leds

#

A WiFi module

#

A node mcu esp

#

And you’re good t go

sick dagger
#

How do I run python code on an arduino uno

lime swallow
#

@hallow igloo i said resources not components

hallow igloo
#

@hallow igloo i said resources not components
@lime swallow resources as in?

#

Depends on what do you wanna do with that

#

Hacking

#

Or

#

Pc build

#

Or

#

Idk

#

Tell me

lime swallow
#

Idk I’m trying to get into it

#

Just basic stuff ig

#

But like links/videos/books/etc

hallow igloo
#

Oh damn

#

I have a few links

#

Wait lemme father

#

Gather **

#

How do I run python code on an arduino uno
@sick dagger download the pyserial library and viola

#

thats a thing?

paper relic
#

@lime swallow ah yes

#

Bepis

hallow igloo
#

thats a thing?
@hallow igloo yes

indigo sundial
#

Arvino

#

help needed

#

I NEED HELP

#

I need a script

#

that can change the colour of RGB Lights Blootoh

#

@vague crane

vague crane
#

Do not ping random people

indigo sundial
#

but i need help

vague crane
#

Ok

ruby trail
#

my bad, i brought him here because i didn't have experience in arduino in a help channel

vague crane
#

I don't know what pinging me is going to do for you

indigo sundial
#

no one is helping

#

me

#

😦

vague crane
#

Maybe wait longer than 3 minutes before trying to annoy people into helping you

indigo sundial
#

mmmm

vague crane
#

Just ask your question and someone who can help you will.

#

"I NEED HELP" isn't a question

indigo sundial
#

its a school hw i need help

vague crane
#

We don't do homework for people on this server

indigo sundial
#

I need a script
that can change the colour of RGB Lights Blootoh

sick dagger
#

when i use pyfirmata to program my Arduino, the program doesn't work after i disconnect the Arduino from my laptop. How can i make it work even independent of any other device?

hallow igloo
#

Do I need to be a Python expert in order to start with Raspberry Pi? I’m not quite sure what I need to know before starting. Can anyone simplify this for me please? :/

ruby trail
#

probably not "expert" but you should have the basics down

mild maple
#

@hallow igloo basic knowledge on python is fine for Raspberry Pi

hallow igloo
#

Hey hi

#

when i use pyfirmata to program my Arduino, the program doesn't work after i disconnect the Arduino from my laptop. How can i make it work even independent of any other device?
@sick dagger use default software to programme it

#

Arduino.ide

hallow igloo
#

Got you guys, thank you! @ruby trail @mild maple

sick dagger
#

@sick dagger use default software to programme it
@hallow igloo D: i wanted to use python but ok

hazy salmon
#

Can somebody give me a hand with this

gusty sage
#

hi all, i dont knwo where to ask, i dont know how to do it because i dont know python....so right now im using this

from time import sleep, localtime

from tm1637 import TM1637

DIO = 4
CLK = 5


class Clock:
    def __init__(self, tm_instance):
        self.tm = tm_instance
        self.show_colon = False

    def run(self):
        while True:
            t = localtime()
            self.show_colon = not self.show_colon
            tm.numbers(t.tm_hour, t.tm_min, self.show_colon)
            sleep(1)


if __name__ == '__main__':
    tm = TM1637(CLK, DIO)
    tm.brightness(1)

    clock = Clock(tm)
    clock.run()

but i want to sshow temperature instead...can anyone help? i use raspberry pi... vcgencmd measure_temp

gusty sage
#

nvm..found it..fix me if below not okay...but below working lol

import tm1637
import time
import subprocess
tm = tm1637.TM1637(clk=5, dio=4)

while True:
    cmd = "vcgencmd measure_temp | awk -F\| '$1 > 0 { print substr($1,6,2)}'"
    TEMP = subprocess.check_output(cmd, shell=True).decode("utf-8")
    tm.temperature(int(TEMP))
    time.sleep(0.5)
kind vault
#

Hi, first of all sorry if this is the wrong channel for this question. Let me know if it is and I'll remove it.

I'm looking to start my first hardware project with a raspberry pi. I am looking to hook a light strip up to some output from a game I play. I am alright with the software side of it, but I wanted to check on the hardware before I start spending any money. Is this a good guide to follow?

https://tutorials-raspberrypi.com/connect-control-raspberry-pi-ws2812-rgb-led-strips/

gusty sage
#

bro, i think we need to post inside raspberry pi official discord. but i cannot find it. lol

steep dune
#

wow nice site --> Chris

#

has anyone ever read or re-flash a BIOS chip that has been corrupted with a RP3B+

mild grove
#

Anyone here used a raspberry pi as a dev server?

old orbit
#

Anyone here used Jetson Nano?

midnight crest
#

hello anyone can help me about raspberry pi and xbee?

untold sparrow
#

!ask

#

I know it doesn't work here, but please be familiar

#

I just impulsively bought a raspbi 4, I plan on just making it into another server, but does anyone have any suggestions on a more interesting project? Preferably using arduino.

How hard is it to program a drone from scratch?

#

@kind vault I realize this is late, but that tutorial looks good. The only comment I have is that it uses i dividually addressable leds, which are AWESOME, but more expensive than regular led strips. So I would just make sure that the project you have requires individually addressable leds.

kind vault
#

Yea, I'm planning on it changing behaviour based on the context (the game I'm playing). EG tachometer if I'm playing forza, HP indicator while playing poe etc..

fringe quartz
#

Anyone else having the error hashes don’t match when writing a raspbian image to an sd card?

#

This happens with downloads from raspberrypi.org and from there official tool

#

When using balena everything works fine except for when i plug it into the pi, nothing happens

cerulean mountain
#

hmm--pi was smooth for me when I used it some odd years ago

#

but now I got a XPS-1500 2020 machine so I aint much help

steep dune
#

cool

ornate pawn
#

does anyone know if I set a baud rate using pyserial in python, will it overwrite the baud rate set in Serial.begin() in an arduino? This is just to interface between a gui in PyQt5 with Arduino

median jungle
#

Hey guys

#

I am not rly sure what i can do in here

#

Can someone tell me smt abt this

wanton niche
#

you talk about microcontrollers. im not sure if you can talk about microprocessors that dont use python such as arduino, but im pretty sure you get the gist

#

*i am not sure if you can talk about microprocessors that are not compatitble with python

#

just a correction

steep dune
#

should i quit my development of uPython for propeller chips ?

stuck thicket
sage narwhal
#

There a serie with microprocessor with nitendo one, where a man share his experience in mount a little computer for show "Hello Word" on display. The jorney has 29 days for he get achieve your goal. I recomend watch beacuse, through way that he use for teach is so, so goo that I considering wacth much more times for understand in every ways. If the Admins give me authorization, I can share the channel, for other side, if someone give a search on Google is much easy found various channels, Websites and Blogs dedicated to shares, show and teach about programing controllers and microprocessors. I considering spetacular!!! The better way to learn about the computers functioning!

remote arch
#

Hello Guys,
Way back, I ordered tons of Arduino Modules and stuff but I never done anything with them.
I would like to change that. Reason why was cause first of all, it was written in C and second reason
was because I really dont get ... how to interacr? With thoose Modules...

Like, I ordered a Kit from Aliexpress with around 45 Modules, where is the ... API ?
How can I interact with thoose Parts?

#

I am also looking to Code everything in Python

#

It is very confusing for me

zealous island
#

For the Arduino Modules you have to interact directly with the IO pins, tell when to go hight and low, read and write analog values, etc. There is no API for that kind of modules, they use very simple input and output, if you are using an Arduino there are some libraries for some modules, like the servo, or a display. And if you want to use Python the easiest and way is with a Raspberry, but again you'll have to interact directly with the IO pins @remote arch

remote arch
#

Hello @zealous island :)
Thanks a lot for your response on my Arduino Issue
I heard it is possible to get arduino and python working together, is this correct?

#

Sorry for the ping :/

hallow igloo
#

..sorta

#

there's an api that lets you control an arduino with a pc

#

pc scripts are in python, and you have a serial communication with the arduino

#

it's called Firmata

remote arch
#

@hallow igloo Hello, thanks for the answer.

#

I am still very confused on all of this

#

I have 50+ Modules laying here in front of me

#

And I made 0 Projects

#

Cause I dont know how to interact with them

#

I have no library

#

No Api

#

No Documentation

#

Nothing

hallow igloo
remote arch
#

Whats that?

hallow igloo
#

Come explore Arduino projects!

remote arch
#

Thats cool

hallow igloo
#

also this

remote arch
#

But I want to learn how I can combine my modules

hallow igloo
#

02Shrug this is a python support server.

#

i recommend reading the links i sent

#

projecthub has projects people have done

#

the tutorial tells you how to start

remote arch
#

Alright, will check it out, thanks!

stuck thicket
bronze remnant
#

Im making a button that so when i press it something happens once

#

But when i press it once, it just keeps going

#

(dont mind the error on the bottom, hadnt plugged in my arduino yet.)

#

any help would be much appreciated

quiet warren
#

I've been interested in using python for some cool robotics stuff but idk where to start

#

can someone send some links?

shy roost
#

Hello. I am comunicating Arduino and Python. I manage to do it with the pyserial library.
For the moment, i am just sending a number from python to Arduino, this flashes a led, and then returns a number and an end of line (with println).
My problem is that sometimes, the python code recives the data, but some times not. I

#

In the python side, I did it with uno.readline(), becaues I read that it blocked the code untill it got an end of line, but some times I dont get any answer and the code just keeps executing (I now because i put a print)

#

Any help would be very much apreciated

#

thanks a lot.

untold sparrow
#

I realize this is 12 hours too late, but this could relate to improper configuration. Perhaps with the baud rate? maybe too high of a baud rate in general?@shy roost

shy roost
#

Hi @untold sparrow . Thanks for your answer, I fix it finally. When you set up the serial object for comunication, like:

Arduino = serial.Serial('/dev/ttyUSB1',9600,timeout=None)

The last parameter is the time you whait if you do no t get the number of bytes you specifier with .read(), or if you do not get and end of line with .readline(). Seting it to None, will freeze everithing untill you get what you specify. Whith this I fixed it and got what I wanted. If may help anyone.
Thanks!

untold sparrow
#

oh awesome! ty for the update

graceful dew
#

Which library is better for writing and reading the GPIO on a RPi?
gpiozero or RPi.GPIO?

#

I just need to be able to read and write to the pins 😄

sudden hamlet
#

rpi.gpio is perfectly easy

#

so

#

idk

#

would just use that personally

long rover
#

Hello

#

i need some help

#

i have a raspberry pi and a taster and led , i want when i click on the taster the led should be turn on, and if i click on the taster again it should be turn off, and if i click on taster again nothing will be happened, anyone can help me with the code?

snow nimbus
#

I'm thinking of buying a raspberry pi 4 model B 4GB to host my projects

#

IIRC I should get an usb-stick instead of an SD-CARD, was that correct?

#

Does Raspberry Pi 4 Model B fit in Raspberry Pi 4 case?

vale dragon
#

Yes, it should fit in that case

snow nimbus
#

do I have everything needed here? I already own an usb-stick

#
  • the case
vale dragon
#

And SD card provides better w/r speed, so better overall performance on your rpi. I suggest u to buy a 32/64 gb sd card

snow nimbus
#

ah, I just remember people saying that it's very likely to corrupt because it's not made to run an OS

vale dragon
#

In order tu run the rpi, you need: power supply(already on that pack), a bootable memory(im not sure usb boot is okay right now on the rpi4, i think it is still on beta testing) and your rpi

#

I do not recommend u to do an usb boot

snow nimbus
#

ok, I'll get an SD Card

vale dragon
#

Get a SD card for 8€ on amazon and u're going to be okay

snow nimbus
#

can it handle running a discord bot?

vale dragon
#

it should

sand crown
#

Anybody with experience on coding robot can help me?

cyan mauve
#

Hello @zealous island :)
Thanks a lot for your response on my Arduino Issue
I heard it is possible to get arduino and python working together, is this correct?
@remote arch use "serial"

remote arch
#

👌

cyan mauve
#

But to interact with the pins you will still need to use the Arduino IDE, which is in C++ I think.

#

@remote arch but check out serial and see if it helps with what you want to do.

remote arch
#

Saddly I already gave arduino up

#

Its way too anoying

cyan mauve
#

Why? What were you trying to do?

#

@remote arch

remote arch
#

Everything triggers me about kt

#

*it

cyan mauve
#

Lol

remote arch
#

0 knowledge

cyan mauve
#

Yeah but that's how everything in programming is

remote arch
#

Input output, serial shit, all thoose nonsense vars

cyan mauve
#

It's all hard till you understand it

remote arch
#

Yeah but that's how everything in programming is
@cyan mauve Dont get me wrong, I am decent in coding

cyan mauve
#

Start by making a small project

remote arch
#

But trash arduino

#

Its so anoying and triggers me

#

I just rage

cyan mauve
#

Start by making a discord bot that turns an LED on and off or changes color through a command or something.

#

That was the first project I did

#

Learned a lot on how the Arduino functions.

remote arch
#

Uhm

#

What? O.o

rotund swallow
#

sound like an interesting thing to work on arduino @cyan mauve

cyan mauve
#

Yeah, It was fun making. People started controlling my led randomly through discord lol

rotund swallow
#

please explain how it works because i am pretty new to ard and python

#

like what were the stuffs involved with the code and connections

zealous island
#

You can also give a try to MicroPython, I have never used it but check it out https://micropython.org/

rotund swallow
#

can we actua;ly use python with boards like arduino?

#

i knew that raspberry pi uses python

steep dune
#

how about creating a token system - looks like python - but its C underneath

#

is that a wrapper?

zealous island
#

Yes, but I think those boards work more like a Raspberry than an Arduino, it uses some sort of Python operating system

steep dune
#

native Arduino language or only C

zealous island
#

According to the Arduino page "the Arduino language is merely a set of C/C++ functions that can be called from your code". Also "It is possible to compile programs for the Arduino using other build tools (e.g. Makefiles and/or AVR Studio). You'll need to configure these to link against the appropriate files in the Arduino core libraries"

steep dune
#

whats better to use C or C++ or is it essentially the same

#

micro python??

zealous island
#

They're a bit different, I prefer C since it's smaller. You can think of C ++ as a extended version of C

#

I don't know how micro python works

#

Those boards are more expensive than an arduino

steep dune
#

if i find a old AT chip - can it be re-flashed

#

or is it software nightmare

#

i have a junk board with

#

ATMEGA88PA-PU

zealous island
#

You have to read the documentation of the ATMEGA, and get a chip programer,

rotund swallow
#

how do I bootload an atmega328p

lethal oyster
#

Do you guys know the difference between "Micro python" and "Circuit python"???

cosmic tinsel
#

are there any documentation that outlines the diffrence between micropython and python3 ?

#

i want all of them

#

it's a bit annoying when something simple doesn't work on micropython

cyan mauve
#

like what were the stuffs involved with the code and connections
@rotund swallow Were you addressing me?

#

Yeah, what part do you need help with exactly?

#

can we actua;ly use python with boards like arduino?
@rotund swallow Okay so, in order to interact with the pins of the Arduino you will need to use the Arduino IDE, which uses a mixture of C and C++. However, you can still use python to do other things. For example, if you wanted the arduino to work with a discord bot, you could use discord.py and 'serial' (which is python), but all Arduino Project will have some C/C++ code. The code for the Arduino is really simple and won't take much to learn; it's really basic stuff.

hallow igloo
#

i ordered a red arduino on aliexpress months ago and it still hasnt came anyone else here having problems with that site

#

i heard theyre really good but ive put in a dispute over not receiving items and they havent gotten back to me

cyan mauve
#

@hallow igloo My friends ordered some stuff from AliExpress and the arrived. How long ago did you dispute?

#

A lot of people use the site to buy modules and other hardware stuff.

#

I've never purchased anything from it, though.

rotund swallow
#

@rotund swallow Were you addressing me?
@cyan mauve yes

cyan mauve
#

Yeah, let me know if you need anymore help.

rotund swallow
#

@rotund swallow Okay so, in order to interact with the pins of the Arduino you will need to use the Arduino IDE, which uses a mixture of C and C++. However, you can still use python to do other things. For example, if you wanted the arduino to work with a discord bot, you could use discord.py and 'serial' (which is python), but all Arduino Project will have some C/C++ code. The code for the Arduino is really simple and won't take much to learn; it's really basic stuff.
@cyan mauve i did know that programming an arduino was done using c/c+ code but can we actually use python to program an arduino

#

write from the setup

cyan mauve
#

Hm

#

I haven't read through it yet but it looks like what you're looking for.

rotund swallow
#

thanks man

cyan mauve
#

Oh wait wait

#

Lemme check something

#

I don't think this works with arduino

rotund swallow
#

i actually wanted to do some works with arduino

#

but it is kinda really demotivating

cyan mauve
#

The best thing you can do is use the original C/C++.

rotund swallow
#

since troubleshooting is a big problem

cyan mauve
#

Like its really basic things

#

What type of problem?

rotund swallow
#

connections

#

for me uno seems to be occupying a lot of space

#

so i referred some tutorials across the internet to shrink it

#

it involved removing the atmega chip to be removed from the board

#

and in that process I damaged the pins of the microcontroller

cyan mauve
#

Oof

#

Not good

rotund swallow
#

big oof

cyan mauve
#

Lol

#

Where did it occupy a lot of space?

rotund swallow
#

space in the sense in terms of volume

cyan mauve
#

Ohhh okay okay

#

I see what you mean

#

Yeah there are other arduino options that you can get that are smaller

#

But I suppose you didn't want that.

rotund swallow
#

nano

cyan mauve
#

Yeah

rotund swallow
#

but expensive

cyan mauve
#

Yeah ^

#

THis may be what you're looking for.

rotund swallow
#

lemme check

cyan mauve
#

Uses "pyfirmata"

#
import pyfirmata
import time

board = pyfirmata.Arduino('/dev/ttyACM0')

it = pyfirmata.util.Iterator(board)
it.start()

board.digital[10].mode = pyfirmata.INPUT

while True:
    sw = board.digital[10].read()
    if sw is True:
        board.digital[13].write(1)
    else:
        board.digital[13].write(0)
    time.sleep(0.1)

example

rotund swallow
#

board = pyfirmata.Arduino('/dev/ttyACM0')

#

what does this mean

cyan mauve
#

I forgot lol. I haven't used arduino in a while.

#

Pretty sure that's connecting to the Arduino though

#

Sec

#

Yeah, that's for connecting to the port.

rotund swallow
#

I actually wanna start using raspberry pis

#

but rn I am fixed on python

cyan mauve
#

Well raspberry pis use python

#

So that might be better

rotund swallow
#

yes so that is why I started learning py

cyan mauve
#

But somtimes a pi is overkill for some projects.

#

You're now starting to learn python?

#

Oh oh

#

Okay I see what you mean.

rotund swallow
#

yes I started like 2 months ago

#

i am actually interested in Comp Vision

#

it is impossible to straight jump to that height without knowing the basics

cyan mauve
#

Have you made an arduino project yet?

rotund swallow
#

Nope

#

i have a project idea

#

but it involves playing with the mains of my house

#

so kinda scared to do

cyan mauve
#

Careful with high voltage

#

I don't recommend.

rotund swallow
#

yeah so I had dropped it

#

i will develop something but right now I have no ideas

white bramble
#

I am trying to import the RtlSdr package and for some reason the import statement isn't working in the iConsole. Looked in the docs and it says to do exactly as i am trying. did a pip freeze and it shows as pyrtlsdr but cannot import that way

opal furnace
#

how much RAM does a microcontroller need to emulate the CPython interpreter? In other words, How much RAM do all the stacks take up, and how much do I need for items not in the stacks?

opal furnace
#

please know I understand that this varies with the size of whatever python script is being run and what all is in storage, but how much would I need for most small scripts (500 lines or less)?

cosmic tinsel
sudden hamlet
#

Have you registered an account

hallow igloo
#

How should I go about getting into this?

errant garden
#

im not sure if im in the right channel or topic for this but, I have installed an enviroment on a raspberry pi, and Im sure its there because I have all the plugins installed, but I dont know how to get the terminal, or mu ide to use it... any help pls?

untold sparrow
#

@errant garden you mean like a virtual env for python? If using virtualenv it would be installed in whatever dir you told it to, or the one you were currently in. the command to activate is soruce path_to_env/bin/activate and your ide should have a setting to choose an interpreter, if if the ide has a built in (like pycharm) or you should be able to activate your virtualenv from the terminal in the ide.

errant garden
#

Thanks 😄 That was the problem I was having

rough ermine
#

Anyone have any experience using pexpect and pytest for running tests on embedded targets?

#

well, more specifically, is anyone real familiar with pexpect?

boreal jackal
#

Any raspberry Pi kit suggestions I should get? I already have Sense Hat, but I'm looking for more.

tropic iron
#

what is THE cheapest functional micro controller that would be sutiable for running a few motors? like small electric motors for making moving scanners/actuators?

shut radish
#

Not sure if this is the correct channel to ask but; anyone know of a thing that can send audio wirelessly from my raspberry pi to a speaker(not wifi or bluetooth preferably)
_ _
Perhaps some kind of USB to audio jack wireless signal, similar to what some wireless headphones come with?

hazy schooner
#

I think most wireless headphones use Bluetooth

#

If you want to try and build something yourself xbee is a fairly cheap wireless comms module

#

Using that you would have to figure out how to receive the signal and convert it back to a form usable by the speaker

ionic mango
#

Hi i am Utkrisht

heavy yarrow
#

after im done finsihgnt the coding

#

can someone mistake check my coding

#

to make sure i dont fail

#

cause im trying to make a door open

#

with a light sensor

#

im most concreened about the coding

#

it would be aurdino

#

but im not the most experincedperson here

#

im assuming there are people here that code for a living

#

u can @heavy yarrow

#

me

#

if u can help

frigid yoke
#

can someone help me convert python script to exe file

rotund swallow
#

yes send it @heavy yarrow

wheat loom
heavy yarrow
#

alright manalan once im done with the coding ill send it over to u

hallow igloo
#

print("Hello world)

astral belfry
#

Anyone here worked on NIDAQmx?

frosty blade
#

Whats a good way to start learning how to use microcontrollers that can support python to control motors? Like what are good microcontrollers and how exactly would I need to hook it up to motors? Last time I tried with a circuit playground express which used circuit python and I made the mistake of directly hooking it up to 1.5v-3v motors directly and now the analog out is broken. Other products from adafruit seem overprices and I want to be sure that I am getting what I need for these projects and not so much overboard.

median tartan
#

Anyone else timing out when they visit micropython.org?

Was looking at docs yesterday but don't appear to be able to load the page now.

wheat loom
#

@frosty blade usually you don't draw current from the board, but from an external power, some motors can do that by themselves (you'd have a control pin, and 2 power pins), but in most cases you can just use a relay

#

A circuit playground should be good enough for that

#

Anyone else timing out when they visit micropython.org?

Was looking at docs yesterday but don't appear to be able to load the page now.
@median tartan works for me

long rover
#

how do i install the database mariadb on rapberry pi?

zealous island
#

sudo apt install mariadb if you're on a Debian based distro (Raspberry Pi OS, Ubuntu, Ubuntu Mate) or sudo pacman -S mariadb if you're using Arch or Manjaro

hallow igloo
#

is it possible to make a USB drive with a screen using a goddamn Raspberry Pi? and maybe add a cover for it?

stuck thicket
hallow igloo
#

For starting into esp32 development would you guys recommend I work with micropython or just stick with the Arduino IDE?

zealous island
#

I personally prefer the Arduino IDE for the microcontroller and Python for interaction, but if you are not going to do anything that requires ultra high performance and you prefer Python, go for it

hallow igloo
#

My friend had me start with Arduino IDE and I see the kick behind it but my C is rusty at best so some things I'm just copy and pasting code to get it to work. I really appreciate the readability of python

empty hull
#

Yo guys

#

I'm having a test on microcontrollers today!

lime bear
#

python is most suitbale to who are using raspberry pi arduino is waste on python arduino is best for learning c++ which makes it very easy

sudden hamlet
#

Yeah and I mean

#

Learn cpp

#

Like

#

It will be tricky but if you want to do microcontroller dev you need it

wispy plinth
#

what's the important thing to note from IC datasheet?

#

I hope I can ask this here since IC is also one of microcontrollers

quasi spade
#

Whats the first project i should do after getting a raspberry pi according your opinion?

wheat loom
#

Whatever works for you, really

stone crown
#

Depends on what your interests are

finite linden
#

make a thing that threatens to burn the house down if you break a plate

timid owl
#

For starting into esp32 development would you guys recommend I work with micropython or just stick with the Arduino IDE?
@hallow igloo Arduino ide comes built in with FreeRTOS, so you can use the dual cores and create threads with the scheduler. I would recommend Arduino IDE for performance-critical applications (or if you NEED 100% PERFORMANCE, espressif IDE) but probably MicroPython for simple applications

#

The threading is really fun to use and extremely useful but your choice

hallow igloo
#

Thank you so much guys I appreciate it

#

I found a course on both so I'm just playing around both at the moment. Got to make an led to glow using my screams so I'm something of an electrical engineer

worldly river
#

Hey guys, I was looking for a small, cheap solution for a project that is tying up my Arduino Mega at the moment (which I would like to free up).
I had read that the ATTiny85 is capable of serial communication (UART) but that this has to be software-based.
5V would be best, and 2-5 digital output pins. Does anyone know about this? Looked like Adafruit had a board. Anyone have experience with this?

worldly river
#

@quasi spade I just hooked up the lights in my room to my Arduino, so that I can turn them on and off with Bluetooth from my phone. Took me an afternoon to hook it all up and the parts (other than the Arduino and Android phone) cost less than $20. It was well worth it. I can turn lights on and off without having to get up. Probably a good starter project. To do this you need:
Microcontroller (Raspberry Pi in your case)
Breadboard or blank perforated circuit board for mounting components
Various thin-gauge colored wire (red-power, black-ground, blue, green)
3 x 1k or 10k ohm resistors (to make a voltage divider-- convert 5VDC to 3.3VDC)
Electrical tape, solder
Possibly some thick-gauge wire for routing 120VAC-powered lights to relays.
5V relays (bi-stable is probably best)
HC-05 bluetooth module

For tools you will also need:
wire cutters / strippers
soldering iron
scissors or knife

quasi spade
#

@worldly river Thanks🙂

worldly river
#

yw

steep dune
#

i think opto-couplers should be promoted more - antiboom , blue smoke prevention scheme

steep dune
#

any humans here - really

heavy ibex
#

not me

onyx kraken
#

What's the point of making circuits

umbral parcel
#

Hey I am working on a drone with the raspberry pi 3b and I am all done with making an algorithm to calculate PID but I am unknown whether the PID value should be subtracted from the DutyCycle or something else has to be done. If anyone can help then Thank You

umbral parcel
#

@heady spoke Hey i will DM you the code

steep dune
#

if python was designed for learning programming -- why is it not used more , example dinosaur C

hushed gyro
#

For... learning?

#

My best bet on why C is still popular, is because its mapping to assembly is pretty straight forward and CPU instruction sets are changing hella slow anyway

worldly river
#

What's the point of making circuits
@onyx kraken The point of making circuits? What?

onyx kraken
#

Yeah like unprofessionally @worldly river

wheat loom
#

Like, for a hobby project?

worldly river
#

What's the point of doing anything @onyx kraken ?

#

By making circuits for a hobby project, you can either save money over a commercial solution or build something that is not profitable for a company to make and sell. Circuits are also very relevant to computer programming since all programming logic ultimately works on electronic circuits.

vague lion
#

Hello, Im new to python and i want to get a MySQL send request working on my esp8266 microcontroller with microypython installed. The github repository of the mysql module tells me i would need to recompile micropython with the mysql module. But i dont know how to to this and i found nothing helpful on the internet, or is this the wrong channel to ask? The Github repository of the module: https://github.com/dvrhax/uPyMySQL

zealous island
#

I can't really help you, but I think having a MySQL server on a esp8266 isn't the best idea, I'm pretty sure it's intended to use with a MicroPython pyboard twice as powerful than a esp8266

vague lion
#

i dont want a SERVER i just want to send information like temperature or humidity TO a SERVER

#

maybe i wrote it really bad to understand ,sry

spiral sandal
vague lion
#

port?

spiral sandal
#

yeah it's a port from a cpython module

vague lion
#

what does that mean?

#

sry im new to python

spiral sandal
#

then it's a good idea to use a remote server has it will save your flash from wearing out but you really should start with cpython or an esp32 with psram, because esp8266 is hard

vague lion
#

nono its allright looking at some python code, python looks fairly easy, and if i get this module working i wont need any more help

spiral sandal
#

python is easy but running code with less than 32KiB ram free is not so easy for beginners

vague lion
#

it will be fine.. i just need the module

#

is there a way i can install the module with REPL

#

?

spiral sandal
#

use "ampy" tool to send the module

#

and preferablt precompile modules with mpy-cross to gain ( a lot ) of ram

vague lion
#

is this still to less?

spiral sandal
#

micropython can only leave less than 43KiB available because ram is used for runtime

vague lion
#

ok

#

could you guide me a bit trough this ampy thing if its possible to get the mysql module working with it?

#

ampy adafruit right?

spiral sandal
vague lion
#

with upip?

spiral sandal
#

i think ampy doc says to use pip

vague lion
#

theres no pip on micropython, just upip..

spiral sandal
#

upip is a cpython program

#

it gets modules and installs them on board

vague lion
#

dont i want that exact thing?

spiral sandal
#

there should be all you need for first steps with ampy in micropython forums

vague lion
#

ok ima take a look into that

alpine mortar
#

So basically Im running micropython on a nodemcu but when I put a main.py file inside of /pyboard nothing happens, not even after a reset

hazy schooner
#

I’m trying to use a usb speaker with raspberry pi and when I run speaker-test -c2 all I hear is a pop and I get this error

#

Any ideas on how to fix this?

#

It’s a raspberry pi 3b+

calm dome
#

.. Do you guys build robots with Python? 😮

worldly river
#

@calm dome You can use Python to program robots.

lunar fog
#

Hey pls tell me if we can program arduino with python???

#

pls tell me IDE so i can program arduino with python

hallow igloo
#

I use uPyCraft @lunar fog

elder lake
#

Hi is there any library that I can use to make my webcam be able to stream its video contents in a local area network(or same wifi network)

#

like for example being able to view the streaming in a designated ip at a web browser

lunar fog
#

@hallow igloo Thanks a lot

trim wharf
#

guys I just got a raspberry pi 4

#

lets go

wheat loom
#

Noice

prime badger
steep dune
#

cool

elder lake
#

thanks! I'll check it

lunar fog
#

Hey can i program Arduino Uno with python and if yes how??

umbral sandal
#

@lunar fog off topic but are you learning arduino too? : )

formal salmon
#

hey I was wondering how I can do live plots from my arduino and plot it with matplotlib

zealous island
#

@AccurateArrow#1320 You can't do that at all, you have to use C m, but you can Python to communicate with the Arduino and tell him what to do

zealous island
#

@formal salmon Retrieve the data using serial, you can do that with PySerial, and then you can save that to text files or to Matlab, I'm not sure how to do the last part though

hexed relic
#

Doing hardware simulations and I needed a way to do a single continuous runtime architecture (vanilla python). Came up something that looks like this.

stuck thicket
gray flicker
#

Can anyone explain the differences between an arduino and a raspberry pi. Like which would be better at doing what types of tasks.

wheat loom
#

Sure

#

an arduino is a development board

#

It runs special C code, and has basic IO pins

#

On the other side, the rpi is a computer

#

Most of the time you’ll use linux on it, and you have an actual computer, with some GPIO pins for you to interact with the world

languid yew
#

Arduino's are better at doing and reacting to things in realtime and making "simple" electonics (they can actually be quite complex, but they can't be too intensive)

#

Raspberry Pi's are better at things that need more processing power and dealing with things like the internet, media, and mixing hardware with high level software

#

Both an Arduino and an RPi can make a little robot drive around, but a Raspberry Pi is massive expensive overkill for the job and has overheads from running an operating system

#

An arduino is a single processing core and can't do things like run webcams, be a media server or game console like an RPi can but will never be blocked in doing something by a scheduler

cosmic tinsel
#

micropython doesn't support bracket for math operation?!?!?!?!

#
TypeError: unsupported types for __truediv__: 't
uple', 'int'```
stone crown
#

@cosmic tinsel what was your code that produced that error?

sonic kayak
#

hey! does micropython support scrapy?

stone crown
#

@sonic kayak what's your use case where you'd want to use scrapy on a microcontroller?

sonic kayak
#

i want my esp board as a packet sniffer

stone crown
#

Oh, do you mean scapy?

#

I thought you were looking at incorporating the web scraping package and was confused

sonic kayak
#

😐

#

not the same?

#

i never used any of those

#

😐

stone crown
#

Scrapy is different than scapy

sonic kayak
#

my bad -_-

stone crown
#

But you can certainly try to include it. Micropython manages packages via upip

#

They have a whole page about it

sonic kayak
#

oh thanks

little torrent
#

Hey Guys, I am facing a problem while using Raspberry Pi camera. I have a python programme which has to do certain things sequentially (mostly image processing) after a certain point, I am trying to run 4 different functions by multiprocessing. After starting these functions, the raspberry pi camera, the frame freezes. I have tried severals things to debug, and have found that all the functions are running properly just the raspberry pi camera is returning same frame again again.

Any clues as to why this might be happening?

cosmic valley
#

Hey Guys, I am facing a problem while using Raspberry Pi camera. I have a python programme which has to do certain things sequentially (mostly image processing) after a certain point, I am trying to run 4 different functions by multiprocessing. After starting these functions, the raspberry pi camera, the frame freezes. I have tried severals things to debug, and have found that all the functions are running properly just the raspberry pi camera is returning same frame again again.

Any clues as to why this might be happening?
@little torrent What's your code? Plus are you multithreading or multiprocessing?

#

Cause if you have something like a counter variable buffering the frames until something calls the next one, then if you don't manage it right, it could be just a memory read/write error

little torrent
#

@cosmic valley Found the Solution, It was a problem with the Raspberry Pi Camera Library. For Now I am completely deleting the Video Stream Object and then recreating it. This solves the issue. Thanks Anyways!

hallow igloo
#

Hey can i program Arduino Uno with python and if yes how??
@AccurateArrow#1320 Quite simple, I figured out today. Using pyfirmata and the Arduino IDE, it’s pretty easy:
Install PyFirmata and then import it (from pyfirmata import Arduino)
Make a path to the board (board = Arduino(’path to your board’)
Make a StandardFirmata project in the Arduino IDE and upload
You can control the digital pins using board.digital[13].write(1) (1 is high, 0 is low)
Run the Python project, and it should work

olive warren
#

has anyone used opencv?

hazy schooner
#

@olive warren i have messed with it a bit

stone crown
#

You should be able to, you can have it be a vpn-secured travel router essentially and connect it to networks that you have access to and run all your stuff through the vpn service your subscribe to

sonic kayak
#

do i have to install _thread module manually?

sudden hamlet
#

what kind of thing are you using threading for

#

check your pyboard firmware/micropython version is latest

#

looks like it isn't

#

but threading on a microcontroller in python is a strange idea anyway

#

probably a better alternatie

sonic kayak
#

oh thanks

#

same error:(

wheat loom
#

You probably want to use asyncio to have task switching at the code level, not as the OS level, yeah

sonic kayak
#

oh thanks mate ill try

lavish sand
#

I'm trying to wire up multiple outputs to be AND toggled by a single button. What's the best way to approach this?

#

red being the common button, green being 4 different outputs that are toggled by my board

stuck thicket
stuck thicket
wheat loom
#

I'm trying to wire up multiple outputs to be AND toggled by a single button. What's the best way to approach this?
@lavish sand this looks like a good solution, although depending on what the green wire on the right is connected to that might not work

#

For example, if you are mixing up some wires down the line, you’d want a tri-state buffer instead, because the AND gate will be outputing a logical 0 instead of nothing

lavish sand
#

I'm not following @wheat loom

#

I just want to have one button act as multiple buttons on 5 wires

wheat loom
#

Oh hmm

#

So you want the red line to trigger all the green lines?

lavish sand
#

Sort of

#

The greenlines are their outputs toggled by my board, so they are either on or off, but i don't want any of them to continue their flow without the button being pressed

#

To sum it up, my board is a statemachine, with 1 button to go to the next state. I have 5 leds to indicate which state on their own outputs from the board. I then want to continue the 5v the leds get into a series of AND gates which all have their 2nd input toggled by a 2nd button. One of the leds should be toggled then, and carry their current to a sound box with 5 input wires.

wheat loom
#

Well, it seems like a good solution then

sudden hamlet
#

What seems like a good solution

#

Aren't they asking for a solution

charred widget
#

Someone have a good knowledge of ESP32? I got a error message when I try to upload my program to ESP32cam: A fatal error occurred: Failed to connect to ESP32: Timed out waiting for packet header

zealous island
humble sierra
#

Doesy anyone know how to start out in Ardunio more specifacally coding?

untold sparrow
#

I recommend either video tutorials or following guides. There are tons.

The first step is probably to buy one of the arduino kits with all the cool stuff 😄

humble sierra
#

Nice, I'm trying to make that laser turret by Micheal Reeves for fun

untold sparrow
#

LOL

humble sierra
#

My schools robotic team will be using Arduino so I wanna get a head start!

untold sparrow
#

You should probs start with something safer, but that is cool.

I would do some more generic projects to start. Like leds, basic sonar project, etc

humble sierra
#

I see, ok will take note of that, thank you!

untold sparrow
#

but no shame in strapping a (RED) laser to a servo and praying

stone crown
#

Well arduino will use its own version of C/C++. So a good bet will be familiarity with C/C++

humble sierra
#

Oh, is C and C++ the same thing or different?

untold sparrow
#

they are different. But can be similar

stone crown
#

What Lord-GLU said. Arduino uses a mishmash of both with a buggy standard library.

humble sierra
#

Which one would be easier for a beginner or has more I guess like potential?

#

What Lord-GLU said. Arduino uses a mishmash of both with a buggy standard library.
Ahhh that makes sense!

untold sparrow
#

I need to change my nickname lol

humble sierra
#

LOL

stone crown
#

I learned programming with C++ so I'm a bit partial to that

humble sierra
#

Micheal Reeves has 2-3 video on one of them so maybe thats where I'll start!

untold sparrow
#

yeah, I would also recommend doing some practice with c++, maybe code academy?

But you can always jump right into guides, you just will not understand as much about the actual code.

stone crown
#

That sounds like a good starting point.

untold sparrow
#

micheal reeves is not good for learning.

Good for motivation though LOL

humble sierra
#

Code academy, I see

#

Yeah LOL, I just want to create a Laser Baby

untold sparrow
#

there are tons of step by step video guides and like, more text guides online than there is time in the universe

#

LOL, that was a good one

#

that one would be pretty easy tbh. Maybe use leds instead? cheaper and safer

#

lasers are surprisingly dangerous

stone crown
#

Yeah, definitely start with LEDs

#

As someone who has to work with lasers, start with LEDs

humble sierra
#

Yeah, I don't think my parents will allow for lasers

untold sparrow
#

good haha

errant wigeon
#

Lasers are super dangerous and using them safely can be expensive. LEDs are a great proof of concept though

untold sparrow
#

leds are dirt cheap too

humble sierra
#

I heard about that, and my upperclassmen said to get a good rip off of an arduino

untold sparrow
#

my best advice to you is: just buy a starter kit from amazon and start hacking together whatever you can haha

humble sierra
#

LOL Thats what I was really going to do

untold sparrow
#

I recommend a more well known arduino kit/brand, since you may get driver conflicts with some of the more generic ones

stone crown
#

*insert obligatory plug for Adafruit*

humble sierra
#

But when coding for Arduino do I use the Arduino IDE? Or like visual studio code?

stone crown
#

Use the Arduino IDE, as much as it sucks

#

and it does suck

untold sparrow
#

*insert obligatory plug for Adafruit*
I almost plugged adafruit, then hesitated LOL

humble sierra
#

Is that good?

untold sparrow
#

I have had good enough luck with ELEGOO lol

#

adafruit is the standard if there was any xD

stone crown
#

Adafruit is a company I like buying my microcontroller parts from.

humble sierra
#

I see

#

Ok I will try the ELEGOO

stone crown
#

They're also a good place to get guides and resources from if you're ever stuck on something

humble sierra
#

What would I ideally like to buya s my first board, I think they call it?

stone crown
#

So, do you have any electronic parts or tools?

humble sierra
#

Like I'm guessing its good, but a one size fits alot of projects thing

#

No

#

Just a screwdriver sadly

#

I can get it though I have money saved up!

stone crown
errant wigeon
#

Seconding the plug for adafruit--they're fantastic all the way through and have a ton of tutorials for whatever you need

stone crown
#

You'll want to learn how to solder probably. Probably with adult supervision if you've never done it before.

errant wigeon
#

wait third-ing

humble sierra
#

Soldering, is that like melting stuff?

#

Oh you need two boards I always though it was one!

stone crown
#

Honestly, to get start, all you need is a breadboard (the white thing in the image). The metro is the actual arduino. You should be able to somewhat plug and play with it.

humble sierra
#

What is the blue board for?

stone crown
#

The blue pcb is a proto shield. Essentially it lets you stack more components together in a space efficient manner

humble sierra
#

I see!

#

If you're doing Soldering which is like melting dosent that mean you'll need to buy another Arduino?

#

Interesting

stone crown
#

So not quite. With solder you add solder to attach parts. Neither the board nor the component should be damaged, just attached using a melted and re-solidified solder rosin.

#

Something like this kit https://www.adafruit.com/product/136 gives you a good idea of what you'll need when you get more into it. You don't need it yet though (you'll know when you need some of the stuff in there).

humble sierra
#

I don't know how to thank you dude!

errant wigeon
#

There's a bunch of concepts you're hitting at once. Electronics can be a bit like legos--you can push parts together and build bigger things. For things to work together you'll need to make sure there's a solid electrical connection between the two objects. You can achieve that by plugging them into a bread board (kind of like how a headphone jack works) or soldering them together (melting and waiting for a metal to solidify so they're attached-kinda like a weld) or other ways

humble sierra
#

You guys are actually so helpful 😄

#

Thank you!

#

That cleared it up perfectly!

errant wigeon
#

No problem! those adafruit kits are great places to start, and if you click through their website you'll come across a lot of helpful tutorials as well

humble sierra
#

Thank you, all of you people! I'm gonna go learn C++ now to help with Arduino!

untold sparrow
#

also, feel free to @ me, I used to teach arduino haha

humble sierra
#

OHHH

#

Ok will do

#

I’ll friend you so I don’t forget

dark hornet
#

hi. I want to learn more about hardware communication. I've done reverse engineering before so I know how a processor executes instructions + OS internals. To get me started, should I buy an arduino uno or smt32? I had someone tell me arduino has a big abstraction layer so smt32 would be good. I just want to learn as much as possible and have fun tbh. I don't have a specific project in mind

timber locust
#

why not try ASM or low-level C?

dark hornet
#

I think that is software related. I need hardware related recommendation

timber locust
#

uhm... but this is a software development discord... if you want to learn actual hardware (i.e. circuit boards) there's more than likely better discords out there

dark hornet
#

yeah you are correct I thought you guys could give me some direction down the road

timber locust
#

maybe stuff like buildapc (discord or reddit) might give you more hints?

#

(also, dont get me wrong, there might be people in this discord who know of better discords)

dark hornet
#

uhm... but this is a software development discord... if you want to learn actual hardware (i.e. circuit boards) there's more than likely better discords out there
@timber locust I think I mislead you here. "by hardware related" I meant like "hardware for my software" not just hardware as in buildapc

timber locust
#

you mean like

#

see how hardware communicates?

dark hornet
#

yeah drivers sensors and all

#

I saw one guy used a port to communicate with his old modem over serial console and he hacked the modem and turned it into some other thing

timber locust
#

i'd say the stm32 is more convenient if you want more types of communication

dark hornet
#

thank you

errant wigeon
#

@dark hornet You also might some ideas if you skim through hackaday projects (in fact I'm fairly confident that project was featured there)

#

finding commonly used chips in projects your interested might help you make a decision as well

ripe coyote
#

Anyone have an Raspberry Pi 4? how do you like it? Ive heard of programmers using it as a server for bots and stuff. Looking into purchasing one.

rain peak
#

I do. I like it. I wouldn't call it a microcontroller. It's a full computer with a full OS.

ripe coyote
#

whats the UI like?

rain peak
#

Standard Linux desktop or Linux command line. Your choice.

ripe coyote
#

ooh i like that. Im looking to get one to host acouple of bots im developing for my server. i can run them on my computer but it slows it down a ton! xD.

#

Would there be anything else you could recommend i need with it? hardware wise?

rain peak
#

They must be quite complex bots if they slow the computer down. Remember that the RPi is less powerful than a full desktop computer.

#

Get a starter kit with RPi, case, power supply, and adapter cables. I recommend getting a case with a fan for RPi 4.

ripe coyote
#

They must be quite complex bots if they slow the computer down. Remember that the RPi is less powerful than a full desktop computer.
@rain peak computer rn is not much to look at xD its a chromebook. 16gb

rain peak
#

RPi 4 is probably similar to a Chromebook. You might need to do some optimization on the bots to get them to run smoothly.

ripe coyote
#

no doubt need to optimize for sure, im still new to all this so i probably have alot of redundant coding that i could probably clean up 😂

zealous island
#

If you want to use a Raspberry as a server, better use the Lite version of Raspberry Pi OS, or install Arch Linux ARM, you don't want unnecessary stuff like a desktop and his utilities

hallow igloo
#

@ripe coyote or you can go for other options like Nvidia's Jetson nano or UDOO BOLT etc

hallow igloo
#

b

clear cedar
#

I am new here guys i want to learn about hardware programming
Can anyone help me please 🙏

hallow igloo
#

wrogn server ignore

hallow igloo
#

Hi

#

Whats micro services

#

Ioc

wheat loom
#

Micro services are services built to be as minimalistic as possible, and use the less resources (memory, CPU, disk space) as possible

tame bluff
#

I'm participating in a competition.
I need to come up with some innovative ideas to make a safe college campus during this period of covid19

#

Do you guys have some ideas ?

calm cave
#

@tame bluff see if there's an off-topic channel that doesn't have an ongoing conversation at the moment. Going forward, please read the description of each channel before commenting in it for the first time. It's important that we keep each channel on topic. Thanks!

tame bluff
#

Ok

stuck thicket
lavish sand
#

Any recommendations for a knob switch, that can be pushed. Like this one

#

But with 5-6 positions and roughly 14-15mm wide

buoyant spear
#

Hi all, can anyone help me with working out why UART seems not to be working at all (using micropython)

#
I have this usb -> serial converter: PL2303HX USB to TTL RS232
I'm using ubuntu

I've got this code:
from machine import UART
from time import sleep

uart = UART(1, 115200)   
uart.init(115200, bits=8, parity=None, stop=1, tx=16, rx=17)

while True:
    print(uart.write("TEST"))
    sleep(2)

I've got the green cable (RX) connected to IO17

I'm using this board: https://www.hackster.io/uncle-yong/wemos-r32-with-arduino-startup-guide-7bc841

#

I get absolutely nothing when checking with picocom, pyserial etc.

#

I've tried different pins, I've tried swapping them over etc.

#

The ground is shared

errant tree
#

have you tried

while True:
    uart.write("TEST")
    sleep(2)

yet? @buoyant spear

#

and if that doesn't work try encoding your message like this:

while True:
    uart.write('TEST'.encode())
    sleep(2)

that is what i have used with serial before and it solved my problem

buoyant spear
#

@errant tree Yes I've tried that, just tried the encode method and that makes no difference either

#

It's like the converter doesn't work, I don't understand it at all

errant tree
#

and you are sure that the baudrate and everything is set up correctly for your microcontroller?

buoyant spear
#

Do you mean the microcontroller in the converter?

#

It's default is 9600 apparently, I've tried that

#

But even then I'd expect to get some output?

errant tree
#

Is there really a microcontroller in the converter itself?

buoyant spear
#

No idea, but from reading some documentation if nothing is connected it you can send serial commands to it to set baudrate etc.

errant tree
#

so its a usb device you plug into your laptop right?

buoyant spear
#

Yeah, USB device -> 4 wires

#

5v, ground, tx, rx

#

Hmmn, just tried powering the d1 from the 5v -> 5v

#

Seems to have broken usb->serial

#

Oh well, I'll try the new one that I ordered (different chip) when it arrives

errant tree
#

what i would suggest is not using uart but serial like this:

import serial
import time

comPort = serial.Serial(port=your com port here like this (COM3), baudrate=whatever baud rate your microcontroller has, timeout=10)

while True:
  comPort.write('test'.encode())
  time.sleep(2)
buoyant spear
#

Is this on the esp32?

#

Because it won't have a port?

errant tree
#

but port as in comport where you are plugging in the adapter into your pc

buoyant spear
#

Yeah, but the esp32 needs to report to another device

#

Not receive info (though it will as well)

errant tree
#

so you are trying to do what exactly?

buoyant spear
#

Unless I'm misunderstand you

#

Sensor data -> serial -> another device

errant tree
#

sensor data is being read out by your esp32?

buoyant spear
#

Written out, yes

errant tree
#

and you want to send it to what device? your pc?

buoyant spear
#

So sensor -> esp32 -> another device

#

Raspberry pi

errant tree
#

gotcha

buoyant spear
#

I didn't/don't want to rely on wifi

errant tree
#

so what does the code on the esp32 look like

buoyant spear
#

Nothing at the moment, I'm literally just trying to get this serial connection to work

#

Haha

#

I was testing the serial -> usb first (to my PC) just to figure out how it all works

#

Then I may make a direct serial-serial connection with a raspberry pi

#

rather than serial-usbconverter-raspberry pi

errant tree
#

but how do you know if its working/not working if you don't have any code on the microcontroller to indicate if its received anything

buoyant spear
#

The esp32 is writing only, the usbconverter/PC is reading from that port

#

You've seen the code above?

errant tree
#

do you have it so that its sending already?

buoyant spear
#
from machine import UART
from time import sleep

uart = UART(1, 115200)   
uart.init(115200, bits=8, parity=None, stop=1, tx=16, rx=17)

while True:
    print(uart.write("TEST"))
    sleep(2)

#

That is on the esp32 (micropython)

errant tree
#

oh now i get you, I thought that was the code running on the pc you are sending to, sorry

buoyant spear
#

Ah, okay, no problem

#

Can you see now why I'm so confused, literally nothing is coming through on the PC side

#

And powering the esp32 from the 5v from that USB converter seems to have fried it

#

so I'm screwed now anyway, haha, until the other one arrives

errant tree
#

what code to detect if anything is coming through on the pc side do you have running

buoyant spear
#

I've tried, putty, picocom, pyserial

#

They all connect to it fine, but nothing comes through

errant tree
#

And powering the esp32 from the 5v from that USB converter seems to have fried it
how do you know?

buoyant spear
#

Because it's no longer recognised, and was warm(!)

errant tree
#

oh yeah that sounds bad

#

but what i would recommend is writing a little python script with serial to listen to the com port and then print anything it is receiving

buoyant spear
#

Not sure what difference that would make? I've used picocom and putty etc.

#

and the tool included with pyserial which does the same

errant tree
#

can't say I have any experience with those

buoyant spear
#

Thanks for you help anyway, I'll wait until the new converter arrives (it has a different chip)

#

Maybe it'll just work(!)

errant tree
#

maybe you connected the pins wrong

#

did you connect the RX of the adapter to the RX of the esp32?

buoyant spear
#

I've tried everything

#

It's TX-RX I believe

errant tree
#

yeah that should be correct

#

because RX to RX and TX to TX wouldn't work i think

buoyant spear
#

Correct

#

Thanks for your help anyway 🙂

#

Appreciate having someone to bounce ideas off of

errant tree
#

No problem :) and best of luck to you with your new esp32 hopefully soon

hard folio
#

Hello guys, need one help,
In normal python there is one framework called aiohttp framework which is based on the asyncio library, so similarly for Micropython is there any Aiohttp equivalent, something like uaiohttp or something, please let me know if it is there.

obsidian marsh
#

has some tried to turn on/off a LED with microcontroller's switch button? I have done it from pin switch but I only had failures the other way. Ive been play with pyboard v1 stm32f405.

sudden hamlet
#

What's your code so far

cursive anvil
#

Guys for a project I need to analyse different hardware platforms and choose he best ones. Now I made a selection between some Raspberry Pi models and WiFi microcontrollers like ESP32. A demand for the project is that it needs to run a web user-interface and handle multiple serial ports at the same time.

In order to validate my decision I need to determine what is required to run a web user-interface. Like minimal requirement is X clock speed, X RAM, X processor etc. Does anyone has an idea on how to do this?

tropic hornet
#

U can create variables or a thrwshold

#

Threshold

#

Of the minimum ram cpu processor clock speed

cursive anvil
#

Yeah how should I determine these? @tropic hornet

#

Like if I say at least 500MHz clock speed, then the question will be: 'how did you get this value?'

tropic hornet
#

Hmmm

#

I would suggest you use a raspberry pi

#

Instead of esp

cursive anvil
#

Yeah no doubt already made the choice

tropic hornet
#

Oh

cursive anvil
#

But I need to tell why with validation points xd

tropic hornet
#

Ohh

cursive anvil
#

Like in my head it all makes sense, but I need something to validate it to

tropic hornet
#

U can scrape a website

#

That has all the microcontrollers specifications

#

Clock speed memory

#

Pins

#

Input iutputs

#

Output

#

That could be a validation point

#

Because the best way to validate any kind of microcontrollers for a specific task is to test it

#

But u cant do it virtually

#

So

cursive anvil
#

Because the best way to validate any kind of microcontrollers for a specific task is to test it
@tropic hornet yea agree with this

#

Sadly most of the times this isn't an option because you can't just order a bunch of things to then make a decision

tropic hornet
#

Yeah true

cursive anvil
#

Like they rather have you only order the one you need 😛

tropic hornet
#

Only option that's left is to look at the microcontrollers schematics and chips

#

ICs

#

To know if they suit our project for a certain time and task , situation

#

Happened with me when I wanted to make bluetooth enabled car that has autonomous systen

#

With arduino

#

Arduino uno was a major overkill and our project manager wanted to be small

#

As possible

#

I didnt know arduino micro

#

So I made a arduino my self

#

Won extra points lol

cursive anvil
#

You made your own arduino? xd

#

You mean you took the atmega on a custom PCB? @tropic hornet

tropic hornet
#

Yes

#

Custom

#

U can find the schematic online

#

With all the onf9

cursive anvil
#

uno seems pretty suited to me for bluetooth, not necessarily overkill xd

#

ye I know I have done it too for my study

#

😄

tropic hornet
#

uno seems pretty suited to me for bluetooth, not necessarily overkill xd
@cursive anvil I T S B I G

cursive anvil
#

yeah overkill in size xd

#

I thought in power

tropic hornet
#

Ye lol

#

I thought in power
@cursive anvil nah lol

#

I dont want to fry my chips

#

Powering with a 12 volt battery more than 500 milliam0s

#

Amps

#

@cursive anvil

#

What was your hardest or complex project u made

cursive anvil
#

Hmhh let me think 🤔 I've made so many by now xd

tropic hornet
#

Lol

#

I used to make project with arduino a lot

cursive anvil
#

Ehh well I learned so much that I can't even compare my first projects with the ones I did recently

tropic hornet
#

Ehh well I learned so much that I can't even compare my first projects with the ones I did recently
@cursive anvil nice

cursive anvil
#

I'll send you a vid 1 sec

tropic hornet
#

Well I left microcontroller programming and stuff lol

#

But I know most of the stuff

#

Still

cursive anvil
#

this one is from a year ago I was working on a lasergame system. It uses solar panel to detect a certain laser pattern it shoots. This way it can detects players. It uses NRF24 to send data like score and hits, this way it also gives you feedback about who you just hit. It makes a beep sound etc. I really want to continue working on this but no time ever since :C

#

Terrible 3D printed gun lol

#

Range was about 250m

tropic hornet
#

No its nice

#

I made a complex project

#

I made a security system

#

That had a lot of stuff

#

Intruder alert system

#

If they break the house

#

And even some defense mechanism system

cursive anvil
#

I really want to continue working on this but with IR (probably laser just for visuals), better detection system. I want it to have a range of like 1-2km and everything through websockets and GPS data. That'd be so cool. But I don't have resources and time 😦

#

Nice you have pic/video?

tropic hornet
#

Nice you have pic/video?
@cursive anvil I dont think so

#

As it was for school

#

So

#

I really want to continue working on this but with IR (probably laser just for visuals), better detection system. I want it to have a range of like 1-2km and everything through websockets and GPS data. That'd be so cool. But I don't have resources and time 😦
@cursive anvil lol 1 to 2km range sensors are very hard to acquire

cursive anvil
#

This one was also challenging

tropic hornet
#

Plus they FRICKING expensive that ur moms ring

#

It was a display system

#

Those Dot matrix displays

#

So there was this program which detected

#

Bass metal drops in music

#

And gave an output

#

So I made one like it would show lyrics and whenever a bass drops

#

The color would change

cursive anvil
#

Yeah this kinda does the same, made it from scratch basically with a lot of patterns. Made it with a websocket user-interface so anyone could use it and connect to it and it automatically grabs the live audio they're playing to visualize it

tropic hornet
#

Yeah this kinda does the same, made it from scratch basically with a lot of patterns. Made it with a websocket user-interface so anyone could use it and connect to it and it automatically grabs the live audio they're playing to visualize it
@cursive anvil yeah we used a esp for that

#

The web socket and the software was on rasp mini

cursive anvil
#

so easy to use 😄

tropic hornet
#

Yeah lol

#

Our school did a very complex project

#

Once

cursive anvil
#

@cursive anvil yeah we used a esp for that
@tropic hornet same this runs on ESP8266

tropic hornet
#

Ah

cursive anvil
#

the beautiful thing was that the website was hosted on the ESP8266 all itself, so literally everything was handled by the ESP8266 😄 , you could just bring it down somewhere and boom you got everything you needed

#

just go to the IP and you're done

tropic hornet
#

the beautiful thing was that the website was hosted on the ESP8266 all itself, so literally everything was handled by the ESP8266 😄 , you could just bring it down somewhere and boom you got everything you needed
@cursive anvil yea true

#

Plus it's very small

cursive anvil
#

yup

#

They are so nice

#

so what ya doing with python now xd

tropic hornet
#

Now I make bots

#

Discord bots

#

Make random projects

cursive anvil
#

Nice haha, just for fun?

tropic hornet
#

Yeah

cursive anvil
#

nicee

tropic hornet
#

My actual goal is to learn ethical hacking

#

I just do these as side projects

#

And I mainly learn IoT just for fun

#

Lol

#

And to flex

#

😂

cursive anvil
#

That'd be so cool but there's not many resources on hacking sadly :C. Because obviously all the good hackers don't just share that

#

hahahahah IoT is nice

tropic hornet
#

Ofc it is

cursive anvil
#

I looked into ethical hacking but idk where to start

tropic hornet
#

I looked into ethical hacking but idk where to start
@cursive anvil theres no definite eay

#

Way to start

cursive anvil
#

Yea I know, you already know some cool stuff?

tropic hornet
#

Yeah

cursive anvil
#

or things you succeeded

#

what cools you did/can?

tropic hornet
#

Lol

#

I never actually hacked irl

#

But I perform hacks and stuff on

#

Website

#

Or puzzlea

cursive anvil
#

What kind of hacks?

tropic hornet
#

Or just try to find some bugs

#

What kind of hacks?
@cursive anvil depends

#

Sometimes u have to find a bug

cursive anvil
#

You just hack on like a test website that you're allowed to hack?

tropic hornet
#

You just hack on like a test website that you're allowed to hack?
@cursive anvil there are website that have puzzles and a sandbox where u perform u hacks

cursive anvil
tropic hornet
#

Yes

cursive anvil
#

I never got further than like level 5 xd

tropic hornet
#

Lol

#

Ctf are really hard

cursive anvil
#

it was a while ago.. maybe I am better now xd

#

ctf?

tropic hornet
#

But fun

#

ctf?
@cursive anvil capture the flag

#

There are certain puzzles keys bugs hidden in a code

#

Which u have to find or crack

#

To get a solution

#

Then u have to write some scripts and the first team find the final bug or code wins

cursive anvil
#

Ahh lol

tropic hornet
#

It's just like cod

formal salmon
#

hey I have a project im trying to do and i have to get a live plot of my arduino using python can anyone help

hallow igloo
#

anyone here use arduino and pyserial

tropic hornet
#

hey I have a project im trying to do and i have to get a live plot of my arduino using python can anyone help
@formal salmon what help u need

#

Like what project u want ur output data to be plotted

formal salmon
#

Yes

#

@tropic hornet I got throught puthon shellbut when i do it in Jupiter notebook it just print like a million graphs

tropic hornet
#

Hmm

#

What kind of project is it

#

Yes
@formal salmon and can you show me the code

formal salmon
#
import numpy  # Import numpy
import matplotlib.pyplot as plt #import matplotlib library
from drawnow import *
 
tempF= []
pressure=[]
arduinoData = serial.Serial('COM8', 9600) #Creating our serial object named arduinoData
plt.ion() #Tell matplotlib you want interactive mode to plot live data

 
def makeFig(): #Create a function that makes our desired plot
    plt.plot(tempF)
    
while True:
    while (arduinoData.inWaiting()==0): #Wait here until there is data
        pass #do nothing
    arduinoString = arduinoData.readline() #read the line of text from the serial port
    temp = arduinoString           #Convert second element to floating number and put in 
    tempF.append(temp)                     #Build our tempF array by appending temp readings                  #Building our pressure array by appending P readings
    drawnow(makeFig)                       #Call drawnow to update our live graph
    plt.pause(.000001)                     #Pause Briefly. Important to keep drawnow from crashing
                       #This allows us to just see the last 50 data points```
#

@tropic hornet

#

@tropic hornet dont follow the comments i changed someones code

celest beacon
#

Anyone got any experience with the WEMOS LOLIN32 ESP32 Lite?

tropic hornet
#

@tropic hornet
@formal salmon in the pyplot u can make the delay more

#

And to my guesss

#

When ur trying it in python shell it creates an interactive plot

#

And with every update in data a new instance isn't created

#

So it happens in one take

#

But in Jupiter notebook

#

With every update in data a new plot gets created

formal salmon
#

How do i makes it so its a constant live plot @tropic hornet

tropic hornet
#

Hmm well tbh I don't really have idea as your code has no such problems I can point out

#

U know

#

while True:

#

This might cause a problem in your Jupiter notebook

#

So change that value to like

#

Wait wait

#

@formal salmon

#

Explain me this

#

What is the use of plt.pause(.0001)

#

I guess that's the problem

#

@formal salmon If changing the time doesn't solve the problem try changing the baud rate

#

Make to 152000

#

Or more

formal salmon
#

@tropic hornet ok thanks ill try tmrw an tell u

sick dagger
#

does raspberry pi talk belong here?

tropic hornet
#

does raspberry pi talk belong here?
@sick dagger yes sir

sick dagger
#

i was able to play krunker on my pi