[ 3 / biz / cgl / ck / diy / fa / ic / jp / lit / sci / vr / vt ] [ index / top / reports ] [ become a patron ] [ status ]
2023-11: Warosu is now out of extended maintenance.

/diy/ - Do It Yourself


View post   

File: 1.56 MB, 1568x644, wtfduino.png [View same] [iqdb] [saucenao] [google]
2516795 No.2516795 [Reply] [Original]

Previous thread:>>2491169

Here we discuss microcontrollers, SBCs and microcontroller accessories, such as Atmel mega and tiny AVRs (Arduinos), PICs, ARM boards such as blue/black pill STM32, ESP8266/32s, RP2040, Raspberry Pi, and others.

For general electronics questions (power supplies, level shifting, motor driving, etc.) please ask /ohm/.

>where can I find verified quality microcontrollers and other electronic sensors or parts
digikey.com
mouser.com
arrow.com
newark.com

>but that's too expensive
aliexpress.com (many parts here are fake, particularly specific parts out of stock in the above sites)
lcsc.com

>I need a part that does X and Y, with Z specifications. How can I find it?
use digikey or mouser's parametric part search. Then purchase from one of the sellers listed above.

>how do I get started with microcontrollers, where should I start?
There is no defined starting point, grab a book and start reading or buy an arduino off ebay/amazon and start messing around. There are a plethora of examples online to get started.

>resources:
https://github.com/kitspace/awesome-electronics

>> No.2517107

>>2516795
Why can't these threads be on /g/

>> No.2517116

>>2517107
you have to go back

>> No.2517173

>>2517107
1. no smartphones are arduino based
2. arduino can't run gentoo

>> No.2517174

>>2517173
>arduino can't run gentoo
Raspberry Pi can tho

>> No.2517176

>>2517107
/g/ is about consuming, not creating.

>> No.2517182

anybody used labview or matlab to generate fpga hdl?
I might have a project where I have to use fpga and my plan is to first tests the algorithms in python and then write it in vhdl.
Never used any design tool to generate hdl, are they any good?

>> No.2517186

>>2517182
Any reason why you can't write it in verilog (or vhdl if you like pain) and test it with a simulator like iverilog or verilator?

>> No.2517194

>>2517186
of course the vhdl/verilog will be simulated with simulator.
I'm thinking is there any point in generating some of the components with higher level languages like matlab.
Not sure how much matlab license and the plugins to generate code costs.

>> No.2517196

>>2517194
I don't have any experience with high level synthesis, but my thinking is that the result will be slow, inefficient, and hard to debug.

>> No.2517360
File: 567 KB, 2769x3793, 1669140573812892.jpg [View same] [iqdb] [saucenao] [google]
2517360

I'm interested in getting a 6502 kit of some kind so that I can learn more about how computers work at a basic level, any recommendations?

>> No.2517369

>>2517360
google "c64 kit", but that's a very painful approach, and you'll be learning how 40 year old computers work which has little to do with modern CPUs. Why not mess with arduino, ESP32, or raspberry pi and avoid the pain of getting ancient chips interfaced with memory, etc.

>> No.2517394

>>2517369
The 6502 assembly is supposedly very easy to learn and use, and you can still buy new 6502 chips and associated components. I want to learn the very low level side of computing to further my understanding of how they work.

>> No.2517399

>>2517394
>The 6502 assembly is supposedly very easy to learn and use,

This is correct.

>> No.2517464

>>2517394
Aren’t z80-derived MPUs more common?
I like the idea of external memory either way, as it makes external program/game cartridges doable without bootloaders. Not that that doesn’t also apply to ESPs and the RP2040.

>> No.2517484

tarduino question here but I am trying to change variables on my ESP8266 via http requests but the values dont seem to change

>> No.2517515

>>2517464
More common than what? Both 6502 and Z80 are basically obsolete architectures now. They get used from time to time in "real" products, but 8051 still kicks both of their asses in the legacy 8-bit world. I think there were even some early AVR chips with a pinout to match 8051 DIP.
And there's no particular reason that a "cartridge" can't use a SPI or I2C interface. I think some MPUs even support executing code directly from SPI flash.

>> No.2517518

>>2517515
>6502 z80 are obselete architectures
what are recent ones?

>> No.2517562

>>2517515
>8051 still kicks both of their asses in the legacy 8-bit world
would you mind elaborating on this? What makes the 8051 better than a 6502?

>> No.2517579

>>2517515
>And there's no particular reason that a "cartridge" can't use a SPI or I2C interface
Oh yeah absolutely. The required external program memory of an RP2040 or ESP8266/ESP32 run on SPI after all. Just if you're trying to use an equivalent 8-bit micro (e.g. an AVR) it's a bit of a hack to get it to load code from external memory for execution, but Mitxela did so and documented the process.
Just if you have parallel memory, you have the option of easily having some fraction of address spaces lead to on-board memory, and some fraction being in the cartridge. Never seen an MCU/MPU with internal program memory that can also read instructions directly from external memory, but I guess some probably exist.

>I think there were even some early AVR chips with a pinout to match 8051 DIP.
Like the AT89C2051? They're still old-stock where I work and I can get 5 for like a dollar. Bought 5 of the AT90S2313 instead though, for some reason I forgot. I'll probably get the AT89C2051s sooner or later, for my collection.

>> No.2517585

>>2517579
>RP2040
Has plenty of internal flash and RAM.
>Never seen an MCU/MPU with internal program memory that can also read instructions directly from external memory,
Most ARMs I've seen can do it?

>> No.2517595
File: 83 KB, 978x698, RP2040 naming scheme.png [View same] [iqdb] [saucenao] [google]
2517595

>>2517585
>Has plenty of internal flash and RAM.
It has zero internal nonvolatile memory. The Pi Picos and other dev-boards just come with SPI flash ICs. Same for ESP32s and such. See:
>https://datasheet.lcsc.com/lcsc/2201101600_Raspberry-Pi-RP2040_C2040.pdf

>Most ARMs I've seen can do it?
Comes with the territory of DMA I guess. Good to know.

>> No.2517599

>>2517595
>The Pi Picos and other dev-boards just come with SPI flash ICs.
My mistake.

>> No.2517705

>>2517484
>change variables on my ESP8266 via http requests but the values dont seem to change

You can execute any code you like via an http request, so simplify your question by showing us the code that runs via the http request.

My esp is at 10.0.0.205, so when i enter this in a browser:

10.0.0.205/abc

and the code says :

server.on("/abc", do_abc);

that will call the function abc() and do whatever I want.

>> No.2517706

>>2517705
>that will call the function abc

that should say do_abc() to match the server.on function

>> No.2517948

Is there any project out there to use an Arduino to record the voltage waveform on a speaker, and then save them as an audio file, so that you can save 1 for 1 the audio out of something like a vintage electronic game?
I have a Spiro pinball machine I'm repairing, and this came to mind since I was checking the speaker inputs on my oscilloscope to diagnose a no sound issue.

>> No.2517972

>>2517948
It's called a USB ADC. For a lot of old games though, you can fairly easily reverse engineer the synthesiser (often just a few triangle and square waves and a noise channel) so you can generate it in higher fidelity than the original. Using a logic analyser to record the digital waveforms going into the synthesiser or DAC IC(s) may be required if you can't get at the code.

For something like a pinball machine, depending on vintage, it may use purpose-made analogue synths, for which yeah you'd likely want to just record the voltage waveform. Same for if you can't read the ROM sent to a DAC, but I can't imagine that being the case.

An arduino is a bit slow, you could probably get there with something like an ESP32 and a nice high-quality Texas Instruments ADC IC and an SD card, but altogether it would probably cost more than an equivalent quality USB-audio codec IC, plus take a fair bit of programming effort.

>> No.2518041
File: 267 KB, 480x527, 1516247589712.png [View same] [iqdb] [saucenao] [google]
2518041

Suggestions for projects using tiny and resource-light micros? Bought a PIC10F202 and a PIC12F675 to mess around a bit with assembly. Was thinking of making a keychain with blinking lights, playing a dumb tone or something like that.

>>2517369
Not the OP, but I also wanted to play with one of those old microprocessors just for the lulz.
I wanted to order Ben Eater's kit, but shipping to where I live would be terribly expensive. And I can't find the 6502 interface adapter that he uses for sale anywhere near me.

>> No.2518081

>>2518041
general purpose PWM board with a socket for a fet for speed control
sensor alarm (temperature, VOCs, light intensity, etc.)
timer for camera shutter (gotta buy a remote shutter to reuse the proprietary connector)
sd card datalogger
general purpose display driver
something with bit-banged usb
eeprom reader/writer
lcr meter
morse code decoder/encoder
some sort of ultra-low-bandwidth digital radio

>> No.2518534

Figured out a faster way to drive a 3-digit decimal display than division on an 8-bit micro that lacks hardware division:
>hundreds H = (N * 41) >> 12
>Hbig = H * 100
>tens T = ((N - Hbig) * 410) >> 12
>Tbig = 10 * T
>ones O = N - Hbig - Tbig
Checked all the values in a spreadsheet, no errors below 1100 or so, which doesn't matter for a 3-digit number.
As per this:
>http://www.avr-asm-tutorial.net/avr_en/calc/HARDMULT.html#mult16by8
The three 16-bit multiplications should only take 10 clock cycles if the compiler knows what's what, less if I can tell it that the result will never be more than 16-bits long. Plus the 12 cycles for Rshifting, or maybe less for 4 Rshifts plus a transposition. As per this:
>https://ww1.microchip.com/downloads/en/AppNotes/doc0936.pdf
A division would take 173 cycles minimum.
It also says that a multiplication routine would take like 105 cycles, but since my AVRs have hardware multiplication I think that doesn't apply, right? Wonder if the compiler simplifies division by a power of 2 into Rshifts too?

For that transposition, basically just grabbing the upper byte of a 16-bit number, does anyone know how I'd do that efficiently in C (e.g. without 8 Rshifts)? Or would those Rshifts just compile down to looking at seperate memory addresses instead? Some guy on the arduino forum suggests that's what happens:
https://forum.arduino.cc/t/changing-a-16bit-binary-number-into-two-8-bit-byte/44940/7
But doing it that way and trusting the compiler is a bit shit IMO. There's gotta be a way of using pointers, right?

>> No.2518549

What's your opinion of micro:bit?
I think I might've fucked up getting a bunch of these for my highschool class. We're into python and I was in a mad rush to get some kind of microcontroller/something/anything due to money needing to be spent.

But I'm looking around and demos seem focused on lighting the on-device LEDs with block-coding.
I mean, oh well, we didn't technically pay for it. Still just getting a sinking feeling in my stomach I got cheers for "robotics" funding shit and we'll end up with something more for toddlers.
I know you can use python on it, but all I'm seeing after it's been funded amounts to some led(whichone) type things.
Some students are new to programming, so it could be helpful to idk, show a truth table in the onboard leds or something.

Did I fuck up? Is there a high ceiling of possible uses for these?

>> No.2518566

>>2518549
They're a pretty cool hardware design, but the programming support seems to be mostly oriented towards that kiddie-blox shit. But there is micro-python for it, and you might want to check that out. I even have a micro:bit but never got around to doing anything with it because I'd rather use my bag of blue pill boards.

As far as C/C++ goes, it was supported by mbed, but they're dropping their online IDE real soon (as in if you have projects on there, download them fucking now). I tried to get the official offline mbed working for a blue pill board, but found out that either 1) you can run the latest version of mbed which is super bloated (like 40K code minimum for anything) or 2) you can try to use an older version of mbed (2.x?). But when I tried, my situation required fucking with python 2 vs 3 upgrade shit, and it wasn't worth the effort.
I think they have some other kind of online-based compiler for mbed now, but I really wanted offline. I ended up going through much effort to get bare gcc working, so I'm leaving mbed behind, but I can make my own C++ classes that work sort of like mbed.

>> No.2518568

>>2518534
Cycle count rarely matters for shit like that because it's not used often enough to make a difference.
Usually I see cheap subtract loops for conversion, but you can also use BCD math. If you're using C, you might as well use sprintf.

>> No.2518572

>>2518549
I think there's decently a high use ceiling. Ultimately there's a nordic-semi M0 ARM chip on there, but I think what's most important is what kind of programming the (presumably USB bootloader) can support. A quick look suggests that they can be programmed in the MicroPython code editor, Microsoft MakeCode, the Micro Bit web editor, plus some other editors that have added support for it themselves. Chances are people found a way to program C on them, but it might require an STlink or other dedicated ARM hardware programmer. Not recommended for the kids unless they really care about execution speed.

On the scale of things, probably ultimately less versatile and more expensive than the Pi Pico, but for python they sound a lot easier to program. I work retail and we sell the Micro Bit for 60NZD (38USD) and it's kinda nuts for a mid-tier dev-board designed to be accessible for kids.

