#general-chat
1 messages ยท Page 51 of 1
Digi-Key
I guess my information is very out of date? lol
neat!
wooooooo just got same day delivery on a screen
1.8 inch 128 x 160 SPI LCD screen
should be alright
there has to be a word that describes the feeling of waiting impatiently for your components to arrive so you can start building something

an hour and 15 minutes and it should be here

lmao
i had to buy 3 more bread boards to make a bigger one
and some RFID readers
also, im very out of my depth here
if im trying to cluster some ESP32 boards together
would i use the higher power higher clock boards
as worker boards
and then slap a pico as the master
because all it really needs to do is tell the other boards what to do
im thinking 133Mhz should be enough for that
Ideally, you'd do everything over TCP/IP. You could do the task scheduling from the host computer, if you want to
i know but im trying to make it all self dependant
all my boards have wifi
so i could do TCP
If all you are going to do from the "main" node is send the task packets and wait for the results, then the pico would be fine
Since everything is so low-level and you'd want to minimize overhead, you'd want to write a common message passing and discovery API, and then program the boards with the task over the air
(which is why I think you should be handling task "scheduling" from your host)
You could even write something to automate worker node "discovery" over mDNS
You could also do TCP over a wired connection
...If they want to write the physical layer from scratch...
That's been a solved problem since the 1900s
I assume you're proposing doing TCP over, say, SPI with some SLIP variant?
Wouldn't they have to write their own TCP stack to do it?
That's one of many possible options, yes
Or are there ready-made solutions for that?
Yeah, SLIP or PPP can run over a serial link, USB, etc. Remember, TCP started as a wired network. This is nothing new.
Of course, but are there ready-made libraries for the ESP232 that can handle that?
Or would one have to write a TCP stack from scratch?
(Because I feel that'd be overkill for many projects when the ESP232 already comes with a wifi physical layer + tcp stack )
I'd have to have a look around, but I wouldn't be surprised if there were generic libraries that could be used. I don't know about ones specific to various CPUs, as it hasn't come up (I normally just use Telemetrix instead of full TCP, so I haven't examined it in detail)
I wonder how complex it'd be to write a TCP stack from scratch... I've never done it and now I kind of want to
The layered stack would make it more tractable, you could get IP going before you layered TCP on top of it, for example. I remember the first time I leveraged the ancient UUCP protocol over a USB link. It worked fine, just much faster than UUCP used to run over dialup!
well, lwip is a model, and you could see what you're getting into
Oh, good catch, I hadn't seen that one!
class WorkerNode
{
public:
WorkerNode(uint8_t _TXPin, uint8_t _RXPin) : TX_Pin(_TXPin), RX_Pin(_RXPin) {
assert(_TXPin == _RXPin);
pinMode(_TXPin, OUTPUT);
pinMode(_RXPin, INPUT);
}
const uint8_t TX_Pin; // Transmit Pin
const uint8_t RX_Pin; // Receive Pin
void Transmit(char data[]);
};```
this is what i have so far for initializing a node
im going to change the TX pins and RX pins to lists i think so i can do duel channel
or more
i meant a vector not a list
how do i connect multiple bread boards together, when i put them together and put my ESP32 board into them, they just curl up and buckle
how do i make them not curl up and buckle
most have little interconnecting tab things on the sides
yeah they do
they buckle
i've figured out another way
im gunna need more of these
can you recommend some that are quite big
width wise because like
the ESP32s are wide
Some people have been known to cut breaboards in two, to have a wider gap between sections. You can also just space breadboards out and have the wider boards straddle them
yeah that's what i've done
You can also attach breadboards to a backing board to keep them flat or buy them that way https://www.adafruit.com/product/443
i think im probably going to build a massive box then glue a bunch of bread boards to the bottom
could maybe remove power rails? i think those are same connection tab things. and then can connect just the main prototyping parts together
yeah
but the issue is
the ESP32 is 10 pins wide
like 10 breadboard slots wide
so if i do that then its there but i cant access anything
im currently just wiring up 3 of my boards in unison so they all share power and a reset switch
its janky but it works
yes, this kind of board form factor was originally done by Espressif, and then they went to a narrower one to avoid that annoyance. But some of the generic suppliers haven't fixed that yet.I have a breadboard I sawed in half for exactly this reason
You'd said you were already doing this?
that's exactly what im doing
Then I'm unsure why you can't access anything
i did that when i realised i could
i can access them now
Oh good, I thought I was missing something. I also found this post on Reddit where someone 3D printed a frame to hold a wide-gap breadboard setup https://www.reddit.com/r/esp32/comments/lig0n2/designed_and_printed_a_mount_for_an_esp32_so_i/
do you know if there is a way i can upload code to 3 boards at once
I think you'd have to do it one at a time, which is also probably the better option anyway
fair
i thought i lost all my breadboard connector cables but i didn't

i ordered 600 more
then i found them

luckily the ones i ordered are the flat single wire ones
that you bend
instead of the ones that makes a mess
everywhere
Viva la mess!
Use 3 computers? ๐
considering im trying to cluster 3 boards together and run as a small computer
cause im bored 
More seriously, I'm sure that you could take a similar route to AVR and setup one MCU as a programmer, then plug the others into it via a hub.
the tricky part is there is 2 different softwares
well firmware
one for the "master" node
and one for the "worker" nodes
Oooh. And how are you connecting them? Wireless?
im pretty sure thats illegal under the prototypers creed.
You could have the host node update the target nodes for you, but you'd have to come up with the protocol to do so.
So. What I'd suggest is seeing if you can get the master/coordinator setup to also act as a programmer. Then, give it a copy of the complex firmware.
That way, you could just keep adding more workers until you have no more room.
then what would happen is the master node would have no flash memory left
i think
im still working out the weeds
with platform IO i think you can remote upload though
Can you add some external memory to it?
well once im out of the first prototype stage
Like a little SD card or something?
im gunna add external Ram
so they can share a memory pool like that
and i'll add some flash
FRAM? SRAM? Both?
Then, you could dedicate an FRAM chip (if big enough) to hold the worker firmware.
instead of requesting the data
i will
or i'll make it load off an SD card on first boot
... And, you could also get a bit crazy and dedicate some space to holding the master/coordinator firmware.
or ill use a pico or something that will upload it
That way, you can use some sort of quorum/election protocol to have them choose which nodes will play which role ๐
yeah
i haven't started programming the worker code yet
so i could make it so if a GPIO pin is high then its the master
then they can all share the same firmware
and i just ground a pin if i need to change the master node quickly
Generally loading firmware isn't super fast anyway, so handing it to the host a chunk at a time to hand off to the targets is generally not a hardship, and avoids needing the host to have the capacity to hold all the software at once.
yeah
If you design the firmware to be dual role, that simplifies a lot. I'd still recommend giving them the ability to program new nodes, not from practicality but because I really like self-expanding clusters.
K8S has spoiled me.
yeah well what im gunna try and do is make it so if the node is running the firmware then a certain pin will be high
if its not then it will update the firmware
or i'll have some form of version control that checks and updates accordingly
Another option that would require a bit more chattiness but not an I/O pin would be something like RAFT: https://raft.github.io/.
Raft is a consensus algorithm that is designed to be easy to understand.
i might use ESP-NOW
but i dont really want to
because i want to make it so i can add any micro controller
providing it supports the Arduino framework
cause currently i have it working where my esps can talk to my pico
i need more bread boards 
is there a way i can make a display over serial to my PC
like
Serial over USB through the usb port
to like make a display window
use my PC to emulate an LCD display or something
just single way
But which direction
board to PC
Eithers pretty trivial end of the day
aight
Dealing with UARTs in most programming languages is pretty straight forward
the space shuttle had a "tell-me-three-times" computer - had to have agreement by two of them to be "sane"
Speed there is the bigger issue, but even so, i2c OLEDs work on far lower bandwidths than a uart is potentially capable of
alright
Ive seen your github mentioning C#. So System.IO.Ports namespace is what you're after
alright
and if i wanted to use one ESP32 to talk to another
could i do that over I2C
then if it doesn't i'll just have to invent my own protocol 
ESP32's do have more than 1 UART
so could just use one of those
and folk ahve pulled all kinds of shenanigans with the ESP32 I2S peripheral (i2s and i2c arent to be confused)
well i want to make a self expanding cluster of them
it wont be anything interesting
but im bored
and think it would be cool to learn
how to do stuff like that
got canbus too which might be more appropriate for clusters than i2c as canbus is masterless
But if your cluster has a rigid definition of a master, then i2c is fine
well i've mixed my codebase from master and slave to mixed
so there is one codebase for both
i just have to pull a gpio pin to high
to enable master
mode
Wasnt necessarily referring to firmware
but i2c has a very rigid definition of being a bus with a master device and slave devices
i could use normal GPIO and pull the pins low or high to transmit binary signals
this is my setup currently
powering the rails, linking the reset button
i2c masters can write data to the slaves and also request data from them, but the slave cant arbitrarily message the master.
Whats normally done to get around that is having 1 additional gpio just being an interrupt line
i already have that covered
#ifndef WORKERNODE_H
#define WORKERNODE_H
#include <Arduino.h>
class WorkerNode
{
public:
WorkerNode(uint8_t _TXPin, uint8_t _RXPin) : TX_Pin(_TXPin), RX_Pin(_RXPin) {
assert(_TXPin == _RXPin);
pinMode(_TXPin, OUTPUT);
pinMode(_RXPin, INPUT);
}
const uint8_t TX_Pin; // Transmit Pin
const uint8_t RX_Pin; // Receive Pin
void Transmit(char data[]);
};
#endif // WORKERNODE_H```
this is the worker node class
the transmit method will transmit data across the TX pin through binary signals
it will start by sending a code to signal that its transmitting
You might aswell just use SoftwareSerial
but if this was i2c, you'd just pull a gpio thats externally pulled up low. Then That signals the master that at least one of its slaves wants data checking, and just have a status register on each device
I2C is multi-master. Whichever device initiated communication is considered the "master" for that transaction.
oh, word?
Eh, original spec wasnt
A few chipsets do it just because well, they can
Does mean support for it on MCUs is varied
I don't think the I2C spec ever explicitly stated that there has to be a single device initiating all transactions.
In all honesty I2C is a pretty loose spec. There are a lot of implementations, many of which don't adhere perfectly. This can be a point of contention for devices that require clock stretching support and controllers that often don't.
I2C and clock-speeds are pretty notorious overall
Most devices will support 100 and 400kHz. Above that it's hit and 
(just ran into some issues where 100 wasn't "good enough" and things worked poorly)
That... can be caused by a variety of factors.
How many StemmaQT boards did you hook together?
1
the new I2C -> Neopixel and I2C Gamepad are a bit sensitive to the Raspberry Pi's "baudrate" apparently
separately ๐
That sounds like a firmware issue to me.
you keep teasing us with fancy renders and metal prints and we still don't even know what you're building ๐ญ ๐
is that an engine
it's an automated fishing rod and then you change your username to @ihavefish
ha
no
but, weirdly, the company that makes the expensive version of this also makes fishing reels
anyhow, its not really a secret. it is a device that pulls a cable a preset distance when you press a button.
well yes. but why? What's at the end of the cable?
that should narrow it down
a fish? ๐
no fishes
Shimano the bike parts company also makes fishing reels? ๐ฎ
ha yup
does the arduino sdk have vectors?
Well, fujifilm also manufactures medicine
shimano makes 2 things. bike drivetrains and fishing kit. they both rely on fussy little clutch devices and custom bearings, so, makes some sense.
anyhow, my devices is not to compete with theirs really, it is more of an "addition". their electronic shifting stuff is absurdly expensive, with $200 batteries and $30 wires. It is also completely closed and the new one doesnt work with the old one, 12 speed cant shift 11 speed etc etc. Nonsensical.
mine will shift literally anything in any combination (that functions mechanically). and it will be open, use cheap available parts, and 3d prints.
right now, its looking like under $100 for the parts, plus a few small tools (taps and drill bits and dremel to clean up the prints). VS $2000+ msrp for the cheapest full shimano kit (which replaces all the parts on your bike of course, so its not a totally fair price comparison).
Are you sure you want to trust something self-made with your bike?
haha
I mean, failure can result to injury
I wouldn't be taking any chances, unless I were a bike parts design expert or something
"unless I were a bike parts design expert or something"
yes
i wouldnt trust something YOU made ๐
ha
No worries, I wouldn't trust a bike part I made either
:P
hehe
Sorry for making the wrong assumptions!
but basically, yes, i know what im doing. also the likely hood of this part failing and causing injury is very low
Again, sorry!
my custom hydraulic brake levers.. that is another topic
ha
those need some testing
some "real" bike companies have put out some horrible things too. stuff that straight up does not work or breaks in 5 minutes
"custom hydraulic brake levels"... Now that's a thing I wouldn't dare make :P
start with laser scanning someone elses
hehe
anyhow, if this silly thing works, it should take off and other people can add features, like bluetooth app configuring and some form of bus/mesh network like shimano has on their to connect each part
i want the core software/hardware to be some sort of managed open source. Where there is an official current version of all files, but people can still do whatever they like and modify it
The perl artistic license kind of is like this?
i have not looked into it. I know GPL is not good, cause i WANT people to make commercial versions etc.
ill look into it later. for now i need to just get the thing made and working right
the main idea is that it places restrictions over what can keep the official version's name and what can.
ah
Another way would be to use the license of your choosing, and register a trademark for your project's name, then enforce any conditions via your trademark
IANAL and this is not legal advice, but that's what mozilla does, for example
To clarify, none of this is legal adivce
*advice
I can see it being useful to have an officially endorsed brand so people do not get confused with variants that might not be fully compatible
also maybe makes it more likely to gain traction, vs shoving the files on github and saying "good luck"
anyhow. thats for later
i need to test the crap out of it for the rest of the year before i let people poke at it.
I am no mechanical engineer, so I can't say anything about that
Actually, I'm no kind of engineer
hehe
One of the previous takes on the idea I saw was pretty much just a leadscrew tugging the shifter cable
that sounds great!
i hope so, haha
it came about cause i have a bike with shimano 12 speed mountain, and i want to put a road handlebar on it and no shifters exist for that.
so.. we make them
muhahah
electronic lets you program any spacing. just put a text file on the feather via usb c.
you can also shift it with an allen key if the battery dies
With the right setup lets you do automatic shifting too
auto is possible yes. but usually not desirable
On a roadie or mtb no
do I understand this correctly?
You make the electronic shifter that shifts the wires. And most normal gear shifts use wires so you could take the part that goes onto the wheel from a normal (non-electric) gear shift and add your part?
But getting popular for city bikes and cargos
exactly
there is a system that does this, but they priced it really badly, and it is closed off
and that means that the part that takes all the load and I feel like might be safety-critial is still off-the-shelf ๐
hypothetically some chinese company could find a way to make mine for $30.
I had a "professional" bike shop mix and match shimano and sram parts when I took mine in to be fixed (I couldnt be bothered to do it myself)
Different shift ratios -.-
yeah. it gets so confusing sometimes.
especially with shimano, since they dont often tell you what "works" vs what they market it for.
they seem to be pushing to streamline 12 speed though. we'll see if they muck it up
Ended up learning that a lot of bike stuff, want it done proper, do it yourself
yup
ha
or.. run campagnolo 11 speed shifters (that scan) with a 9 speed shimano rear derailleur and cassette. cause fun!
(that combo actually works, for some reason)
my system though you can take a campy 8 speed road derailleur, a sram 12 speed mountain cassette, and shift them just fine (provided the cassette is withing the derailelurs teeth range)
I now have matching shimano 8 speed derailleur, cassette and shifter working almost perfectly
Its getting a bit finicky about the lower 3 gears
hanger could be bent
Honestly, wouldnt surprise me
or, you have a dura ace derailleur... cause they made that one different, cause, reasons
Nah, its matching set derailleur and shifter
Though the cassette isnt, but I dont think shimano have differences in the spacing of their 8 speed cassettes afaik
Other one I havent checked, very possible my chainlines just out a bit
for my demo testing, i have an 8 speed xtr deraileur, a 9 speed alivio, a 12 speed slx. mated to an 8 speed mountain cassette, a 9 speed road, and 11 speed road, and 12 speed mountain. they should all interchange except the xtr wont do the 12 speed cassette cause it cant take the 45 teeth
Got a middrive conversion motor on there, not that unlikely its shifted my chainline over a bit
shimano 8 is all the same, BUT, some of the lower priced ones dont have very good profiling and dont shift well
Which'll be lovely as thats the 3rd derailleur in under 500 miles
put the pulley on an angle and bad times ensue, usually only in one or 2 gears
On this bike alone, its on the 3rd
on previous bikes, maybe half a dozen
ebikes?
ah ok
And the first 2 derailleurs were also pre conversion
not sure what you are doing to the poor things ๐
even the cheapest shimano ones usualyl work very well
Easy, chuck bikes in car, or try downhilling
and last forever til you hit a tree
Once: kid lobbed a stick in my wheel
ha
Cassette survived. Derailleur and spokes didnt
ha. I don't understand anything in this discussion :P
this is the gunea pig bike. muhahah
Nor did my life fluid all remain inside me
eep
those red pedals on my bike used to be white...
๐
j/k
but i did really damage my leg with them. so much red juice
I remember getting home, mum being like what on earth happened, me saying and her just not messing around
She called cops on the kid
eek
It was a bully that used to go out of his way to screw with me
Full on criminal damage, not just childish games
Cutting brake lines while my bike was in the bike sheds etc
What in the world, I missed this message. that's so messed up!
easiest way to deal with bullies is to get them to steal your lunch, but secretly put a salad in there. They wont come back.
Like, what on earth, this is a genuinely horrifying thing to do
Yeah, hence why when I got back that time, mum just went straight to the cops
Didn't bother with the guys parents or the school or whatever
Did the police press charges?
They went with some stupidity they regularly use for young folk pulling antics that can so easily escalate
"you better pay for that damage young man"
Which okay, to an extent kids be kids, but that's beyond kids be kids and well into menace to society continues to menace
Either way. Bike no survive. Which I think makes for 3 wheels and like the 4th derailleur it had replaced during my ownership of it
I only ever had to pay for 1 wheel. The other was a car - I was uninjured on that one, and driver I think more shaken than me
If I had similar parents...
She had her moments in both directions unfortunately
Ah
It was not meant to be sarcasm anyway
Ultimately, life is life. It has its downs, it really does. But it's not all bad
Push through the bad to get to the good, even when it feels like you've gotta move a mountain to get there.
Oh and sometimes you just have to take a leaf out of bears book and chill for a bit
Yes I know there's a pet channel but figured this channel need some pawsitivity
ha
I love it when cats do this
She pretends to sleep up there while actually listening for me
yes
im trying to measure the response time between my master node sending a message to the worker node receiving it
Use the value from micros()?
that could work
Note that both nodes will be timing from their own power-on and using their own clock, so the values won't be synced between master and worker.
they will because i have both of them connected up to eachother
i plug on in the both turn on
the reset buttons are connected aswell
can you use async in the arduino sdk
wait can you even use promises in arduino
or C++ in general
No lol, unless you find some library for it
I think that would be out of the scope of embedded development
Its not the end of the world though ๐
also, second thing is i need to declare a variable but its construction is dependant on the state of a pin
how do i do that
In the embedded world typically everything should be non-blocking, so you can use a state based control flow
Set up the pin as an input and then read the value
You set the pin state, then read from it
so i need to declare the creation of the class outside of the setup method
Declare the variable outside of the scope of the func
yes but then the constructor kicks in and the variables are constant
It's not a computer. It's best to kind of forget about most best practices and think that you have to satiate the constraints of a limited arch
There will come a time you will even have to use the otherwise dreaded global variables
Nah just do this:
int a
setup() {
//configure pin
//read value
a = whatever
}
loop() {
//access a
}
its a custom class
class WorkerNode
{
public:
WorkerNode(uint8_t _TXPin, uint8_t _RXPin, bool _isMaster = false) : TX_Pin(_TXPin), RX_Pin(_RXPin), isMaster(_isMaster) {
assert(_TXPin == _RXPin);
pinMode(_TXPin, OUTPUT);
pinMode(_RXPin, INPUT);
_AllWorkers.push_back(this);
}
const uint8_t TX_Pin; // Transmit Pin
const uint8_t RX_Pin; // Receive Pin
const bool isMaster; // Is Master
Vector<WorkerNode*> AllWorkers = this->_AllWorkers;
void Transmit(char data[]);
private:
static Vector<WorkerNode*> _AllWorkers;
};
I have never done object-oriented programming for a microcontroller
i dont even know if this is gunna work
Typically, you would be served best by an imperative model
100%
You can use objects for storing & operating on data but probably best to use the imperitive model for interacting with hardware
@sick apex I'm guessing _isMaster is what is determined by the pin value?
Wait
Why are you defining it as const lol
You want to change it later so dont make it const just declare it as a bool
Or a static bool
to save the small amount of memory that it will save
Nah
Nah
i dont want to change it later
That wont work then
Cant have both
If you're changing it at all it cant be const
Yeah, either just set it to TRUE/FALSE on init
its not being changed
i am setting it on the constructor
or 0
then i would need to recompile it for the master and worker
And then do preprocessor magic to set pin state and class init
Yeah, the preprocessor can help you with that
oh, how
Thats gonna be complicated theres got to be an easier solution
#ifdef IS_MASTER
....
#else
....
#endif
Then, compile with -DIS_MASTER or not
yes but i would have to recompile it
the idea is to have it check pin 23 to see if its high
if it is
then that is the master
hahaha
i can if i make multiple
There is a solution
But it'll probably take up more memory that you are saving by using const
What you could do is just run a function before you construct this object to read the pin state
Instead of doing it within the constructor
OTOH, having a master and worker version of the firmware will also save more program memory by pruning out dead code
Well, thanks to the preprocessor, you can mostly avoid that
im using platformio, how do i add the definition for the preprocessor then
is it build_flags
There should be a place to set build flags
yeah
๐
I've never used platformio
But feel free to try it and see if it works
TBH, I don't even know what platformio is ๐
its amazing
build_flags = -D IS_MASTER
i got this
Oh it probably is, I've just never looked into it :P
There's your problem, I don't really like vscode :P
fair
Got nothing against it (or people who use it, of course), it just doesn't suit my tastes
it handles building, using SDKs
library managing
picking boards
building
uploading
serial monitoring
its just amazing
Its nice
I want to get into using rust for stm32 development but the learning curve for setting up the tooling is quite high
I know rust but I just cant figure out how to actually get it onto the microcontroller lol
One day, I'm gonna learn rust
You should, its really nice
It's been out for, what, 10 years now? :P
And nobody has heard about it until 1-2yrs ago hahaha
Nah, I remember looking at some article about it solving C's memory management woes, and though it was neat and that I should probably look into it
I also remember when mozilla started switching to it
but, tbf, my time is limited, and I spend most of it writing python anyway
now i just have to set an interrupt to handle what happens when data is being transferred
and boom
What are you making @sick apex ?
btw @dusky estuary , is that you on the plane?
I'm curious how it feels to actually be the one flying the thing
Yeah ๐
im trying to make a non discriminate cluster of microcontrollers that can use the arduino SDK
It was a T-6 texan-1, I got to do aerobatics in it for my birthday
without using anything fancy
Bro thats ambitious omg
i know right
its going well so far
i managed to get them to sync up
the hardest part is that i dont have many Micro USB cables

so i cant read the serial output of all of them at once
You gotta figure out how to combine the serial output from all of them into just 1 serial output
that's what this is for
Ah I see
its so i can transmit and receive serial output at the same time
it will all go through the master node
Thats awesome
So pretty much you're making your own communication protocol
Very cool
yeah
lmao
well what im doing to begin with is sending 32 as a signal that its started transmitting data
I'm guessing you're going to structure the messages so they all have a header that specifies their target?
then its sending stuff in binary
Oh wow why binary instead of text?
after each byte it will send an 8
because im sending it by pulling the GPIO pins high or low
oh wow
to signal that a byte has been sent
How are you syncing the clocks?
haven't figured that part out yet
You could use the parallel protocol but it takes up 8 pins
if there aren't 8 bits before the 8
How would it know if two consecutive 0's were sent? ๐
then it will transmit something to signal that it missed something
doesn't matter
How so?
cause im going to make sure that it always sends 8 bits
so if a byte is only 4 bits then it will fill it out with blank space
Right but if it sends 11011100 how would it know that it didn't just send 1010?
It'll be floating?
im going to make an enum class
that has flags in it
so it can figure out what is what
Right I'm talking about the actual hardware part
oh yeah
that's a massive oversight
i think im going to have to use I2C
then i can use the I2C clock to sync the clocks
That'll be complete different from what you described tho
yeah i had to re think it
Yeah
But if you use 2 pins you can use one pin for data and one for clock
then that would be 3 pins
because the transmit pin
Transmit and clock
transmit, receive and clock
which cuts my amount of possible controllers in half
well not half
a third
unless i invent a protocol to sync multiple masters together
lol
i2c would be a challenge though, I'm not even sure how you'd set the address of each device
simple
it takes hex
i'll just set the value
by checking if its a master
if it is a master then it will be 1
if its a worker
then it will use GPIO
to get a binary number from the master
which will know how many worker nodes already exist
then it can set an address from that
Ah yeah looks like i2c is pretty simple actually https://forum.arduino.cc/t/what-is-the-i2c-address-of-arduino-uno-board-and-how-to-modify-i2c-address/121758/6
also im pretty sure you can use 1 I2C port to control like 1024 devices at 10 bits
lol
i mean feel free to give me ideas
No that sounds good
Pretty much each board will just have to determine if its a master or slave. The master board will have an address of 0x1, and each slave board would probably determine its address from the pin configuration
omg i just realised
pin 23 indicates that its a master node
so it will know that its not a master if pin 23 is low
Right but it still will need to set an address for itself
yes
so then it can get its info from the master
using binary
to get an address
that isn't already being used
But it will need an address to communicate over i2c
yes i know
And the master device will need to know its address to send it data
it wont communicate over I2C to get its address
it will use regular old GPIO
until it has a confirmed address
right
so all worker nodes will talk to the master over pin 22
if they dont have an address
they will transmit over pin 22
to receive one
obviously it wont be pin 22 for the master
Right but if 2 nodes talk to the master at the same time how will they know who the response was meant for
And how would you prevent two nodes from transmitting at the same time?
because it will come from a different pin
the workers talk to the master node from pin 22
the workers pin 22
to the masters pin x
that or i could just make the workers take their turn
by using pin 22 and pin 21
wait
nevermind
i could hard code them using the preprocessor but that isn't self expanding which is what i want
clarification: i want it to be self expanding
Yeah
i have to think this through
Very complicated
yeah but it would be cool
It would
each one is 2 cores
so im currently working at 4 cores
i have 4 esp32s
so that's 8 cores
then i have 2 rpis
12 cores
rpis have 8 pio cores each
so that's 12 cores and 16 pio cores
the pio cores make the rpi picos great for handling GPIO input
Hello all. I saw the following posted on Adafruit's website, but did not see a guide or instructions. Can anyone help point me in the right direction for compiling GNUBOY for the ESP32?
You can download the bin directly from here: https://mch2022.badge.team/projects/gnuboy
Thank you! My next question...I am a bit of a newb, is there a good guide I can check out to get started on how to compile this or what environment it must be done on?
The GitHub link should have sufficient instructions, let me double check
It looks like you can clone it to your computer with git and run make all if you have the required dependencies installed which are listed on the main README.md
Actually, make all should include all dependencies so that should be all you need
If youโre on windows, youโll probably want to build with a WSL2 Linux subsystem. On max you can do it right from Terminal
I can use Linux. I can follow simple commands like Make, etc. Though I would like to learn exactly what's going on so I can better troubleshoot. Also, those commands would compile the source and create...something...how do I get that onto the esp32?
Esptool. If you look in the Makefile, there is a install make command
Ok thank you! I looked but must not have been hard enough.
housing almost done. just need to measure the real servo tomorrow and add it's mounts. Print is way over built, but still only $8. Better to be overbuilt than break when it has a load on it ๐
i need a little help with kotlin developing. Trying to make a simple counter app using a bluetooth shutter button.
need a little guidance, is there a channel for that ?
Someone on irc ##electronics told me that magnets made from hardened steel hold magnetism better than pure iron. Is there a table that shows magnetic flux density for such alloys?
Looking very good
I see what appear to be 2 cable holes though? Hub compatibility or misunderstanding on my part?
#help-with-projects probably would be a good place to start
While I'm not a fan of wikipedia in general, this page on coercivity does include such a table https://en.wikipedia.org/wiki/Coercivity
looks like solid wire to me, so they will hold their shape. The ends are already bent at 90 degrees
perfect
Those type are solid core and very rigid. You can make custom lengths with spools of solid core wire and wire strippers.
Something like this https://www.adafruit.com/product/3174
or use dupont style breadboard wire kits https://www.adafruit.com/product/1956
Nice thing about the dupont style is they work with both breadboards and the connectors commonly found on SBC's and microcontrollers so people end up using these the most eventually.
Hey, Iโm Richard, one of the co-founders of Mava (Mava_app on Twitter).
I wanted to chat with your community manager. Whatโs the best way to reach out?
@bitter creek Your request has been noticed and someone from the community will contact you.
Noob question time (based on a discussion in #help-with-hw-design a few days ago):
https://www.digikey.de/en/products/detail/ATSAMD21G18A-MFT/5057241 SAMD21: 3,69โฌ
https://www.digikey.de/en/products/detail/raspberry-pi/SC0914-13/14306010?s=N4IgTCBcDaIE4AcwAYAsyQF0C%2BQ
RP2040: 0,63โฌ
Both Cortex-M0+
RP2040 has 2x cores, >2x MHz, 8x RAM, and costs less than a fifth. What am I missing? How does that pricing make sense?
I think you need more (expensive) supporting parts like flash for the RP2040 (it doesn't have any program flash on board). But still. Is this just chip shortage scalping because buying a more expensive MCU is cheaper than redesigning your entire boards&software? RPI just pricing extremely agressively because they're new? Or is there something that's not in the digikey listing that makes SAMD21 "5x better"?
I don't know, I'm just guessing, but my thinking is the Raspberry Pi foundation is leveraging their massive buying power to reduce costs (the same way they do with their other products). Additionally, the SAMD chips probably have additional documentation, engineering support, and certifications for use in various environments, and all of those cost money. I doubt the pricing is "because they're new", and expect the RP2040 to always be inexpensive.
I do find the SAMD21 Arduino integration to be a lot smoother, and the built-in DAC is a very nice feature.
Also note the RP2040 doesn't contain any flash, so it's not a single-chip solution
oh, SAMD21 has "automotive", "functional Safety". Those words sound expensive ๐
yeah but RP2040+flash+other supporting stuff should still be cheaper than 3,7โฌ because I can buy a Pi pico for 4โฌ ๐
And wouldn't Microchip have even larger orders and buying power?
But yeah documentation, certifications and support = expensive makes total sense
You might be able to find a non-automotive certified version
Unless you're designing automotive parts, you probably don't care
(actually I don't want to buy anything. I'm just curious ๐ )
oh, ok, nvm then ๐ป
thanks for your answers ๐
I do buy a lot of automotive qualified parts, as they're quite reliable (nearly as good as mil spec and aerospace parts) but not that expensive (due to their huge manufacturing volume and cost sensitive market)
Yeah, unless you're talking FPGAs :P
I don't recall seeing a lot of FPGAs in automotive applications, as they usually have a well-defined use case and enough lead time and volume (and interest in protecting IP) to make ASICs attractive.
But I do like ICs with serious spike protection and capacitors that laugh at heat and vibration
(I know automotive FPGAs exist. I do not know anything about whether the automotive industry actually uses them)
I presume so-called "self-driving cars" may have them on?
Automotive grade MOSFETs
cable hast to go in one side then out the other
i have but only in niches
They are likely used in ECUs.
I wouldn't be surprised
Its where I encountered them
a few of the aftermarket standalones use them
Mass production ECUs, less likely
There is likely industrial use as well. Automotive and industrial markets often have similar requirements.
Not necessarily, especially if they are using them for image processing or as ASIC replacements.
'cept the ECU doesnt do the image processing
ECU can refer to more than just the engine control unit.
Most other modules have their own terms
Head unit is another term they use now.
so ECU tends to very specifically only refer to the engine control unit automotively
you see other terms like bcm and vcu for other modules
Yeah, I'm a characterization engineer working on automotive video SERDES chips. I work at a chip level, not a module level.
Oscilloscopes with big market penetration to automotive diagnostics for us
Repairing vacuum tube oscilloscopes for me. What's an FPGA again? ๐
Cursed computing idea: Vacuum tube GAL
We're small enough to rely upon FPGAs rather than ASICs
Nope, dunno why there's the remnants of a label on it beyond clearly someone put a label on it
For purely digital designs there aren't a huge number of benefits to ASICs anymore.
some of the opportunities for reduced power consumption would be of benefit to us
Less because omg lets reduce the power consumption of all the things on the planet (not that I disagree there either) but more because its a USB device, huge variance in power availability on different machines/setups and a very small power budget to begin with
But that side ain't my speciality. This boi is a code monkey
Yeah, that's the other major use for ASICs.
Alas the cost of an ASIC versus the cost of an FPGA...
Of course I can't speak for the company as a whole and share figures of the sort or future plans etc etc. But it tldrs to hey, if it was a cost effective investment, sure, if it's not, FPGA
Speaking of FPGA, it appears using verilator no longer requires also writing a testbench in C++?
/shrug I don't do the FPGA stuff
Not sure I follow why that would be, mine are pretty neatly terminated at the site shifter end. Ive only seen cable in and out on setups like IGH's with push/pull cabling. But either way, I think it looks great, I'm interested to see this thing develop
hard to expalin. if you have a newer shimano shifter, there is a hole one side, you thread the cable into it, then out the other side. In older shifters you would slot in the cable from the same end it comes out.
uhm...how much trouble am I asking if I'm starting my SMD soldering with soldering few 0603 resistors and 0805 diodes/fuses? 
Old Nexus shifters have the cable in similar vain as the newer XT and similar.
And it's painful since it does a nice 90 degree loop inside the shifter...
yeah. i put a feed guide in my shifter cause it needs to make a slight turn (only 30 or so degrees
you can ask a question in public in #help-with-community
I feel I may have been drunk when I last installed shifters or something, very possible
Yeah, I've never had more than an 8 speed cassette
i think they only added this for 11 speed
I have of course had multi speed chainrings before, though dont have one now
the reason is to make it more water tights
in my case i dont want anything getting in the worm gear
11 speed is nice, 12 speed is kinda nice until it goes out of tune...
Ngl, I dont miss having a 2/3 speed chainring
You mean like 2/3 in front?
indeed
12s has been great for me. 11 mountain was horrible. although my 11 road di2 is great
multiple chainrings is so 80s
hehe
Albeit, I am on a mid drive motor ebike
Heh, I usually just shift with the changering and leave the cassette alone
11 in mountain is freaking nice, 11 on road is... nice but I still have 2x11 on my cyclo. Not going to drop it, maybe even swap larger ones.
Should be fine, I've done those with no particular problems.
Speaking of mtb, time to check if I can finally find some new brakes.
The motor assist + motor also getting gearing benefit are probably making up for the single chainring
Even though one has been soldering THT only to this point and only 2.54mm raster?
and tbf, make up pretty good for gears 1-3 being so sketchy
I have literally looked for either Hope or Magura.
i have hope on all my bikes
Magura on mine
Issue with them is pad availability: That forces me to order the pads since they are with 0 availability locally here.
I have previously had shudder... Clarks
But man, after trying those 4 piston Maguras...
1210 is generally not a problem, 0805 is fiddly but doable, 0603 is starting to get difficult, I recommend good light, a magnifier, and flux.
ah. fair. but thats a once ever few years thing
Man the Maguras were nice.
MT5e's I have
Sweet. One option is that I take the MHP30 and use soldering paste. Shame that it requires fridge storage.
I still have the Avids it came with
not gonna lie, being orange was part of the reason to buy :x
You can get away without fridge storage for short term (a few months), since you're not relying on repeatable heat profiles in an oven.
WHen I took it in to get the derailleur done by a bike shop, the cable brakes were wrecked, had them shove some hydros on at same time and they were just a nightmare
the 2 mistakes I made: a) I think that bike shop just is not very good (I have other evidence for this too) and truly epitomised if you want something doing right do it yourself and b) cheaped out
Isn't the leakage / evaporation of the flux the issue, hence the fridge storage?
Cables are fine with me, but I'm a fan of basic simple mechanics, be it bikes, planes, cars, or whatever.
If you keep it covered, the flux shouldn't evaporate fast, and you can always add flux (if you're going to use a syringe to dispense the paste, thinning it with flux can make it go more smoothly)
cable brakes no. cable shifters im fine with, although electronic is a genuine step up. just hard to justify the price of it.
I still have Shimano BR-M315 with me, I absolutely hate them. Though, they are by far, the cheapest end.
shimano cheap brakes are amazingly good.
Since, I could always seal them with sealing/vacuum bags 
I haven't had a lick of trouble from my cable brakes. The shifters do require attention to stay calibrated.
They are good for braking but modulation is...well, isn't.
end of last year got some magura mt5e's, did have a bike shop with an actually decent rep do the install on those mostly because I dont have the tools for trimming hydraulic lines to size and dont have the tools for bleeding maguras, theyve been pretty fantastic
Once you go with hydraulic brakes, you ain't going back
oh, well, that is all shimano (except xtr race). by design.
Bleeding brakes on a bike? Not interested. I'm so lazy, I'm eyeing airless tires.
True, but they are literally on-off. Nothing between.
Atleast my 105 brakes are nice.
shimano brakes need to be bled like once every 15 years for the average user. its a non issue.
my clarks needed bleeding regularly
the maguras I currently have and dads shimanos, never been touched after install
hope are a royal pain to set up initially, but once done, you never touch them again until something breaks
Yeah, I have only once bled my brakes or refilled. And it was all my issue as I decided to pop the piston out from the brake housing 
Isn't they like really pain in the butt to get all the air out?
yup, and to centre
My friend has Hope's in his MTB, he uses those massage hammers/guns for the hoses 
It's a sight to see but it works surprisingly well.
ive done it 50 times now so i can do it pretty fast. but shiman you cut hose, reconnect, pump lever, hold tight, tighten caliper bolts and done. can set them up in literally 5 mins
What's the advantage of hydraulic? It just seems unnecessarily complicated to me (but then again, I used to help a friend work on their Datsun, which gave me a fine loathing for cheap hydraulics)
its less complcate, near zero adjusting and maintaining
"less" complicated? I do not see that.
More carefree, not so sensitive to weather and often times can be more easier to modulate the power).
it is only complicated for the first 5 minutes if you instal them yourself
well thats the thing, hydraulics are real simple. But self adjusting as pad wears down, possibility of multi pot
Initial setups and those bleedings are more complicated but you need to do them really rarely.
7 moving parts compared to 3?
cable discs are too fussy. hybrid ones are neat, but they often cost more than hydraulcis.
rim braks? uh... no
hehe
And feel hideous.
ehhhhh, how many cable brakes are actually just 3 moving parts
I don't get why they exist. They feel absolutely horrible. (hybrids I mean)
Versus hydro brakes, lever pushes on a cylinder of fluid, moving a piston at the other end of a hose. Pretty simples
Ive honestly only ever encountered them in 2 applications and 1 of those was dubious
Like mr no fish mentioned, road bikes
Weird, I have cable discs on all of 'em and I like 'em fine
Hybrids are being phased out as nowadays roadbikes now are getting more and more hydraulics
heck, 105 series is fully hydraulic now, no hybrid.
yes. tiagra too. and cues coming next year
and also I have seen people using them on ebikes to use with cable levers with integrated brake cutoff switches in them, I think this is a dubious usage
3 parts: lever, cable, other lever.
but they still cost alot. 105 brake levers are like $700msrp . JUST the levers.
Vs lever, piston, pipe, fluid, other piston, other lever
Technically, hydraulics are exactly the same.
By that logic hydros are 3 parts. Piston, hose, other piston
would you like cable brakes in your car. ๐
drifting intensifies
dont fear this new fangled 1990s tech. ๐
I do, in all 3 cars, but there's also a hydraulic system (with vacuum booster).
I am not familiar with a single car using cable brakes
cables to the booster sure
but No car since like pre war era has literal brake cables
I think you're thinking service brakes
Parking brake barely counts
(that and cable parking brakes are dying a death)
I do hate electronic parking brakes
though hydraulic parking brakes are also a thing too
my friends car has "electric brakes". i assume that only means electronic control of the hydraulics
I would be leery of hydraulic parking brakes. A tiny leak through a seal could cause them to lose grip over time (exactly the opposite of what you want for a parking brake)
depends, but generally yeahhish
theres a few takes on electronically controlled parking brakes
but pretty much all of them still involve hydraulic calipers
and stamping the pedal hard enough overriding the electronics
im not sure what the laws are, but given part of their point is a safety failsafe, cable is pretty viable
Much like older ABS units that functioned by releasing brake booster vacuum could be defeated by standing on the pedal harder
but theyre all some variety of electronic booster rather than vacuum booster, and still allow enough force at pedal to actuate caliper directly
They just also have ability to fight you for ABS and regen purposes
and can self apply
Its a very weird sensation driving EVs and some hybrids with those boosters
Another thing I'm leery of is the Hyundai "one pedal driving" bug where the brake lights don't come on when engine braking
Brake, pedal feels firm and dont wanna move, car still brakes on regen, but as it slows down to the point regen is ineffective and switches over to allowing the friction brakes, you can feel the pedal suddenly move again
and its just an odd sensation
That does sound unsettling
I've encountered it in the prius, tesla model 3 and a polestar
and it makes sense, it is fighting you on purpose, why use the friction brakes
thats inefficient versus regen
Seriously put some force on that pedal and the pedal will move and friction brakes kick in
But most of the time it tries to keep you off them and on the regen instead
Reminds me of that fuel economy hack from the 1970s that connected the engine vacuum to the accelerator pedal to make it harder to push. As one reviewer put it "I guess it might help a little with lead-footed, weak-kneed drivers"
I do, however, like the ability to override the electronics and directly engage a mechanical system when I really want to.
Irony that with some more recent studies on efficient driving. The vacuum hack probably would have made the car less efficient
Turns out, slowly accelerating up to highway speeds is not actually fuel efficient
Likewise neither is just flooring it to the rev limiter trying to accelerate rapidly
hmm. i need a tiny display to show gear/battry charge etc. oled and tft wont be readable. not sure about e ink. are there tiny reflective style lcds that have pixels instead of segments?
The Sharp memory displays might do the job, depending on how tiny you need
oh, i remember those. arent they discontinued though?
ah nope
do they hold an image like e paper with no/low power?
is reading
You still need power for them to work but it is neat to watch the pixels fade away instead of just blinking out immediately at no power.
yeah, seems low power to sustain image, and more power to change image. i think that will do. it will turn on when a button is pushed, and then off after 5 secs and it can fade away
break out is a little clunky, but i think it should be fine (im trying to make this thing off the shelf, so cutitng the tabs off the board is not really ideal)
and i dont care about it being night readable for now. its only for status.
i wonder what this shimano display is. its like a backlit segment lcd
Any word on making an updated pygamer? Like with a touchscreen and shaped more like the switch? Or is that too expensive?
I've seen a few that are pretty much led segments behind some pretty lenses
Dunno if that's what Shimano are doing, haven't seen their display, but it's a viable strategy it seems
this one glows quite brigtht, like an alarm clock but white
Could well be that then
bit of rearanging and the sharp display will fit
Honestly big reason I'm interested in your project is cleaning up the cockpit of my bike
made the housing basically a box now. feather on the bottom. this might be good as a testing houising as i can drill hols and modify it without waiting for new prints.
I'd need to interface with a Tongsheng motor but that's pretty well documented at this point
ill leave ebike things to other people :). ideally i think youd put a feather sense in this, with bluetooth and use the sensors for computer functions.
Next big ebike project for me on horizon is custom battery
The dubious quality Chinese battery pack I got with the bike (though I did do some testing of it and proved BMS and it's balance functions do work) seems to be losing a fair bit of capacity and I'm not convinced it was ever of its rated capacity in the first place
And it doesn't fit the bike properly. Hose clamps and cable ties are involved in its current mounting
Meant to go on downtube bottle mounts, but my bikes a downhill frame, so doesn't fit, hoseclamped the cradle above top tube instead
ah. ok
I'd own a second bike, but that requires space I dont have
the motor is on the handlebar? ๐คฏ For some (or no) reason I thought the (or one) point of electrifying this was to shorten the bowden wire and only run an electric wire across the bike ๐
nope
not in this case
you could mount it anywhere you like, but for the purpose of this test, it goes on the handlebar.
bikes are already conveliently routed for cables too. theres another system sorta similart to mine and they mount it on the back of the bike but it gets kicked, and hit by rocks, and such
i see
$450. thats why mine isnt to be a sellable product. it is much better as a community diy thing, cause it can be cheaper and with open code. youll always be able to get parts. 30 years form now youll be able to get some form of feather board, some form of 18650 battery cell, and can print repair parts.
you already can;t easily get replacements for 10 year old shimano electronic systems.
bleh
ha
anyhow
i think i might be able to send for prints next week on this
whee
at least with a bike you don't have to throw away the whole bike and can "just" get a completely new shifting stuff. Other products are way worse by being more integrated. But I agree completely
oh wow ๐คฏ
high end drivetrain stuff is $$$
and they wont sell the electronic shifting version to anyone but manufacturers
oof
I even have a similar one. no clue which model but it's Rohloff ๐
rohloff has many, going back to the 90s
Rohloff only has the 1 main product, just lots of iterations like whether it has disc mounts on it or spoke counts etc
and the electronic shift version
I wonder if you could directly attach a motor to it. It has a gear? shaft? thingy? that gets turned to shift
shimano has an alfine one with is electronic. but it is not uh, high performance. its more for city bikes
yeah the shimano e-step
and its apparently not very good
Like they designed it for their city and cargo ebikes, except their mid drive motors even in the detuned 250W euro spec compliant variants are wrecking them apparently
O-o
a big issue with e bikes is they are often $300 bikes with $1500 worth of electonics. And that $300 bike could barely handle an out of shape human irding it. something that outputs 250-500 continuous is way beyond it's original intention
If I were building an ebike on the cheap, I'd start with this https://www.allelectronics.com/item/dcm-2460/24-vdc-brushless-motor-600-watt/1.html
MAC-BMC P/N 12570-3. Powerful brushless motor with built-in 30A motor speed controller. Designed for electric scooters. Great low-end torque. Requires 5K Ohm potentiometer or Hall-effect throttle to interface with speed control. Great motor for battlebots, hobbyists and experimenters.โข No-load Specs:ย ย ย ย ย 2480 RPM @ 24.6 VDC, 3Aย ย ย ย ย 100 kVโข...
$49, includes built-in ESC
There's a reason motorcycles are not built on bicycle frames.
bit too large for a regular bike, and 24v will likely lose you some efficiency.
*anymore