>>2518568
>Cycle count rarely matters for shit like that because it's not used often enough to make a difference
I guess so? Even a thousand clock cycles for display maths still enables a maximum 20kHz refresh-rate. I do want like 60Hz though (it's for a benchtop PSU), my current setup is made from a generic panel meter with 1Hz refresh rate and it's ass.
>sprintf
Oh yeah, forgot about that.

>> No.2518601

>>2518572
>maximum 20kHz refresh-rate
For a display? That you're looking at with your eyes?
The compare-and-subtract method in assembly language is still going to be more efficient than using 16-bit or 32-bit hardware multiply and divide instructions. It's literally what games written for Z80 and 6502 did most of the time.

>> No.2518628

>>2518601
>For a display? That you're looking at with your eyes?
Yeah I was pointing out the overkill.
>The compare-and-subtract method in assembly language is still going to be more efficient
It's what, worst case 10 compare and subtract operations per digit? Bidirectional successive approximation could drop it to 4 of each I guess. If you have hardware division then going that way would probably be quicker, assuming you have the data bus to store the entire number, but that doesn't apply to 8-bit unless you're doing tiny numbers, so fair enough. Z80 and 6502 didn't even have hardware multiplication, let alone division.

>> No.2518678

>>2518628
>Bidirectional successive approximation could
It's literally not worth the time to golf the code that way. You'll just make it harder understand wtf you did when you have to fix it later. You don't go shaving microseconds off of code that runs a few times per second.

>> No.2518696
File: 22 KB, 1227x519, powersupply.png [View same] [iqdb] [saucenao] [google]
2518696

>>2518041 here, is this okay for powering those micros? I thought on doing a very basic devboard for them because I don't have a ZIF socket adapter and using a PICKIT on a breadboard is AIDS.

>> No.2518697

>>2518696
Forgot to mention, asking beacuse some tutorials mention adding a ferrite bead for filtering, but I wanted to keep it simple and THT.

>> No.2518699

>>2518696
>feed 5V into the input of a 5V regulator
that won't work
if you use a 3.3v regulator, then yes but ensure the dropout is enough.

>> No.2518703

>>2518697
>beacuse some tutorials mention adding a ferrite bead for filtering
you'll be fine.

>> No.2518709

>>2518699
Damn, I forgot to remove the regulator when I decided to use only USB power, that was for a DC jack.

>>2518703
Alright then.

>> No.2518713

>>2518709
FYI, 10µF is the maximum for across a USB port. Any higher and you end up out of spec, and could draw too much startup current. Honestly 22µF isn't too big of a deal, but personally I'd stick to 10µF. Any higher and I'd use a pi filter, that way the inductor/choke can prevent a big current spike.

>> No.2518872

>>2518572
>>2518566
Thanks. I ordered a microbit to play around with it on my own, but just saw a youtube demo where it was struggling to run a fan.
I don't really know shit about hardware or electronics, so I'm totally out of my element haha.
Would raspberry pi have been better? I went against it because of the price difference.
Remember our focus is on python and programming. I'm also wondering if looking at microcontrollers is just misguided for these purposes.
Though I suppose just having wifi opens a lot of programming problems to work with, maybe dipping into networking (but some of these students have barely done more than check their email on chromebooks.)

Mainly I don't want the final output of these to just be the 5x5 red LEDs making smiley faces.

>> No.2518905

>>2518872
>Would raspberry pi have been better?
RasPi is a full computer capable of running Linux and web browsers. It is not a microcontroller. It does have some I/O pins, but the OS mostly gets in the way of using them. And you have to deal with it like a full computer, keeping the OS running, etc.
A microcontroller has nothing but maybe a bootloader. Any OS is built into your project. And there is usually nothing like a file system or network ports.

It's also that much more to throw out when (not if) something gets zapped. I was making a chip reader with a blue pill, and accidentally touched a +12 wire to an I/O pin, and now the thing runs hot because of the blown pin. I knew what I was doing, and was being careful, and still zapped it. I'm kind of surprised that's the only time, there were other times I thought I had, and was wrong. But I started with a bag of twenty for $40 including shipping, seven-ish years ago, and most are still in the bag. And even then, it's only the main chip. I have some lower-spec ST chips that should drop right in.
The main thing you want when playing around with microcontrollers is to have identical spares around. You still want to be careful whenever you hook it up to something, but when it happens you need to be able to pull out another one and get back to work. If you had to change chip type, you would have to fuck with your build configuration. Also it lets you keep more than one project in progress at the same time. Blue pill is about as chink as you can get and still be able to get more.

The thing about micro:bit is that it already has a few useful things on the board (like the LED matrix), so you can do stuff without hooking it up anything, and it has the "better" I/O pins brought out to big holes you can clip to. It can also fit into carrier boards, I got one that was a game-controller style.

>> No.2518913

>>2518905
You can run something on rpi without using an OS. It's just an ARM, like many MCUs. Running Linux isn't anything special anyway. It only implies you have enough memory somewhere, which could be external SDRAM.

>> No.2518916

>>2518913
Sure you can, but seriously, who does? You can also go safari hunting in Africa with a shoulder-launched missile. The use case for running RPi without an OS is very small.
There's a reason why both Cortex A and Cortex M exist.

>> No.2518950

>>2518905
Really appreciate the thoughts. I had vague feelings about the raspberry pi that match up with what you're saying so that's nice.

>blue pill
What's this mean?

Could anyone give me some project ideas that microbit would be suitable for, that could also include some intermediate-level python skillls?
I seem to suck at searching for it, or the SEO for the babby projects is too strong.
We have access to a 3d printer also so will be able to spend some time on enclosures and so on, but I will be learning that along with them.

>> No.2518974
File: 103 KB, 750x382, bluepilled.jpg [View same] [iqdb] [saucenao] [google]
2518974

How difficult would it be to create a base USB HID device platform that I could reuse to create custom joysticks of different sizes and shapes, just changing the amount of buttons, analog sticks and so?
Also, would Full Speed be good enough? I don't know shit about USB, but most micros I can get my hands on affordaby aren't High-Speed.

>>2518713
>pi filter
Thanks, didn't know about that. I checked my reference board and indeed, the only filtering after the USB connector is a 10uF cap, while the DC jack side has the voltage regulator with 2 caps. A jumper selects between USB or DC as the power source.

>>2518950
Pic related, it's a type of STM32 dev board.

>> No.2518992

>>2518974
>How difficult would it be to create a base USB HID device platform that I could reuse to create custom joysticks of different sizes and shapes, just changing the amount of buttons, analog sticks and so?
Very simple if you're capable of programming. Harder if you're a trial-and-error code monkey.
>Also, would Full Speed be good enough? I don't know shit about USB, but most micros I can get my hands on affordaby aren't High-Speed.
USB 1.0 was was made for stuff like this.

>> No.2519058
File: 202 KB, 1568x667, diy joy controllers.jpg [View same] [iqdb] [saucenao] [google]
2519058

>>2518974
>How difficult

too easy.

>> No.2519160

>>2518950
Some project ideas I already posted: >>2518081

>> No.2519218

>>2518974
Something like a pic18f25k50 and a few weeks reading usb spec chapter9 you can write from scratch in asm a usb template for hid very easily on a bread board at full speed

>> No.2519238

>>2519218
>Re-implement USB spec on MCU
>instead of using already provided HAL libraries or 3rd party HAL libraries
Sounds like a colossal waste of time

>> No.2519258

>>2519238
if you don't get it, you don't get it. i can't help you.

>> No.2519286

>>2519258
>if you don't get it, you don't get it. i

no, i get it.
you're the kinda guy who uses copper ore dragged from a riverbed to make a USB cable instead of buying one at the dollar store.

>> No.2519306

If I'm reading the datasheet correctly, I think it's possible to link two of the ATtiny214's timers together using the event system? I want a particular clock division going to an 8-bit timer (781) so if I set up 16-bit timer TCA0 running at clock speed with a ceiling value of 781, I think I can route the output of that into TCB0.

Anyone used event systems on MCUs before?

>> No.2519311
File: 481 KB, 605x610, 1621459252625.png [View same] [iqdb] [saucenao] [google]
2519311

>>2516795
>Microcontroller General
>no programming FAQ section
/g/ kicked me out for being a tryhard, but /diy/ has none relevant threads at all. Go fucking figure

>> No.2519313

>>2519311
Too many different hardware and software setups out there to generalise into a FAQ. Half the people here probably use the arduino IDE. If a search engine fails you asking here should get some sort of result if you're lucky.

>> No.2519521

>>2519313
>use the arduino IDE
I'm fucking weeping at how low the standards in low level programming are.

>> No.2519577

>>2519521
When your code is like 100 lines long, and only made of a single file with a few functions and no classes, it really doesn't make that big of a difference. Barely any worse than N++, AVRdude, and AVR-gcc in terms of function, and a lot more convenient.
A lot of vendor software (like MPlabX) are kinda ass. And not FOSS. If you want debugging then they're going to be worth considering, but it's not like GDB doesn't exist.

>> No.2519762

>have m5stack
>want to do a project with it
>don't need anything
fuck

>> No.2519937

>>2518549
You could install Zephyr RTOS to the Micro:Bit.
https://docs.zephyrproject.org/2.7.0/boards/arm/bbc_microbit/doc/index.html

>> No.2519949

>>2519521
it depends on what youre doing. if youre just testing something small on a common devboard then its just about a thousand times easier. most of the people here i assume arent doung embedded professionally, where the """"standards"""" are much higher

>> No.2520039

>>2519521
When you have large complex projects besides 'lol blinky LED' shit you start to appreciate RTOS, multithreading, and abstractions.
Arduino can do everything from blinky to full blown FreeRTOS integration.

>> No.2520046

>>2519937
While powerful and imo better than Arduino, teaching Zephyr to students who are new to programming is just asking for trouble.

>> No.2520061

>>2519949
Where would one look for “professional” groups, forums?

>> No.2520064

>>2520061
i meant professional in the sense that most people here dont do it as a career. also, professionals cant really talk about shit because it usually breaks some NDA clause

>> No.2520079

>>2519949
>embedded professionally, where the """"standards"""" are much higher
lol, lmao even

>> No.2520080

>>2520064
Unless you go into super specifics there's no way for your employer to find out, assuming there's even two people from the same company in the same thread on a mongolian basket weaving fourm.

>> No.2520109

>>2520080
or they arent gigantic spergs who sit on herr all day

>> No.2520112

>>2520079
then those people are making shit hardware and/or is illegal, depending on country of course

>> No.2520113

>>2520112
>then those people are making shit hardware
yes
>or is illegal
not with a compliance waiver :)

>> No.2520125

>usart hardware on avr has infrared mode
holy shit i'll use this for sure

>> No.2520188

Anyone here actually make any money doing this or is it just a fun hobby for you as well.

>> No.2520190
File: 1.26 MB, 2091x2258, fun.jpg [View same] [iqdb] [saucenao] [google]
2520190

>>2520188
I sold some PWM generating boards for a hundred dollars or so the other week. Kinda a specialist application that meant a simple DC speed controller wouldn't work. I work retail in a shop where potential clients are somewhat common. I don't actually make a profit when I consider the time spent, but that time spent might as well just be practice for my personal projects. It's also kinda fun working to some concrete specs.

Hint, always include contingency plans in your PCB layouts. Jumpers, extra and redundant footprints, extra passives around that unused op-amp just in case you need it, alternate pin mappings, that sort of thing.

>> No.2520292

>>2517182
my former colleague used matlab for this, specifically he implemented MOSSE tracker like one in opencv on fpga. Not sure what he did specifically, he's abroad now... I know he somehow implemented the algorithm in matlab and then generated hdl

>> No.2520359

>>2520125
if its irda then you wont, because you need equivalent hardware on the otherside or you have to reimplement the protocol yourself

>> No.2520363

>>2520113
highly unlikely in most industries/countries. most products are forced into different and higher grades for compliance due to their components. things like batteries, any form of wireless radio, power rating, volatile components, being able be plugged into grid, magnetics...etc. im missing a whole swath of shit but you get the idea. unless youre in china and you can literally just get compliance certs by paying some cash to the CCP

>> No.2520463

I need to use two IMUs to sense relative positions of two parts. Is that going to be a problem on an I2C bus, since they're both identical components? Or do they somehow magically pick different IDs to communicate up and down the bus with?

Or can I even plug multiple devices into the Rasberry Pi's I2C bus? Or is it just one device per computer?

>> No.2520465

>>2517360
6502 was a very simple CPU even for its time. The one difficult bit was that one of the buses was only half the width it needed to be (because pin shortage) and you had to implement some sort of weird latch mechanism to hold half the address and then catch the second half when it came through on the next cycle.

Anyway, I'd recommend picking up the STM32 if you want to learn about embedded systems, or a Raspberry Pi if you want to work more at the software level. I've read that the Pi's instruction set is basically a massively expanded 6502 instruction set. Haven't bothered getting down into machine code on it yet tho.

>> No.2520466

>>2517394
Ah. Yeah. Can confirm.

I still think you'd be better off with learning an ARM device like the RasPi. Or just download a 6502 simulator and learn assembler on that -- there are Apple ][ simulators out there that you can play with, too.

Playing around at the hardware level is fun but ultimately frustrating since it's hard to know whether you're doing things wrong or if you just shorted out the chip and fried it.

>> No.2520467

>>2518974
You could always do it with a Pi Zero in USB gadget mode.

>> No.2520486

>>2520359
Yeah I'd be making both the remote and the receiver.

>> No.2520538

>>2520463
they should have AD0 pins which changes the i2c address for situations exactly like this

>> No.2520558
File: 46 KB, 800x501, uoKFo.jpg [View same] [iqdb] [saucenao] [google]
2520558

>>2520463
No, you will have issues. The solution is to use different busses or an I2C mux. The mux sits in front of the two IMU's and you address it to change busses then address the IMU.

>> No.2520585

>>2517107
It would have been appropriate on the old /cyb/ generals. Unfortunately, it as killed by mods, so any attempts of doing non consumerism tech to /g/ will be met with stern reactions.

>> No.2520743

>>2520538
Yeah those pins are neat. Can be either set statically as a way of having two of the same sensor, or toggled dynamically to have any number of those sensors, so long as you've got the room and pins for a 1-of-N decoder.

>>2520558
lol

>> No.2520754 [DELETED] 
File: 25 KB, 564x439, file.png [View same] [iqdb] [saucenao] [google]
2520754

>>2520743
>lol
why, unless you're a retard who's assuming all IMU's ave ADX pins to change the i2c address. He never specified what part number IMU he was using.

>> No.2520853

Hello, I'm new to PIC. Trying to program that demo board for a start using the example assembler code of the demo board pdf.
>Where can I get p16F887.inc?

>> No.2520854
File: 186 KB, 840x993, file.png [View same] [iqdb] [saucenao] [google]
2520854

>>2520853

>> No.2520893 [DELETED] 
File: 10 KB, 700x330, file.png [View same] [iqdb] [saucenao] [google]
2520893

Hello. Which OPamp would best be used with pic related equalizer?
https://sound-au.com/articles/eq.htm

>> No.2520927

>>2520854
angle brackets are only for system includes, try quotes around the filename instead
also you should start with a working example and chip it down to a minimum framework, then save that as your starter project to copy from, so you won't make dumb rookie mistakes like that
>>2520893
>op-amp
ask in /ohm/

>> No.2520963

>>2520927
Sorry, I am absolutely clueless.
I just got a PICkit 2 and bought the PICkit Plus software to program using that out of date programmer. My only goal right now is to get some blinkie test code onto the board, but perhaps the instructions in the book are outdated.
https://files.catbox.moe/ul8lvd.pdf
I thought the include file would come with the software.

>> No.2520964

>>2520963
>I thought the include file would come with the software.
google shows similar issues for other people. it sounds like an installation error where the file is in the wrong place or a PATH thing is not set. do you know how to search for a file? on linux there is a "find" command that will tell you if the file is on your computer or in any file system you specify.

>> No.2520967

>>2520964
Thanks for the effort. But I can't find the .inc anywhere on the system.
I downloaded the mplabx build straight from the microchip website.

>> No.2520969

>>2520963
Are you trying to use a newer CPU with an older IDE? It's hard to have an include file for a chip that didn't exist at the time. You can an old IDE if you want (and I have), but you still need to start with one that you know supports your chip, same for the support libraries.
Also I am now awake enough to see that wasn't C. The angle brackets thing is for C, I got no fucking idea what MPLAB assembler wants for includes.

Yeah, getting a blinky working first is the Right Way, but it really helps to start with a known working project for your chip first. It's usually better to keep searching for another blinky project than to tweak one that doesn't work right out of the zip file.
I've still got PTSD from getting an STM32/gcc/C++/make build working the way I want it, but I went through three or four blinky projects before I found one that was right.

>> No.2520977

>>2520969
>Are you trying to use a newer CPU with an older IDE?
No, I am using the newest version of MPLABx
Only the programmer is outdated so I use an alternative software that also supports the newest chips. I paid 15€ for this https://pickitplus.co.uk/Typesetter/
>but it really helps to start with a known working project for your chip first
Yes, that's why I'm using the PDF for the demo board using assembler.
The demo board uses an old chip - pic16f887 - that is also supported by mplabx.
But I don't know what those .inc files are supposed to be.

>> No.2520998

>>2520969
The board and programmer work fine though. Found some premade blinkie.hex file.
https://github.com/Hack-a-Day/PIC-Blink/blob/master/16f887/blink.hex

>> No.2521003

has anyone fucked around with the bosch bme688 sensor with some supposed AI/machine learning magic?
I presume it'll do alright on at least some chemicals/gases at least if you train it well with good values in the BME AI-Studio?

>> No.2521163

>>2521003
Might be hard to get enough training data. If the data is simple enough to generate algorithmically, it may just be simpler to interpret it algorithmically also.

>> No.2521264

>>2520363
I don't know where you live but there have been no such thing as "compliance certs" in europe for past 30 years or so. It's self regulated to comply for standards. And anyways in most cases microcontrollers are not related to these standards or compliance unless it's medical device, automotive use or so.

I have seen many measure and automation devices with those avr chips and I'm pretty sure that many of them are programmed in arduino. It's easy, works well and every engineer is able to write it. Why hate it? Hate those plc and scada systems with actually shit and messy programming environment instead. Worst one I have seen is programmed in a cad program. Good luck trying to learn from manuals what all the blocks and weird parameters mean, how to send signal to another sheet, which sheet runs first and overall what all the 10 different servers in system do

>> No.2521279

>>2521264
i used compliance certs as general terminology for regulation. im in australia (fuckin nanny country i know) and you have to be issued a compliance document when you get RCM to prove that you are legit if you fall under certain regulatory levels. different countries do it differently as you said. as far as arduino avrs in industry goes, ill agree because you can easily pay cheap labor because its so easy.

>> No.2521459

I've recently made a STM32 based keyboard and now I'm looking to make a wireless one. I need to decide which mcu to use but I'm new to rf so I'm not too sure what all the popular options are.

I'm trying to optimize for power efficiency and latency. I'm aiming for weeks to month-long runtime before needing to charge/change batteries. Planning on using something like a cr2032 to power it. Latency should ideally be <5ms.

It seems that a receiver based design like logitech keyboards would fit my requirements. Reason being that the keyboard won't have to do any communication except for sending data when a key is pressed and the receiver can handle communicating with the computer. The other option that I see is a design where the keyboard talks directly to the computer, but I think this would be worse for battery life and latency since I would need to maintain an active connection from the keyboard.

My main candidate right now is the nrf5*/nrf52840 SoC since it can use the Gazell protocol which seems perfect for my use case. Some other options I've seen online are TI's CC SoCs and the STM32W SoCs. But those would require I use other protocols and from what I've found so far, none of the options (mainly BLE, Thread, and Zigbee) meet my requirement for low latency and power efficiency. Please correct me if I'm wrong about this.

Can anyone else with experience in this area give their thoughts? Am I right in thinking that the Nordic SoCs are the only reasonable choice here?

>> No.2521465

>>2521459
Popular would be ESP32, but only because it's cheap and available. Personally I'd want to pick a micro with native USB, that way it can run either wirelessly or plugged in. Just more flexible.
>cr2032
That's pretty low energy storage, especially considering the power draw bluetooth SoCs tend to want.

I've no clue about protocols or relevant SoCs, but you may have a small amount of luck asking on /g/'s /mkg/ threads.

>> No.2521488

>>2521459
Use NRF series MCU's, they have a built in radio and a pretty good SDK with BLE HID keyboard examples aready made.

>> No.2521490

>>2521459
>>2521488
>Latency should ideally be <5ms.
I should also add that your latency for any bluetooth device by default is 20ms unless you adjust the connection interval the BLE GATT server attribute to be lower.
You will never get below 7.5ms though.
https://devzone.nordicsemi.com/f/nordic-q-a/24013/minimum-connection-interval

>> No.2521499

>>2521465
>Popular would be ESP32, but only because it's cheap and available. Personally I'd want to pick a micro with native USB, that way it can run either wirelessly or plugged in. Just more flexible.
I did see ESP32 mentioned, but after looking around it seemed like people generally recommended other chips like the nrf52 for ultra low power usage since the ESP32 has relatively high usage. The nrf52840 actually has a USB controller on it as well so that's another reason it seems like a good choice.

>I've no clue about protocols or relevant SoCs, but you may have a small amount of luck asking on /g/'s /mkg/ threads.
>That's pretty low energy storage, especially considering the power draw bluetooth SoCs tend to want.
I've actually taken a lot of inspiration from some other mechanical keyboards that have done what I'm trying to do. They're managing months long battery life with a cr2032 and Nordic SoC. See the Mitosis keyboard for one example.
https://www.reddit.com/r/MechanicalKeyboards/comments/66588f/comment/dgg2qub/

>>2521488
Any one specifically?

>>2521490
Yea that's one reason I don't really want to use BLE.
From your link
> If you go proprietary(e.g. use ESB) you can achieve latency down to at least 0.5 ms.
It seems my only options are to use something like the Gazell/ESB protocol (apparently they're pretty similar except Gazell has some nice features like encryption and frequency hopping) from Nordic or roll my own protocol which might take a bit since I still have a lot to learn.

I will probably go with the nrf52 SoCs since it seems everyone likes them. Still need to decide what protocol to use though. If anyone has more insight into protocols that would be very helpful.

>> No.2521742

>>2517360
How about http://www.sunrise-ev.com/6502.htm

>>2517464
WDC claims 200 million 6502 processors are made every year. I don't know the figures for Z-80.

>>2520465
>6502 was a very simple CPU even for its time.
I cannot remember that. The 6809 changed things but that was later.
>The one difficult bit was that one of the buses was only half the width it needed to be (because pin shortage) and you had to implement some sort of weird latch mechanism to hold half the address and then catch the second half when it came through on the next cycle.
Sure?

>> No.2521775

In ESP32 FreeRTOS is it safe to turn off watchdog timer for one of the tasks?

I'm running 5x8 GPIO multiplexer in one task without any delays and all the other code (from few seconds to few minutes) in other task. But this feels like I'm doing something absolutely stupid for no reason.

>> No.2521777

>>2521775
>is it safe to turn off watchdog timer
sure but can't you restart the task timer in the task to indicate that it's still alive?
I don't know how freertos task timers work.

>> No.2521813

Why even use a RTOS? Use nested interrupts for timing critical tasks.

>> No.2521851

>>2521499
>If you go proprietary(e.g. use ESB) you can achieve latency down to at least 0.5 ms
The minimum is ~600us without re-transmit at NRF proprietary 2mbps radio settings.
As long as you disable ACK on esb packets you should be fine, but that means you need to make a dongle too.
>Any one specifically?
https://www.nordicsemi.com/-/media/Publications/WQ-Product-guide/Product-Guide_Nordic_PDF.pdf
Generally you'd use the cheapest one that does what you need it to do. For nRF528XX series the lower the XX the cheaper it is. But since you're probably making one it probably doesn't matter too much. Also stick to modules/qfn packages. Fuck the qfn73 packages, absolutely trash to solder even when fabbing out to turnkey board houses.

>> No.2521853

>>2521813
>Why even use a RTOS?
For computationally intensive tasks or shit that cant be done in an ISR. It also generally makes things faster and more responsive to offload most computations to worker threads instead of doing it all in the ISR.
When you need an RTOS you will know.

>> No.2521950

>>2520465
>6502 was a very simple CPU even for its time. The one difficult bit was that one of the buses was only half the width it needed to be (because pin shortage) and you had to implement some sort of weird latch mechanism to hold half the address and then catch the second half when it came through on the next cycle.
That's a multiplexed address bus, and the 6502 didn't do that. I think the 65816 might have.
The 8085 and 8088 multiplexed A0-A7 on the data bus (the 8086 multiplexed A0-A15!), and the 8080 did that for eight control signals.

>>2521775
>is it safe to turn off watchdog timer
only if you don't mind climbing up to your device and hitting the reset button when it locks up

>>2521813
>Why even use a RTOS?
For the ESP? Because WiFi is way too complicated to do otherwise. Stuff needs to be separated into independent tasks.
>Use nested interrupts for timing critical tasks.
Doing everything inside ISRs is a bad idea, and makes your code much harder to debug.
I've been bitten in the past by ISR code that looked fine, but sometimes missed doing things, like not turning a room light on or off, 1% of the time, while thinking that it had done what it hadn't done. Fortunately it was confirmed while I was still working there, and I ripped out the ISR in favor of doing everything in foreground with a minimal ISR. The code was also 500 bytes smaller out of 4K flash.
It was not my decision to use ISR code, that was my immediate predecessor, and it looked okay to me at the time.
tl;dr: implementing everything in an ISR will bite you

>> No.2522400

>>2521853
>For computationally intensive tasks or shit that cant be done in an ISR. It also generally makes things faster and more responsive to offload most computations to worker threads instead of doing it all in the ISR.
you are supposed to process the stuff in the main thread and spawning rtos task is slow as shit

>> No.2522404

>>2522400
>spawning rtos task is slow as shit
Memory is already allocated, context switching is a few lines in assembly.
You have no idea what you're talking about

>> No.2522406
File: 46 KB, 835x363, Screenshot 2022-12-15 at 19-12-23 RTOS CPU Overhead.png [View same] [iqdb] [saucenao] [google]
2522406

>>2522404
>context switching is a few lines in assembly
https://www.iar.com/knowledge/learn/programming/rtos-cpu-overhead/
dumb fag

>> No.2522408

>>2521950
>WiFi
Nobody wants to write his own WiFi stack, so it depends on whether the stack requires threads by design.
>but sometimes missed doing things
If you can't write correct interrupt code, it's even less likely that you can write correct threaded code.

>> No.2522409

>>2522406
>all RTOS' are the same
>All RTOS run on MCU's FPU hardware
Retard

>> No.2522410

>>2522406
In you're pic that time would be about 4.2us to change threads.
Even on an Arduino atsamd21 running at 48mhz with no FPU it would take 340 cycles or 7 us to change threads.
Name one thing that MUST be done in a main thread that cant be done in an RTOS thread 7us later.
If it needs that critical timing it would be in ISR anyways.
Quit being an obtuse nigger.

>> No.2522411

>>2522410
>writing lines and lines of tasked to do thing that could have been done in the main thread without rtos
truly people using Arduino on atsamd21 are fucking retarded.

>> No.2522413

>>2522410
>>2522411
Spreading code finely over ISRs and threads is the most complex and hardest thing to do. I trust Linux developers to do it correctly, but embedded monkeys? No way. A single thread (a main loop without RTOS) plus timing critical things in ISRs is much simpler. Using a RTOS and making ISRs as simple as possible may be a good middle way, but obviously not always viable.
If I'd actually have to write network code with sockets, I'd probably prefer a RTOS with threads over an async mess though.

>> No.2522415

>>2522411
Telling me you've never worked on a large embedded project without actually saying you never worked on a large embedded project.

>> No.2522507
File: 135 KB, 1517x523, FOC.jpg [View same] [iqdb] [saucenao] [google]
2522507

Does anyone have estimates on what hardware specs this kind of motor driving algorithm would take to implement? I'll also need to add an extra transform to turn two quadrature analogue-hall values into a single rotor position angle. I'm probably fine with 8-bit precision, but 8-bit micros only run so fast and have so much RAM anyhow. My plan until now was to run it on an ATmega128A because I found some for cheap, but then I realised what I'd planned was a lookup-table sine driving circuit (kinda easy to do), not field-oriented-control.

There's a project called SimpleFOC out there that I'll have to look into the source code of.

>> No.2522742

>>2522507
The software won't change so why not just write some C code to implement it and throw it on a M0+ devboard to see how it runs. You can profile execution times with systemview

>> No.2522860

>>2522742
I don't have one of those though. I think I've got a bluepill lying around somewhere with a knockoff STM32 on it, which I don't particuarly trust. Also no clue how to program it since I'm a brainlet, same goes for the ESP8266 dev-board I've got here.

Looking at the linear algebra, both transforms can be converted into a single 3x3 matrix. All with positives and negatives, so using 2's compliment. So that's 9 multiplications (2 cycles each) and 6 additions (1 cycle each) per transform, not sure to what extent I need load instructions or if I can directly act on my registers. I also need to use a sine lookup table, probably also a cosine lookup table, which I'm guessing takes a clock cycle or two to fetch a value from. So minimum 30 cycles per double transform, probably more like 33-42. The PI controller is not something I'm sure how to implement live in an MCU, though I think it's just a Z-transform-based thing that has Out(n+1) be a function only of In(n), In(n+1), and Out(n). So I'm guessing maybe 12-20 cycles each. Then another pair of additions, then the inverse matrix, then the inverter. For the inverter I'll just be feeding the values into three CMP registers of a timer's PWM. So it comes out to ~90-130 cycles, maybe more.

At 16MHz that's 5.6-8.1µs, 177-123kHz maximum calculation rate. At peak speed the motor needs to cycle at 42kHz, so I'd be getting a really choppy sine at that speed. 52MHz from an ESP8266 is somewhat better (yields to 400kHz calculation rate). The ESP32 can run on a 160MHz clock, which I can probably accept.

>> No.2523032

>>2522860
i admire your dedication to getting down in the trenches with execution times, clock cycles and such, but i think youre focusing too much on those low level things.

my tip: buy a stm32f446 devboard. that cunt runs 180 mhz and has fpu and dsp instructions built into the hardware (part of CMSIS), making certain calculations, like the ones you need, even faster. even if your code is shit you should still be able to get the output you need. once you do it, you can start working backwards, using less power cpus, low clock speeds until the output is shit.

as for programming them its trivial. people hate on it but if you just want to be able to program and use the chip, download the stm32cubeide and follow the guides. it mifht be a shitty eclipse based editor with clunky design but it works.

>> No.2523052

>>2523032
>people hate on it but if you just want to be able to program and use the chip, download the stm32cubeide
CubeIDE is cancer but STM32CubeMX is absolutely a joy to use, with makefiles

>> No.2523118

>>2523032
>as for programming them its trivial. people hate on it but if you just want to be able to program and use the chip, download the stm32cubeide and follow the guides. it mifht be a shitty eclipse based editor with clunky design but it works.
Only retarded code monkeys use these shits.

>> No.2523240

>>2523032
>buy a stm32f446 devboard
100USD? And 17USD per MCU? I'll consider it, but I'm not sure if 24000 stock levels is high enough to make it worth investing in that kind of dev-board. Would they still be in stock in 2 years' time? Also Do I need to shell-out a BlackMagicProbe or whatever too? Or is my chinky ST-link V2 going to work fine?

>fpu
Would that be more efficient than just using 16.16 mock fixed point and taking the upper register from multiplication? 16 bits of precision is more than enough anyway. The DSP would make the PI control slightly faster, but learning that shit will be a fair bit of a step-up from my 8-bit AVRs.

>>2523052
Brainlet here, how do you generate the right makefile? Or do you just write it by hand? Or just copypaste the old one and modify it slightly without understanding most of what goes in in it?

>> No.2523268

>>2523052
i agree. i use the cubemx and makefiles myself but since op said hes a brainlet, the cancer ide to get started isnt a bad idea. it also has the cubemx in it so he can change to this method whenever he wants

>>2523118
tell me youre a try hard elitest faggot without telling me youre a tryhard elitist faggot

>>2523240
>100usd
the stm32f446 nucleo board is around $30 dollarydoos in my country, should be around $20 burgerbucks, dont know where you get that number from.
>in 2 years time
idk what youre building anon or why you would need 1000s of units for a personal project, unless its not then youre shit out of luck because of the ongoing shortage. also like i suggested, just prototype with this then work backwards to something more in stock/cheaper.
>shell out "x" programmer
no. nucleo boards have an stlink v2 on them with swd pins broken out. also the stlink v2 can be "broken off" the main pcb and used standalone

>> No.2523275
File: 250 KB, 1139x442, Screenshot_2022-12-16_17-54-22.png [View same] [iqdb] [saucenao] [google]
2523275

>>2523268
>the stm32f446 nucleo board is around $30 dollarydoos in my country,

$34 in freedomland from amazon. probably cheaper elsewhere, but that's not bad for what it can do.

>> No.2523276

>>2523268
>tell me youre a try hard elitest faggot without telling me youre a tryhard elitist faggot
If not being a dumb code monkey sedated on IDEs is being a try hard elitist faggot, oh yes I'm a try hard elitist faggot.

>> No.2523282

>>2523276
How does using an IDE make someone a dumb code monkey? I can cut and paste code from stackoverflow and use it in your precious environment same as I can do advanced development work in an IDE, and in neither case does it affect the size of my penis. Your mileage may vary.

>> No.2523291

>>2523268
>dont know where you get that number from
Element14. Where else can you buy them that they're in stock? Actually it seems they're in stock on other suppliers, just that octopart doesn't show them in the first place, and none of those are local. Well RS does actually have them, I just couldn't see it because their parametric search is ASS.

>idk what youre building anon or why you would need 1000s of units for a personal project
Nah it's just whether everyone else will buy thousands. This is a somewhat long-term project, so if I want to make a design revision and it turns out all these STM32s are out of stock then I'd need to redesign my PCBs.

>just prototype with this
Well I could understand your point if I'd be downgrading to other STM32s, but this is the cheapest in-stock ARM chip that runs at at least 140MHz anyhow. Downgrading to something that isn't ARM wouldn't necessarily be straightforward, though I guess if I write the code properly it should be portable.
Since I already have an ESP32 dev-board I might as well use that for now. They're 5 times cheaper, and I'm 90% sure it's quite doable. There's even 2 cores if I want to fuck around with that, not like I need the RF capabilities.

>nucleo boards have an stlink v2 on them with swd pins broken out. also the stlink v2 can be "broken off" the main pcb and used standalone
Oh good. How is it that an ARM programmer is like 5 times cheaper than a PIC programmer anyhow?

>>2523275
>buying STM32s from scamazon
Is that actually from STMicroelectronics? Damn, guess they're just out of stock at Element14.

>> No.2523311

>>2523291
>Oh good. How is it that an ARM programmer is like 5 times cheaper than a PIC programmer anyhow?
Maybe because the PIC programmers date from ~20 years ago when every chip maker had their own?
Also ST doesn't seem to have a problem with all the cheap chink clones that use the actual ST firmware. But I will admit that for proper debugging you will probably need to make a mod to the gumstick clones to use the correct reset line. That took me like an hour including finding what to wire where.
>>2523282
I think the point was *that* IDE is crap. When some ST reps came to my work place about ten years ago to shill CubeMX, I was not impressed with their gooey toy, especially the pin selector thing storing its settings who knows where. We were using IAR there, and on my own I prefer to just use make from a bash command line.

>> No.2523478

>>2523276
you sound like that spastic cunt from before arguing about RTOS being shit. do whatever the fuck makes you want to touch yourself at night. op pointed out hes a brainlet, i gave him a brainlet friendly solution and pointed out their ide was trash to try to avoid having to argue with demented fuckwits who cant understand context and use case

>> No.2523480

>>2523291
e14 and rs have to be the most expensive distributors ive seen. i use digikey, mouser and sometimes lcsc

>> No.2523483

>>2523480
They're the only ones with local warehouses for me. LCSC has been my go-to until now, guess I'm still in-flux as to which vendor I'll get parts from for my next order.

>> No.2523593

Anybody have experience with VPUs or fpga accelerated video processing?
Idea is to make camera odometry which basically tells you how much the camera has moved from the video stream.
It could be done with some opencv functions or maybe calculate the optical flow using opencl kernels.
I think there exists some IP-cores for this already at least for xilinx stuff.
All of these tools seem to talk about neural nets and running models made with tensorflow which I'm not sure if I want.
I think Intel myriad (VPU) can run opencv pipeline but I have to check does it support all the necessary stuff.

With fpgas I would be locked to vivado for xilinx or lattice diamond with lattice?
I'm not sure if I can get the research project to pay for licenses though if they are too expensive...

>> No.2523701
File: 164 KB, 2151x686, wtf.png [View same] [iqdb] [saucenao] [google]
2523701

ESP32-CAM or any camera board.
So I'm digging into cameras recently, want to make a sketch which checks the color of pixels in certain frame region. All the standard examples work just fine and I'm able to stream video.

But for some reason I can't get the actual content of a frame buffer if I strip an example from all that HTTP server bullshit. What do I do wrong? Here is the explanation from camera datasheet (OV2640), which explains the colors in certain frame resolution. It seems my buffer stays always the same even though the framerate and buffer length changes with every frame. Im stuck for three days with this shit and am confused as fuck. SEND HELP PLS

>> No.2523738

>>2523701
If nobody knowledgeable shows up you might take a look at this code:

https://github.com/alanesq/esp32cam-demo/blob/master/esp32cam-demo.ino

the main thing he does is covert fb to an rgb array (line 1278):


// convert the captured jpg image (fb) to rgb data (store in 'rgb' array)
tTimer = millis(); // store time that image conversion process started
bool jpeg_converted = fmt2rgb888(fb->buf, fb->len, PIXFORMAT_JPEG, rgb);

>> No.2523743

>>2517360
Watch Ben Eater’s series on the 6502 on youtube. He also sells the whole kit he works with in those videos on his website (and also provides a parts list if you wanted to hunt for a better deal on the individual parts)
https://youtube.com/playlist?list=PLowKtXNTBypFbtuVMUVXNR0z1mu7dp7eH

>> No.2523766

>>2523738
>>2523743
Yay! Im gonna try everything and report afterwards. Many thanks anon.

>> No.2523788
File: 27 KB, 505x261, screen-0008.png [View same] [iqdb] [saucenao] [google]
2523788

>>2523738
Okay, I got it working. But conversion takes 550 ms, which is way too slow for my application. However it took me to another idea, I changed camera format in config to PIXFORMAT_RGB565 and it started outputting RGB data with ~5 fps, which is fine i guess? The colors jump from green to purlple lmfao...

>> No.2525182

>>2521459
Go look up ZMK, people have built coin cell powered keyboards with it. Most use the nrf52840, they also advise against the ESP32 because it's power hungry.
Though it only really support BLE, there's a "dongle" mode but it's basically a hack, uses another nrf as a BLE receiver.

>> No.2525197

How do i change a variable value (multiple) with keyboard input?

>> No.2525221

>>2525197
umm, press keys?

seriously pal, what the fuck is your question.

>> No.2525623

I finally gave in and installed home assistant on the raspberry I had lying around. Man this is fun. I bought like 10 esp8266 boards off aliexpress to farm sensor data, and a couple wifi relays.
I'm not a huge fan of home automations but I like dashboards with lots of info. Gonna put a temperature/pressure/humidity bme280 sensor in each room for starters. What are some other fun sensors to get data from?

>> No.2525644
File: 81 KB, 1279x463, Screenshot_2022-12-20_08-09-40.png [View same] [iqdb] [saucenao] [google]
2525644

>>2525623
>home assistant on the raspberry I had lying around. Man this is fun. I bought like 10 esp8266 boards

That is probably cool, but you can also have complete control of esp8266 from your browser. I save a ton of money by heating individual rooms with space heaters and optimizing the temperature in each one. pic related is my bedroom/office with daytime temp 69 and night time 63, showing how many minutes it was on. That goddamn polar vortex will be here in 3 days and the numbers are gonna go through the roof.

>> No.2525651

>>2525623
Can it generate nice graphs?

>> No.2525667
File: 270 KB, 1417x929, Screenshot_2022-12-20_08-58-41.png [View same] [iqdb] [saucenao] [google]
2525667

>>2525651
go to home assistant web page. it looks like it can do everything imaginable

https://www.home-assistant.io/

>> No.2525787
File: 124 KB, 914x429, Screenshot 2022-12-20 at 19-57-33 Advanced Software Framework v3 (ASF3) - Developer Help.png [View same] [iqdb] [saucenao] [google]
2525787

>Note: If you are starting a new design, you should use the MPLAB® Harmony software framework instead of ASF3.
I hate microchip so fucking much

>> No.2525830
File: 65 KB, 528x307, file.png [View same] [iqdb] [saucenao] [google]
2525830

I am confused. This is a temperature probe using onewire protocol.
You can either use it in normal power mode on parasite power mode where you connect resistor between 5V and the signal pin.
But in all tutorials i see both + pin AND pull resistor to the data line are connected.
So what is the purpose of the pull up resistor when then power wire is connected to 5v already?

>> No.2525835

>>2525830
Better read the datasheet instead of asking other retards.

>> No.2525847
File: 74 KB, 458x518, file.png [View same] [iqdb] [saucenao] [google]
2525847

ARE YOU FUCKING KIDDING ME!!!!
just figured out why i couldn't get it working no matter what i tried.
After wasting a bunch of time out of desperation i went back to check the aliexpress listing and noticed this!
FUCK!
What kind of fucking colorbling bugman designed this shit?
I wasted a fucking hour on this!

>> No.2525885

Guys, where can i get a GUVA-S12SD, or similar uv sensor, and the sensor alone?

>> No.2525890

is there some genuine physics/engineering reason that stops bluetooth headphones from using two chips to handle both stereo audio and a microphone at the same time or is it just manufacturers being cheap?

>> No.2525928

I have zero knowledge in electronics but desperately need a Brain Machine schematic, where can i find freelance technician and how much do they ask for a project?

>> No.2525935

I have a code for esp32, where if the temperature is between a certain interval, i will do a bunch of temps, this intervel is defined by two variables, however, i want to be able to change the value on those variables without having to upload the code, so changing them on the fly, is this feasible? How?

>> No.2525946

>>2525830
>what is the purpose of the pull up resistor when then power wire is connected to 5v already?

because it gives the designer a choice in
- size of pull-up (which determines current usage and rise time)
- whether a pull-up is even needed in a particular instance
- the voltage that it can be pulled up to

>> No.2525957
File: 20 KB, 363x471, Analog_230.jpg [View same] [iqdb] [saucenao] [google]
2525957

>>2525935
>is this feasible? How?

you could add an external pot or 2, with dials.
do an analog read to determine values.
you know, the way you set an analog thermostat: turn the knob right for more heat.

>> No.2525959

>>2525885
Have you spent a few hours browsing through parametric searches on Digi-Key?

>>2525890
Because if 2 chips can do it, you can design a single chip to do it. The real question is why does bluetooth have such shit microphone quality in the first place.

>>2525928
As I said in the other thread, read some patents if you can't buy one to reverse engineer. Once you have the information of their theory of operation then maybe you could find some yobbo on fiverr to do it. As it stands, the only person who could design one would be someone with experience fixing or designing them in the first place, who isn't going to be found on fiverr. Might find them on reddit or stackexchange or eevblog forum if you don't mind waiting a few months.

>>2525935
Do you want to write it to nonvolatile memory? While it doesn't have EEPROM, the ESP32 can write to its progmem during normal operation. Just searching "esp32 write to flash memory" gives a ton of results. There's also internal ROM if you don't need to rewrite it.

>> No.2525963

>>2525959
>Because if 2 chips can do it, you can design a single chip to do it. The real question is why does bluetooth have such shit microphone quality in the first place.
no
a single bluetooth connection can only do stereo audio or mono audio+microphone

>> No.2525964

>>2525957
its meant to later be integrated with mqtt, so it needs to be through software, altough that analog thing makes some sense.

>>2525959
>the ESP32 can write to its progmem during normal operation
interesting, altough it would be better to just make the variables change.

>> No.2525967

>>2525963
With only one RF transceiver, yeah. But there's nothing stopping you from having multiple RF transceivers in one chip.

>>2525964
>altough it would be better to just make the variables change.
What, do you mean change the value in RAM? In volatile memory so you have to redo it each time you lose power? Yeah it's called writing to a fucking variable:
>piss_temp = tempSense();
If that's not it, then describe your problem properly.

>> No.2525970

>>2525967
>With only one RF transceiver, yeah. But there's nothing stopping you from having multiple RF transceivers in one chip.
ok and is there a physics/engineering reason they aren't doing it? even top of the line bluetooth headphones don't have stereo audio and mic at the same time.

>> No.2525972

>>2525967
>In volatile memory so you have to redo it each time you lose power?
No, it should stick, regardless of power, same if i just click the reset button

>> No.2525979

>>2525970
>even top of the line bluetooth headphones don't have stereo audio and mic at the same time.
Because bluetooth audio quality for phone calls isn't a selling point, is my guess. Phone call quality in general is just kinda shit. In order for it to be made possible, it would have to be a cooperative effort between RF ASIC chip designers, phone designers, and bluetooth headphone designers. I can see it being another selling gimmick used by Apple or Samsung or Google in the next 5-10 years, and another reason for them to double-down on bluetooth over 3.5mm. Fuck that, I'll be using wired headphones forever.

>>2525972
Then you'll be saving those calibration values to flash memory. You may be able to fuck about with memory addresses to be able to treat it like a normal flash-stored value, like one would access values from a lookup table.

>> No.2525982

>>2525979
I'm meant premium headphones like sonygger xm4, not shit used to make phone calls.

>> No.2525993

>>2525982
Yeah but you'd either need to change the bluetooth protocol to allow for 2-up 1-down audio streams, or send two seperate streams, both of which would need to be supported by the phone itself. Which is why I say we won't see it until the airpods pros or equivalent show it off as a flagship feature for high quality audio during calling. Because only then will the 3rd party bluetooth device manufaturers (both transmitting and receiving) be able to adapt to it. Otherwise it's just another standard barely supported by anything else.

All the gamers use direct wireless headphones so there's not a market there. And anyone who cares about quality audio recording would never consider using the integrated microphone on headphones, let alone bluetooth.

>> No.2526039

>using bluetooth
your own fault lol

>> No.2526270

one thing that really annoys me in platformio that the compiler for arduino sdk does this really retarded thing where you can't use functions if you declared them under where you are using them
regular arduino ide does not do that and it's fucking retarded because i always put setup and loop on top and now i have to juggle this shit or make retarded header files like peasant
is there any way to change this?

>> No.2526271

When I program my pi, why do I need to enter the bootloader most of the time to upload a new program, and even then, sometimes it doesn't work? I don't really understand what I'm doing other than writing programs and following tutorials.

>> No.2526275

>>2526271
nigger what? pi boots OS from some storage media that has its own bootloader

>> No.2526296

>>2526270
Learn programming and how to use a compiler.

>> No.2526301

>>2517107
/g/ is full with femboy software developers and COOMsomers, they don't know what actual hardware is and kneel to the holy AI.

>> No.2526313
File: 88 KB, 383x275, esp32 c3.png [View same] [iqdb] [saucenao] [google]
2526313

Are there any controllers like the Esp's available on this side of the mandarin curtain?

I'm dreading the day I find out there's some chink backdoors in these but the only cheap controllers with the features i want are espressif ones

>> No.2526349

>>2526270
>where you can't use functions if you declared them under where you are using them
Pretty sure that's how C works, anon, you have to declare something before you use it, have a spoon feed.
https://www.geeksforgeeks.org/what-are-forward-declarations-in-c/

>> No.2526360

>>2526349
you don't have to do that in arduino ide

>> No.2526365

>>2526360
>you don't have to do that in arduino ide
read his post a few more times anon. arduino ide is made to be easy for non-programmers. it's C++ basically, but "ino" file extensions and no need to declare functions before calling them, and absence of a main() function all make it hard to start out in arduino and then move to "proper" C style.

>> No.2526417
File: 305 KB, 864x864, 1625748955099 1610244989107.png [View same] [iqdb] [saucenao] [google]
2526417

>>2516795
I need an RFID writer / reader that I can control with my computer via usb. Anything good I could buy that has a good frequency range for up to 120€? The only things I can find on amazon are the same rebranded usb readers on either 125Khz or 13,56Mhz (cannot even write), rebranded handheld shit that has an usb port but no Linux support (requirement), DIY arduino for a single range (RDM630 or RC522).

Is there anything that doesn't suck or require me to reinvent a fucking RFID writer/reader?

>> No.2526420

>>2526365
Not op but then why didn't C evolve to adapt that? Just seems logical that within the same program you would be able to call functions before declaring them, makes it much more straight to the point.

>> No.2526421

>>2526270
That's standard C behavior. Use function prototypes to circumvent that, no need to use headers that way.
Oh, while we're at it.
>Headers
>Peasant
The peasant is you, if you try to manage anything outside the scope of a small arduino program you're going to be royally fucked from the spaghetti you're going spill all over your codebase. For small projects headers are overkill, yes, but for large projects it's unthinkable to not use them.

t. fa/g/got

>> No.2526428

>>2525847
You don't watch enough bigclive
Always check polarity and colors of chink wires

>> No.2526431

>>2526417
While we're at it, I cannot even find the rdm630, only the much inferior rdm6300 at the rdm6300 prices, marketed as a rdm630.

I fucking hate this timeline.

>>2526420
>but then why didn't C evolve to adapt that?
I guess there'd be something wrong with backwards compatibility (I'm not sure). But what's more is that the computer science field is filled to the brim with retarded bootlicking eggheads, dickless gatekeeping limpwristed yesman "it's ma'am now" faggots that do only as told without ever questioning anything at all. It's also the entire reason why we have the fiasco with the unix/linux filesystem clusterfuck that we have today.

>> No.2526436

>>2526431
>fiasco with the unix/linux filesystem clusterfuck that we have today.
care to explain?

>> No.2526450
File: 273 KB, 824x1069, 1668975954460728 Understading bin usr (copy).jpg [View same] [iqdb] [saucenao] [google]
2526450

>>2526436
Pic related.

>> No.2526453

>>2526450
That's the reason I will never use Linux.

>> No.2526458

>>2526450
That's so true, /opt in particular is midly infuriating.

Is that a book? Which one?

>> No.2526464

>>2526453
You think Windows is any better? Have you ever SEEN the filesystem? Everyone just does whatever they want wherever. Microsoft had to skip a Version Number (9) because some dripbrained retards used it over the NT Kernel number (back then it was 4.something) to check for the environment.
And if you talk about macOS, good Job, dripbrain, macOS is BSD based which is Unix. Gone full circle.

Humanity should be barred from Computer Science when we enter the galactic community.

>>2526458
I found the pic in November on I think it was >>>/g/fglt/
Here is the oldest post of it that I can find:
http://lists.busybox.net/pipermail/busybox/2010-December/074114.html
But I have no Idea on the page number in the lower right corner.

>> No.2526470
File: 55 KB, 548x261, Screenshot_2022-12-21_13-22-52.png [View same] [iqdb] [saucenao] [google]
2526470

>>2526464
did you coin the term "dripbrain". other than a suggestion of stupidity, does it mean my brain is dripping, something is dripping into my brain, or that my brain is a drip.

>> No.2526472

>>2526420
>t.never wrote a compiler for a class project in uni
just stick with your arduweenie training wheels, k?

>> No.2526475

>>2517515
The Atmega162 is compatible with the 8051

>> No.2526480

>>2526470
It was emphasizing your brain dripping with stupidity. I took a class of creative writing in 5th grade. I don't need to mention that I wasn't the best student there, otherwise I wouldn't be spending my time on an underwater ceramic technician site trying to figure out where to get a robust RFID reader / writer.

I wasn't trying to offend you, Anon, it was just banter.

>> No.2526491

>>2526464
>Have you ever SEEN the filesystem?
For me, my brain broke when I discovered the hidden directory C:\ProgramData\". I think I found that after some malware installed itself. (not rootkit shit, just chink apps installing each other)
It's even more fun when you add things like "cd /cygdrive/c"
>Microsoft had to skip a Version Number (9) because
It was idiots checking for Windows 95 and 98 by asking "does the OS name start with Windows 9?" I heard it was even in an official Java system library.

>> No.2526503

>>2526472
nobody does stupid shit like that anymore

>> No.2526542

>>2526420
C is essentially dead. Those who control C don't want it to develop further. Priority is on compiling legacy code bases. C++ is an entirely different beast. Why does it still require forward declarations? I don't know, and I doubt anyone can explain it. Except maybe the highest C++ compiler developer wizards, who might come up with arcane and bizarre reasons why it's not possible. C++ doesn't require forward declarations within classes, but last I checked it still requires them on the global level, which makes it even stranger.

>>2526450
The real problem is the systemd devs wanting to "sovle" this, but then deciding to use /usr/bin instead of /bin because they're brain damaged.

>> No.2526544

>>2526503
>nobody does stupid shit like that anymore

right, only lowly AIs write compilers nowadays.

and the crumbs whining about C have only to ask an AI to design D for them to their specs.

>> No.2526553

>>2526542
The obvious solution is for Poettering to add a C compiler to systemd.

>> No.2526565

>>2526542
i can't tell you how much time i've lost because /bin was being called by a program instead of /usr/bin, makes you think that some people just want things to be particular to justify their jobs or something.

>> No.2526569

>>2526565
That never happened to me. Anyway, /usr/bin should be a symlink to /bin, instead the other way around like systemd is doing.

>> No.2526690

>>2526431
>>2526436
>>2526450
>>2526453
>>2526458
>>2526464
>>2526491
>>2526542
>>2526544
>>2526553
>>2526565
>>2526569

take your os flame wars back to /g/ where you all belong

>> No.2526702

>>2526690
Answer my question and I'll fuck off >>2526417 >>2526431

>> No.2526731

>>2517174
A raspberry pi is not a microcontroller, no matter how much people want to use them as such.

>> No.2526743

>>2526702
just implement it yourself its not difficult. your question was consoomer related anyway. now piss of with your /g/tard shit

>> No.2526744

>>2526491
>It was idiots checking for Windows 95 and 98 by asking "does the OS name start with Windows 9?" I heard it was even in an official Java system library.
Couldn't they have just called it windows nine instead of windows 9?

>> No.2526754

>>2526702
use freertos

>> No.2526835

>>2526754
>>2526702
Unless you're using freertos with Arduino you'd be better off using zephyr.
Better boilerplate drivers for sensors and things then basic freertos

>> No.2526902

>>2521459
>>2521499
>>2521851
So I started to design a pcb for the nrf52840 and I've run into a couple problems. It turns out the qfn48 package can only accept 3.6v max which means I would need to include one of my own. Not a problem for the powered dongle since I can just slap a ldo regulator on. It's a hassle for the keyboard though since I would need to research high efficiency power supply designs. Maybe not the worst thing since it would probably be good to learn about it anyway. The qfn48 package also doesn't include usb functionality so I would need to figure out how to add my own. Or I could just get the wlcsp or aqfn package and a hot air station and skip all of that. Not sure if I'll be able to get the same power efficiency as the integrated stuff on the chip if I use my own circuits though. I think I'll look into designing my own stuff and if it's too hard I can always switch packages.

>> No.2526908

>>2526902
>So I started to design a pcb for the nrf52840 and I've run into a couple problems. It turns out the qfn48 package can only accept 3.6v max
Just run it off the battery with a battery charger+ pmic in-between at anywhere from 1.8 to 3v. LT makes a bunch of good ones. Nordic also makes a nPM1100 pmic to power mobile shit.
Also what do you need USB data for anyways on the keyboard side.
Might as well use a nrf52840 module then so you get all the IO's.

>> No.2526920

>>2526908
Whoops I completely forgot about a pmic. I was actually looking at the nPM1100 earlier. Good catch. I guess that's the power sorted.

>Also what do you need USB data for anyways on the keyboard side.
I want it to also be usable while plugged in case there's nowhere to plug in the dongle or some other reason.

>> No.2527010

How about books? What are the recommended go to's?

C programming by dennis ritchie?

>> No.2527047

>>2516795
Recommend me a good LTE/4g module to use with a stm32.
I want to be able to open a TCP connection and send a tiny amount of data. Few KB at most.

>> No.2527079

>>2526731
I don’t get why people keep referring single board computers as microcontroller. They are fucking different …

It’s like calling pagers as handphones

>> No.2527091

so i have mcu that runs on 3 volts and i scoped my power source and when i turn it on there is a 3.8V spike for 10ns is that a problem? will that damage the micro?

>> No.2527097

>>2527091
Is it strictly 3v or can it allow some leeway? Some mcu able to tolerate few spikes. Also, what mcu?

>> No.2527105

>>2527091
Doesn't the datasheet specify it?

>> No.2527135

>>2527091
Just throw a filter cap on there and you'll be fine. I doubt a .8v spike will harm it much anyway.

>> No.2527248

>>2527047
Bump
Nobody has first hand experience with these?

>> No.2527263

>>2527091
It can. What's the absolute maximum section of the datasheet say.
Other anons have it correct, a filter cap will provide a capacitive load to eat the transient.

>> No.2527330

How do i know the error code of mqtt when trying to publish? I can't send anything to esp32, it just gives me "connection refused", i already removed the password file in .conf.

>> No.2527347

How do I not short circuit an arduino? I want to build some stuff, but due to a lack of experience with circuits, I am afraid I might fry a pin. There doesn't seem to be much official support in that regard.

>> No.2527354

>>2527347
by default all the GPIO and ADC pins are input so you can't hurt them by applying 0 to Vcc. Once you tell a pin to be an output you can then set it to be 0 or Vcc, and at that point you can damage it if you then apply voltage or ground to it, so don't apply voltages to GPIO set as output. If you don't understand this concept maybe forget about electronics.

>> No.2527399

>>2527347
The answer is a resistor to limit the current.
Ignore the other asshole, we all learn somewhere.

>> No.2527413

>>2527347
As long as you don't connect any other power supplies to it (no voltages higher than Vcc), my guess is that it should be pretty idiot proof? Even a short circuit, like connecting a GPIO output to GND, probably won't fry it, but it depends on the chip.

>> No.2527436

>>2527047
>>2527248
i work with these for my job. ublox and quectel have good hardware. get any CAT M1 module and you should be fine. quectel is by far the best brand for these systems and have the best support resources. also seen the simcom brand around and in stock a bit but i havent personally used them. they come in a more solder friendly package so that might be something worth looking into

>> No.2527460
File: 20 KB, 234x752, pcb.png [View same] [iqdb] [saucenao] [google]
2527460

>>2526902
So I've decided to just use the aQFN package except I'm not sure if it's possible to route this given jlcpcb's capabilities. Does anyone know if it would be possible to have traces or vias like in my picture using jlc's capabilities for a 2 layer board? What about using 4 layer board capabilities? I know I could use a different manufacturer like pcbway but every other place else seems more expensive than jlcpcb. I've also already emailed jlcpcb support and I'm waiting for a response.

Datasheet for nrf52840: https://infocenter.nordicsemi.com/pdf/nRF52840_PS_v1.1.pdf

>> No.2527509 [DELETED] 

>>2527460
Can you explain exactly what it is you have a question about? All I see is some routed pins and some fried eggs.
I'd never heard of aQFN before, looks about as ass to use as BGA. Hidden pins will always be a problem when you don't have X-ray inspection gear.

>> No.2527511

>>2527460
Can you explain exactly what it is you have a question about? All I see is some routed pins and some fried eggs.
I'd never heard of aQFN before, looks about as ass to use as BGA. Hidden pins will always be a problem when you don't have X-ray inspection gear.

I think you really have a /ohm/ question, I don't see what about this is specific to microcontrollers.

>> No.2527562

>>2527511
I'm trying to figure out if jlcpcb can manufacture a pcb with 0.09mm traces routed between 0.5mm pitch bga pads. I'm reading conflicting sources on whether or not it's possible. Ignore the egg vias. I don't think I will use vias in pads.

>> No.2527571
File: 518 KB, 1767x875, file.png [View same] [iqdb] [saucenao] [google]
2527571

>>2527460
You use a board house with better tolerances and pay more for it.

Then you follow the chip vendors guidelines for vias, and find a board house that can make it.
You can check the gerbers for the devboards on the nordic site for the hole sizes and solder stencil they used.
From memory they used 4mil via holes for the in pad via which are laser ablated.

From the houses i've used at work, the smallest mechanical drill is 5mil with a 5mil annular ring required. Anytthing smaller is laser ablated via which costs more.

From doing an nrf5340 (0.4mm pitch, yours is 0.5 so should be ok) you will basically end up with a 0.1mm spacing between pads when you use a 0.15 hole with a 0.15 via (not quite 5mil but my board house said it was fine).
You also want to be doing 1/2oz copper for everything to get the proper spacing without getting into over etching issues.
Then you also need make sure to divide the epad properly otherwise you will have too much solder and it will float and not connect.

All of this is expensive as fuck and not something jlc or the normal Chinese vendors can do on the cheap. (technically they "can" but not on their normal cheapo page, you have to put in a quote for the extra capabilities).

Which is why I suggest use a fucking $10 module and save yourself a few thousand in panel costs.

>> No.2527573

>>2527562
>I don't think I will use vias in pads.
Except the NRF datasheet and all support tickets on their forum literally tell you to use in pad vias.
3.5mil is pushing the edge of trace/space and only works well on 1/2oz copper. JLC doesn't offer top layer 1/2oz copper so you're already fucked.
But it's your call though, the chinese will build whatever you send them and wont do ET on it so when you get a batch of boards that don't work don't come here and whine about it.

>> No.2527699

>>2517518
RISC-V. I don't think it's very accessible to someone who just wants to learn how computers work, though.

>> No.2527701

>>2517176
>Daily programming thread
>friendly GNU Linux thread
>SQT
>web development general
>stable diffusion general

There's tons of regular threads there for programming and creating stuff.

>> No.2527704

What's the hard part of making a mobile phone?
Is it the hardware design itself? The software/integration? The manufacturing process? Marketing? Timing?

For instance, putting aside the obvious supply chain issues that exist right now - wouldn't it be possible to combine a Pi Zero (ideally v2) with an LTE chip and a battery/microphone/speaker and get a pretty decent, small, and functional phone?

>> No.2527706

>>2527699
RISC-V has a very simple architecture. ARM looks like a mess next to it. If I were a teacher and had to teach ASM, I'd definitely pick RISC-V.

>> No.2527718

>>2527706
Well, I mean accessibility in terms of getting a board, what learning resources you have available, etc. Although it looks like things have improved since I last checked.

>> No.2527723 [DELETED] 
File: 378 KB, 1163x613, Screenshot_2022-12-23_07-49-20.png [View same] [iqdb] [saucenao] [google]
2527723

>>2527718
I haven't followed this whole discussion, but if someone wants to dive into assembly programming, any AVR plus a text editor, tavrasm to assemble the code, avrdude to load it. Lots of online discussion and example code.

This would require something like a USBASP and any avr board like an arduino or whatever, so the overall starting cost would be $20 or so.

I've done AVR assembly since before arduino was a thing, so it seems natural to me, but even so I think it's a very accessible and easily understood language.

>> No.2527727

>>2527723
We were talking about RISC-V, not AVR.

>> No.2527728

>>2527727
gotcha

>> No.2527770

So, uh, to send a message to the esp32 with mqtt, is it just making the publish to the same topic that the esp is subscribed to? No aditional config on the sender side?

>> No.2527862

>>2527704
pretty decent, small - NO
functional - if all you need is call+sms and web browser then yes.

Making everything from "raspberry modules" is not feasible as it'll be expensive and huge.
Without at least couple thousand orders none of the specific chip manufacturer will work with you.

Software and PCB are doable, but will end up expensive as there is no chance one or two developers will get everything working in a reasonable amount of time.

Design for manufacturing is not easy and has a lot of pitfalls

>> No.2527889

>>2517107
/g/ is 99% bait and 1% consumerism

>> No.2527969

if only we had code tags here

>> No.2527997

>>2527969
Wouldn't be as bad if people learned to use pastebin or others.

>> No.2528142

>>2527862
>Making everything from "raspberry modules" is not feasible as it'll be expensive and huge.
>Without at least couple thousand orders none of the specific chip manufacturer will work with you.
But an rpi zero is tiny and thin, and an LTE chip can be bought on a breakout board that is not much bigger than the chip itself. You don't need to deal with the chip manufacturer. You can buy LTE chips off the shelf anyway.

>Software and PCB are doable, but will end up expensive as there is no chance one or two developers will get everything working in a reasonable amount of time.
Well of course a lot depends on whether you're building a barebones system or a complete platform that competes with the app store etc. Starting with an rpi lets you stand on the shoulders of giants since there's already an OS, tons of software packages, support, etc.

>Design for manufacturing is not easy and has a lot of pitfalls
Yes, this part of my question; maybe it's easy to build a prototype but scaling up manufacturing is tough? What do you reckon are the big pitfalls?

>> No.2528217

anyone know of a good torrent of phreaking linesman training material and books? mainly looking for a pdf or epub of stuff like

The Guidebook for Linemen and Cablemen

>> No.2528291
File: 30 KB, 300x300, 1000000526.jpg [View same] [iqdb] [saucenao] [google]
2528291

I got 10 wemos D1's and 1800 mah lipo batteries laying around. Anyone have suggestions for projects to use them in?

>> No.2528600

guys what the heck is an "elf" file and how do i upload it to an arduino?

>> No.2528626

>>2528600
It's the final output of the linker, with a bunch of relocation info and debug symbols. It's more like an executable on Linux. You have to use objcopy to make a ROM image out of it, which should be done by the makefile or build script.

tl,dr: you don't

>> No.2528639

>>2523291
wait looks like the rp2040 would probably work pretty well for me
less hacky than an esp32

>> No.2528814

Let me see if i understand this correctly, i can upload code to arduino board (atmega) by using only rx and tx pins but only if it has bootloader flashed otherwise i HAVE TO use isp correct?

how is it with esp32? i noticed i am also able to upload code using only rx and tx pins, but if i have blank wroom module does it still work only with rx and tx or do i need jtag?

>> No.2528816

>>2528814
>esp32
i am talking about esp32 bare module without a dev board and without the that usb interfacing chip, only by using esp-prog connected to rx and tx serial pins

because i have a project that uses a lot of pins and i can't space the pins i normally use for jtag

>> No.2528827

>>2528816
if i remember correctly the esp32 is programmed over uart using a bootloader button. the button pulls the pin telling the esp32 to enter a special mode whereby it will accept and store data into the progmem that comes across the data lines. no bootloader program actually required. i could be wrong though as the last esp32 i used was the esp32 thing (the version after the 8266)

>> No.2528881 [DELETED] 

>>2528600
its this project
https://github.com/Jacajack/usynth

what do you think would be the easiest way to load the code to an arduino? im using win 7

>> No.2528884

Okay how do I use esp32 RTOS? It has 2 cores. Let's say I want one core ti calculate "1+1" and another core to calculate "2+2" at the same time using RTOS. How?

>> No.2528885

>>2528626
its this project
https://github.com/Jacajack/usynth

what do you think would be the easiest way to load the code to an arduino? im using win 7. i also have a stlink, they are different to the usbasp, right

>> No.2528910

What's the pros and cons of the stm32? Why should i use it instead of esp32 or arduino?

>> No.2528949

>>2528910
There's none. Neckbeards might tell you it's faster and more stable because it has less code simplification. But you might write straight assembler commands then if you want clear code. Or you spend $0.2 more and write easy code which does the same even faster.

>> No.2528954

>>2528910
Familiar ARM architecture? Also, don't Arduino boards run on 5V?

>> No.2528965

>>2528884
bump this

>> No.2528977
File: 17 KB, 413x633, usb.png [View same] [iqdb] [saucenao] [google]
2528977

I want to add usb c connector to my pcb so i can power it with usb cable and also run some data shit through it
do i understand it correctly that there are two copies of everything (like two D+ pins) in order to also make it work when the cable is plugged in upside down?
Which means if i have for example Singal1 and signal2 i will connect signal1 to both D- pins and signal+ to both D+ pins?

>> No.2528984

>>2528977
Yes you can short the same data pins together. Don't short the CC1 and CC2 pins. Those are used for usb c cable orientation/configuration. Add separate 5.1k pulldown resistors to CC1 and CC2 pin. This tells the host your device is a standard upstream facing port. Don't connect SBU if you only plan to use power and d+/-

>> No.2529051

give it to me straight /mcg/
these HAL things that all of these microcontroller companies tout, they're really just another form of vendor lock-in because of their complete incompatibility with one another on top of the time required to learn each one aren't they

>> No.2529086

>>2529051
>HAL
complete bullshit to begin with, its just another word for "really needlessly complicated system peripherial library". it's a jewish way of selling the microcontroller to you without providing any documentation
>vendor cock-in
yeah, you install a magical wizard SDK that does everything for you, you dont understand anything about the hardware, the build process or debugging, it all wraps that up in a nice little retard-proof (web-dev friendly) SDK. all you write is your application code that calls out to a fat blob of system libraries

tl;dr dont fall for it, get something that has actual documentation and write your own chip-specific hardware drivers. porting is easy enough

>> No.2529090

>>2529086
>get something that has actual documentation
Like what

>> No.2529098

>>2529086
I just wanna do register-level-programming on my STM32
why can't they just give me a header file with all the registers #defined like the msp430/TI does

>> No.2529109

>>2529090
>like what
GD32VF103
most STM32s and similar GD32 clones
most AVRs
anything that tells you which registers are present and what they do = has actual documentation

>>2529098
>why can't they just give me a header file with all the registers #defined like the msp430/TI does
because there's hundreds of registers with potentially variable locations. the "#define T1MSC blahblahblah" strategy works with AVRs and msp430s because they're simple and have tiny address spaces
go through the datasheet for your device, pull out the register space for the peripheral you want, write a volatile struct{} * typedef that encompasses them, set its base address and access away

>> No.2529125

>>2529109
What about allwinner v3s? I really like specs.

>> No.2529176

>>2529051
>they're really just another form of vendor lock-in
No because you write your abstractions to encapsulate the vendor HAL.
The purpose of vendor HAL is to provide a ready to use library that "works" to control basic functions of the MCU.
Engineers get tired of reading the same datasheet hundreds of times for every different MCU just to toggle a GPIO or configure an ADC.

>> No.2529181

>>2529051
>>2529176
I dabble with embedded stuff, but this "HAL" stuff is alien to me. What is it about? Port layers of RTOSes? The vendor provided driver code (which is usually garbage quality)? There's no actual standard. As always, you can pick between library code, that might not be ideal but low effort to use, and doing it yourself, which enables you to utilize the hardware ideally, but which requires effort.

>> No.2529192
File: 73 KB, 790x906, file.png [View same] [iqdb] [saucenao] [google]
2529192

>>2529181
>I dabble with embedded stuff, but this "HAL" stuff is alien to me.
HAL is hardware abstraction layer.
Basically think of an RTOS as maximum portability and abstraction, there are functions like spi_read() or gpio_write() that take generic arguments instead of platform specific ones.
If I wrote an application that uses Zephyr RTOS, I can then take that code and guarantee it will run on any platform that zephyr is supported.
>Port layers of RTOSes?
Pretty much yes, the HAL is used in the implementation of "Device Driver Implementations" in pic related. Of course you can also use direct register level operations (that's what the HAL is doing anyways) to be cleaner.
And actually there are several zephyr peripheral drivers that do just that since the HAL is such dogshit.

>> No.2529196

>>2529192
I'm well aware of the concepts. But I've never heard of them being referred as HALs. What I know is shit like ASF from Microchip. Calling them drivers is more appropriate IMO. I prefer calling it sample code because of the low quality, though.

>> No.2529254

>>2526270
Just have to put the lower level functions at the top of the code file

>> No.2529504

>>2528884
>>2528965
the second core is dedicated to the RF. yes you can reprogram it. but, you may lose the functionality of the radio. if you want to keep that functionality youll need to build the api from the ground and as well aa accomodate your other features on the 2nd core. doing this may also impact RF performance/latency

>> No.2529507

>>2529196
HAL is common terminology in industry. it covers all the different brand's buzzwords for the bridge between the hardware and the firmware. these other monkeys claiming the HAL is shit is because theyve obviously never used different controllers before for the same or various projects that utilise a custom library running the HAL functions. HALs (like RTOS) functions are named the same but will work on any given family of mcu. stm32f4 hal for example will work for all stm32f4xx variants. no aids porting. no aids adjustments of the memory and registers. these retarded elitist faggots must take forvever to get anything done. think of them like /g/tard linux users

>> No.2529517

>>2529507
>no aids porting
What you described is a library that works for very specific MCU families with minor differences between parts. It's not true portability. Every vendor has a different API. Even the same vendor often uses different APIs for different MCU families. I come from desktop software, and I'm astounded at the low quality of the code. It's telling that the code that ends up in the Linux kernel is often not the code the vendors recycle over and over.

>> No.2529738
File: 46 KB, 961x272, 2022-12-26-163024_961x272_scrot.png [View same] [iqdb] [saucenao] [google]
2529738

why on earth would ARM need a register flag for if a buffer is empty, and also a flag for if that same register is full

>> No.2529739

>>2528885
pls respond :(

>> No.2529742

>>2529738
>tx buffer full
Required to know that you can't write more data.
>tx buffer empty
Useful to reduce CPU usage, especially if the flag triggers an interrupt. Then you can fill the buffer in one go, instead of having an IRQ for every single byte.

>> No.2529762

>>2529517
as an electrical engineer stumbling his way to programming competency, what do you mean by "low quality code"? What, qualitatively, makes code low quality? How can I begin to identify it, and how can I learn to write higher quality code myself?

>> No.2529929

>>2528885
It has the makefile and everything you need included. Just follow an AVR-gcc tutorial to compile it to a .hex or .bin or whatever, then follow an AVRdude tutorial to flash that to your arduino via a USBasp. If you don't have a USBasp, you should be able to "use arduino as isp" if you program an arduino with the ArduinoISP code on the arduino platform (10µF capacitor from reset to ground may be required).

>> No.2529938

>>2516795
why are /mcg/ microcontroller generals deleted rather than being archived?

I understand that microcontrollers are written in c or c++?

>> No.2529963

>>2529517
obviously different vendors have different hal. but taking the stm32 hal as an example, the same functions are used across the families of chips. so you can easily port code to the different mcus available. even then porting code between brands is eaiser when porting hal because it abstracts the registers and shit. making development faster

>> No.2529967

>>2529762
>low quality code
is a mostly subjective statement. usually it refers to readability of the code itself as the resulting compilation of cpu instructions will be the same due to optimisation. there is something to be said for turning optimisation off when working in firmware so the cpu is doing exactly what you tell it to do. this is a double edged sort though.

>> No.2529993

>>2529938
>why are /mcg/ microcontroller generals deleted rather than being archived?
idk, ask the archivers i guess
>I understand that microcontrollers are written in c or c++?
Usually, C/C++ should have the widest support for microcontrollers via GCC and proprietary compilers. Though the old PICs were at least sometimes programmed using BASIC, there are popular projects to write them in python, and I think I heard about Rust being used for it once. Ultimately what matters is that it compiles well down into the assembly language of the MCU in question. Some people here program directly in assembly language, which has some advantages and some disadvantages. Either way I think it's important to have some understanding of the instruction set and register list of the microcontroller you're programming, as that gives you a good idea of how to write efficient code.

>> No.2530097

>>2529762
Code quality is really hard to define. If it was easy, software wouldn't be as shit in general. But when I see stupid beginner mistakes in production code (that just somehow happens to work), I know it's bad.

>> No.2530356

>>2529929
baseeed thanks

>> No.2530558

>Textbook called "Mastering STM32"
finally, I will learn to do register-level programming with the STM32
>"This book is entirely based on the STM32CubeHAL and we will learn a lot regarding this quite complex library."
AAAAAAAAAAAAAAAA
I am literally going to shit STM's pants

I've done register-level programming before on other microcontrollers and I loved it. But the STM32 is just enough out of my comfort zone that I can't figure out how to get it set up and working by myself by just manipulating the registers, or how to really get into the flow of writing programs for the STM32. The educational material is either geared towards fucking braindead IoT codemonkeys who need to shit out a new smart q-tip or something (hence they refuse to touch anything below the HAL), or the material is arcane incantations for the most experienced and sage of embedded engineers
there's no fucking in-between AAAAAAAAAAAAAAAA

>> No.2530586

>>2530558
Step 1: read datasheet.
Step 2: read the HAL code written by code monkeys to fill in the blanks.
I've never done STM32, only other ARMs. What are you trying to do?

>> No.2530597

STM32 isn't just "set a data direction register and start playing with GPIO". In order to be more power efficient, first you have to turn on the clock for each unit that you want to use, like a specific GPIO port, specific timer, etc. Even before that, you have to set up the clocks properly. Then you might have to do alternate function mapping on a pin.
Both which clock you enable and how you do AF mapping changes in different product lines of STM32. The HAL, and its predecessor the "StdPeriph Driver" are set up to set up and enable those properly depending on which product line you are using. Without that you will have to grovel through the appropriate data sheet to find that info.

>> No.2531133

What’s the RP2040 like to develop for? What kind of programming header and programming hardware would I need?

>> No.2531187

>>2531133
You can do it with USB. There's a ROM bootloader that acts like a USB storage device. You can copy an image to it, and the bootloader will flash it. The Pico board has a button that enables this bootloader. You can also use JTAG, which is more convenient after the initial setup. I used the recommended setup with two Pico boards, one which acts as JTAG controller (using openocd and gdb on the PC), and it works well.

>> No.2531314

>>2530597
>>2530586
I'm aware that it's not just going pinmode(blah blah). I don't want to do that. I took a course over the summer for embedded programming that was effectively a course on boostrapping and writing your own driver suite for an msp430fr6989 dev board. We did everything practically from scratch - finding the appropriate registers in the user guide, setting the appropriate bits, setting the clock source, setting the clock source divider, enabling a few bits in some peripheral registers, writing functions to bit bang some stuff, the works. No holds barred. We had to write our own translation functions mapping pointers to LED segments. We implemented our own SPI, I2C, and UART drivers, and had it communicate with external peripherals connected to GPIO. That kind of stuff.

It was all as simple as just #including the header file for the board and then referencing the manual. No crazy prompts to select 15 different dividers and 15 clock sources, no obfuscating simple register manipulation behind some convoluted GUI.

Now, I'm well aware that comparing an stm32 to an msp430 is comparing a fighter jet to a tricycle. But the fundamentals can't be that much different.

All I really want is some guide or tutorial to get me started doing more or less the same - the setup of an stm32 into a sane, minimal working state via plain register manipulation without resorting to the HAL, and the setting up and usage of its various peripherals, without being chained to the HAL

>> No.2531315

>>2531314
>LED segments
LCD segments

>> No.2531414

>>2531187
Shouldn't a chinky STlink V2 mini work fine? Some research suggests getting the dual-core code flashed properly is a bit strange but it didn't look too difficult.

>> No.2531498

>>2531314
I'm serious though, MSP430 is also more like AVR in terms of being simple to set up, and I've done both MSP430 and STM32.
Just making my own board support for STM32 gets really involved. I have some code I did on an STM32L years ago where I was still using some of the low-level StdLib, and tried to back-port it to blue pill (STM32F103) a few months ago, so I know what I'm talking about. There's enough difference in how different product lines work that I'd rather keep out of main() just for setting up GPIO.
And I'm no arduweenie, I've been using STM32 since 2010 when I did a very big project and a few smaller projects. (also I learned to hate STM8 there for what that's worth) And this past year I've been trying to get my own gcc/make build environment set up with C++ working.

>> No.2531584
File: 1.02 MB, 1200x675, 1552158984797.gif [View same] [iqdb] [saucenao] [google]
2531584

>using devboard with external oscillator
>set the oscillator as source for timer
>calculate the dac scaler and conversion time
>the output sine wave is ~800hz off

>> No.2531621

I want a board to use camera natively, low level, without linux like on RPi (don't know how to explain it properly). I have esp32-cam, it's totally fine, except in my application it gives me around 8 fps with 96x96 resolution. I don't care about resolution, but fps is critical for me.

What relatively cheap solutions are out there, which are faster than esp32-cam and which I can program like esp32.

>> No.2531625

>>2531621
are you using esp32 with arduino sdk?
I think esp32 is somewhat powerful chip, at least it has high CPU clock, though it has uses some weird ISA.
Did you configure it right and how are you processing and transmitting the image data?
You might have better luck with some devboard with ARM m7, some npx or stm32... or not.
There are some video processing units (VPU) but you might be better of with raspberry pi?

>> No.2531636

>>2531625
>are you using esp32 with arduino sdk?
Yes, but I tried esp-idf and it works exactly the same.

> I think esp32 is somewhat powerful chip
Yeah, until you drive a camera and use pixel recognition for each frame.

> Did you configure it right and how are you processing and transmitting the image data?
Oh yeah, I tried every single setting for couple last weeks. Standard config gives around 500ms per frame, I managed to strip everything down to around 120ms per frame. I'm doing everything pretty raw.

> You might have better luck with some devboard with ARM m7, some npx or stm32... or not.
Like what? I checked stm32 and didn't find a single free project with libraries for a camera. I assume I have to write my own drivers, but I won't do that.

> There are some video processing units (VPU) but you might be better of with raspberry pi?
I don't want a single board computer, I need a single microcontroller computer or whatever is the correct name. The size and price matters. If I could take an MCU from a powerful RPi and program it like arduino I would do that. But I've searched for this and everybody just installs Linux and writes a Python script lmfao.

>> No.2531652

>>2531636
Are you designing your own board?

I don't know about the performance or price (of just the chips) but there is VPU that is driven with esp32
https://shop.luxonis.com/products/oak-d-iot-40
I have no experience with these but stm32f7 series has camera board so I assume there is some driver support for camera.
st is annoying in that some their drivers are shipped as .exe files that just extract example project.
https://www.st.com/en/partner-products-and-services/stm32f7-camera-development-kit.html

>> No.2531668

>>2531652
That's a huge ass $200 board comparing to $7 esp32-cam. There has to be some solutions in between.

> Are you designing your own board?
Not really, I will eventually design a small pcb with esp32 chip on it, if I dont find an alternative. I need a smol embedded solution.

>stm32f7
It would be a perfect middle ground, it costs around $20 and should be plenty fast. I'll try this as soon as I find drivers for cameras, cause I wont write my own.

>> No.2531673

>>2531414
I didn't try it, but a pico board cost me $4, reserving one as a programmer was fine.

>>2531314
Hardware devs (on the gate level, like Verilog/VHDL) can overcomplicate shit and add bugs and weird shit just as much as software devs. You can be lucky if the registers and maybe a bit more is documented in the data sheet.

>> No.2531703

>>2531584
Times like this I would use manufacturer example software as a base line and inspect registers after init.
Compare the state with what you set them to and also to the datasheet.

>> No.2531711
File: 20 KB, 532x397, file.png [View same] [iqdb] [saucenao] [google]
2531711

Someone who has used the LM35 sensor,why most people convert the voltage to celcius using an ADC like

Tc = ((analogRead * Vref)/bitResolution)/0.01

where: -Tc is the temperature in celcius; and the 0.01 its because it goes like 10mv/ºC.
But the datasheet says that its from 2ºC to 150ºC, the way that Tc is written assumes that 0v => 0ºC right?
Wouldn't be more correct add a +2 as it implies that 0V => 2ºC(or less i guess) instead of 20mv => 2ºC? or did i get it wrong?

>> No.2531713

>>2531703
>manufacturer example software
I did look at the atmel asf3 but the examples are lacking, the sdk quality is questionable and sometimes it contradicts the datasheets.

>> No.2531751

>>2531498
Well, what I'm *actually* actually trying to do, is set up a full DSP platform/polyphonic direct digital musical synthesizer with a full effects chain.
The STM32 line is very attractive to me because of their high speed, and when I learn about RTOSes, the high-end lines with multiple cores. With that being the case, with how time-sensitive yet processor-heavy DSP is, especially if I want this thing to be polyphonic, I need to optimize the shit out of everything. That's another reason against the HAL for me: I just don't think the HAL will cut it. Not to mention, it just feels wrong trying to use the HAL when I don't know what it's actually doing under the hood. That's the real crux of the issue. I would feel much better using the HAL, if I actually knew what it was doing for me in the background.

"Just learn the HAL!" the guides say, but then I have to do something that the HAL doesn't support (well) and then I have to learn STM32 register level programming anyway

I'm not afraid of the difference in setup between AVR/MSP430s and STM32, it's just I can't find good information on learning the actual process of setting it up. I'm willing to put in the time and effort, I just need something that shows me the process and I can do the rest from there

>> No.2531765

>>2531751
I might be wrong but you could make a project with stmcubemx and generate makefile project?
The generated project will have the linker script and such setup.
You could also look how arduino sdk, zephyr or libopencm3 setups the buildtools for stm32 targets.

>> No.2531814

1. Why Teensy 4.0/4.1 boards are so rare and cost shit ton of money, at least three times more than those retards say in YouTube tutorials? In my country it's at 60€.

2. Why I can't buy STM32H7 or STM32F7 microcontrollers? There are literally all at 0 stock. I found only those with 20$ extra for delivery, so it's cheaper to buy a nucleo development board and unsolder the chip from it.

What the fuck?

>> No.2531815

>>2531814
welcome to the post-COVID19 silicon crisis

>> No.2531988

>>2531673
>I didn't try it, but a pico board cost me $4, reserving one as a programmer was fine.
Fair enough. A pico is also more than powerful enough to be a PIC programmer, hope someone makes one of those.

>> No.2532000

>>2531751
>"Just learn the HAL!"
I don't even use the HAL, I still use StdLib. And I hated that Cube shit from the first moment an ST shill demoed it where I worked back in 2013 or so.
>I can't find good information on learning the actual process of setting it up.
It's called read the data sheet, and when in doubt, read the StdLib/HAL code to see what it does.
>I'm willing to put in the time and effort
Well there you go, now get cracking.

>> No.2532013

>>2532000
What is StdLib?

>> No.2532103
File: 261 KB, 1137x841, 1672351547871.jpg [View same] [iqdb] [saucenao] [google]
2532103

>> No.2532105
File: 177 KB, 1028x765, 1672351594045.jpg [View same] [iqdb] [saucenao] [google]
2532105

ethernet instead of wifi

>> No.2532134

>>2531668
what exactly are you trying to do with the camera such that your conditions are
>high fps, low resolution
your problem seems very specific in a way that open sourced libraries on tarduino/esp32 wont exist for

>> No.2532139
File: 84 KB, 540x720, 1672395547438.jpg [View same] [iqdb] [saucenao] [google]
2532139

>>2532134
I won't tell exactly. But similar application might me over a conveyor belt, where the contents is being checked and if one specific color of a product has been found the belt changes direction.
Except in a factory it might be a RPi with real OS, in my case though not.

I will try stm32h7. They are expensive, but maybe I can live with that if it works perfectly otherwise.

>> No.2532197

>>2532139
well then looks like youre on your own since you wanna be so tight lipped. good luck. i doubt youre doing anything ground breaking anyway. also 90% chance youll have to write the drivers yourself because of two reasons. standard camera libraries are too generic and youll likely need to use a different cmos capable of the fps youre needing. either put in the effort or get an off the shelf solution.

>> No.2532198

>>2532105
Is that pne of these chips which do 10 mbit ethernet with TCP/UDP in hardware? How annoying is it?

>> No.2532199

>>2531668
FPGAs? Whether a FPGA in a good price range can handle it, you have to try yourself.

>> No.2532200

>>2532139
you could do this easily with a colour filter over a photodiode and blast 0K white light at it. since you said resolution doesnt matter

>> No.2532267

>>2532199
Isn't it a fancy and expensive Raspberry Pi?

>> No.2532289

>>2532267
What, that "oak" thing?
No, it's a fancy and expensive ESP32.
The RasPi is an SBC. The difference is whether it runs Linux (or some other OS that runs apps from RAM)

>> No.2532291
File: 763 KB, 1080x1980, 1672419615380.jpg [View same] [iqdb] [saucenao] [google]
2532291

>>2532289
I mean look at these.. Had no idea about FPGA, googled boards and that's what I got, which look like expensive RPi to me.

Can you give link if you meant something different than that.

>> No.2532299

>>2532291
FPGAs can be pretty cheap (though I don't know which size you need). They may be cheaper than a beefy CPU for the same DSP tasks. Your pic shows dev boards, yes these are expensive.
Maybe mentioning FPGAs was stupid, because if you don't even know what they are, you'll have to learn a lot before you even know what you need.

>> No.2532321
File: 257 KB, 1080x1930, 1672421844423.jpg [View same] [iqdb] [saucenao] [google]
2532321

>>2532299
It would be fine, since I have no idea how to work with an stm32 either.

It seems in current market FPGA boards are either non-existent or several times more expensive than powerful stm32 boards.

>> No.2532356

Holy fuck I've looked at the FPGA code and it's crazy.

>> No.2532601

Anyone using Rust for embedded instead of C/C++? Whats the low down?

>> No.2532633

>>2532601
Anything in rust for embedded is just a shit ton of "unsafe" blocks to actually do anything.
no one uses rust for embedded.

>> No.2532638

>>2532633
Shouldn't be doing anything that needs to allocate/deallocate a bunch of heap blocks anyhow, not without a really good reason. Without that there isn't much point to using Rust, is there? The best kind of memory safety is static allocation and object pools.

>> No.2532704

>>2532633
My pet theory is that Rust unsafe is even worse than the C undefined behavior trap.

>> No.2534036

>>2534035
>>2534035
>>2534035
NEW THREAD