[ 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: 897 KB, 1000x1000, dongs.png [View same] [iqdb] [saucenao] [google]
2440483 No.2440483 [Reply] [Original]

Previous thread: >>2422767

Here we discuss microcontrollers, SBCs and microcontroller accessories, such as Atmel AVR and attinys (Arduinos), ARM boards such as blue/black pill STM32, ESP32, RPI, and others.

For general electronics questions (power supplies, level shifting, motor control, 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
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.2440487
File: 2.35 MB, 4000x3000, 20220803_192843.jpg [View same] [iqdb] [saucenao] [google]
2440487

So I'm looking to build a backup box/firewall into an old piece of telco kit but I have no idea what to use at it's core. I have played with ATmega but have done nothing this ambitious.

Everyone on /g/ says Raspi 4 with PiHole but last time I checked they were a bastard to get a hold of, and /g/ is kind of intolerable, so I'm not too interested in their opinions. Are there any other architectures I should be looking at? I would like dual NIC if possible (be it onboard or via an expansion) and I need USB for the USB > SATA adaptors I have bought.

Thoughts?

>> No.2440496

>buy a pro micro
>buy 2 (two) blackpills
>never used them beyond the simplest applications
why am i like this

>> No.2440515

>>2440496
Don't buy a hammer looking for a nail

>> No.2440520

>>2440487
That's not the kind of thing you'd use a microcontroller for.
There are some tiny SBCs with Intel/AMD SoCs on them, should have PCIe too, they're expensive but easy to get going.
There are also plenty of SBCs with multiple ethernet ports, they don't use router chips but still work as one.

>> No.2440545

>>2440520
>That's not the kind of thing you'd use a microcontroller for.
Obviously not, I should have been clearer I guess. I'll need an SBC of some sort, but short of Raspi I'm not familiar with the hardware available. I suppose I should just google "raspi 4 clone" and see what I get. Taking suggestions in the meantime of course. And cost is not a great issue either, I'd rather get something that will perform well than shoot for "good enough".

>> No.2440622

>>2440483
pic related reminds me of trying to get on a plane in some 3rd world hellhole not that long after 9/11
had a bottle of nice green chili sauce wrapped in a towel in case it sploded and the AC battery charger for a camera tying it all together. security went fucking mental

>> No.2440641

>>2440545
There are just so many now that it's hard to keep up.
https://www.cnx-software.com/2022/05/30/buy-nanopi-r5s-rockchip-rk3568-mini-router-sbc/
Some are based on actual router platforms: https://www.cnx-software.com/2022/03/21/banana-pi-bpi-r3-wifi-6e-router-board-mediatek-filogic830-mt7986-soc/
But for your use you probably need neither. Maybe one of those new RK3588 boards if you need power.
https://www.cnx-software.com/2022/07/15/orange-pi-5-most-affordable-rockchip-rk3588s-sbc/
There are x86 options as well
https://www.cnx-software.com/2022/07/23/business-card-sized-sbc-ships-with-intel-core-tiger-lake-or-amd-ryzen-v2000-processor/

Some people have even turned those cheap android TV boxes into routers.

>> No.2440656

>>2440487
>/g/ is kinda intolerable
"kind of" is a massive understatement. It's full of pretentious man babies who have opinions on everything they know fuck all about.

>> No.2440947

>>2440641
Thats a great start, thanks anon.

>>2440656
I'm just sick of them obsessing over mutilated genitals. The place is a shit pit.

>> No.2441042

If I'm using multiple cameras in a project should I use the same amount of microcontrollers or can they be connected to one board?

>> No.2441043

>>2441042
Depends on whether the MCU can handle the combined bitrate. What are the MCUs doing with the video feed? Processing it with facial recognition software or tracking software or something? Or just shuttling the data to an SD card? Perhaps compressing the data also? That's going to determine the number of clock cycles and RAM you'll have to spare.

>> No.2441044

>>2441043
I'm going to stream the video to another device, no facial recognition/etc

>> No.2441045

>>2441044
What format are you streaming it at? And to what device? What does the MCU actually do?
Also depending on how far away the cameras are from one another, you may want to put MCUs close to the cameras to avoid long cables of unprocessed/unbuffered data.

>> No.2441051

>>2441045
>What format are you streaming it at?
I'm new to this. Sorry if this is a dumbass question. Does that mean cable, file format or type of receiver?
>And to what device?
Planning on making a web accessible stream of the camera
>What does the MCU actually do?
Act as a connector for a stationary camera, and transmit the video feed from it (no recording, only transfer)

>> No.2441073

>>2441051
Data format. Well if you’re making it to plug directly into a monitor via HDMI or DVI or VGA cable then that also tells me what data format it is.
>web accessible
Ah so it’s to function as an IP camera, to plug into an Ethernet cable or go via wifi? You’ll need some video processing in there, to turn whatever format comes out of the camera (CSI?) into the right kind of (RTSP?) packets. This transformation isn’t necessarily trivial in terms of required operation speed or in terms of RAM. Doubt an 8-bit AVR could handle it in any case, though an ESP32 with its 520k of DMA RAM has a fighting chance.

Considering IP cameras exist, there are likely ICs designed specifically for this purpose, if you’re not deliberately challenging yourself.

>> No.2441081

>>2441073
There's a shit ton of IP camera SoCs but they're all from china with abysmal docs. Workable though.

>> No.2441103

>>2441081
Looks like NXP/Freescale has a few, if you can find them in stock.

>> No.2441471
File: 74 KB, 696x563, Screenshot 2022-08-05 012804.png [View same] [iqdb] [saucenao] [google]
2441471

What are tiny FPGAs like this good for?

>> No.2441606

>>2441471
anything really specific that doesnt need a lot of pins but needs to be lightning fast at doing the same thing over and over again. so literally anything

>> No.2441769

>>2441606
okay, care to name a few examples?

>> No.2441804
File: 24 KB, 380x190, stm32cubeide.jpg [View same] [iqdb] [saucenao] [google]
2441804

stm32cubeide: do people actually use this piece of shit in the real world? i don't get it,
why does it try so hard to fuck up my indentation?
why does it open random binary files every time i try to debug?
why cant it find definitions that are in the same exact file?
why does it take 20 seconds to open the interface for setting up the pins etc?
why does it automatically delete the compiler output from the little terminal when i get a compile error?

i watched a video series from ST on how to use the debugging features, even the guy in the video had the editor constantly freezing.
how can anyone put up with this shit?

>> No.2441809

I managed to salvage a laptop battery from work and took it apart and removed the 18650 batteries. they were @ 1.8v, I risked i, and decided to charge them. When I charged them they were at 3/4 capacity, I check them with a volt meter every few hours and they still are at the same voltage, would I be okay to use them?

>> No.2441816
File: 67 KB, 256x256, 1278441972459.png [View same] [iqdb] [saucenao] [google]
2441816

>>2441804
Yes, it's shit. When Cube was new, an ST guy came to where I worked and tried to shill it. The first thing I thought was "yeah, cool, you've got this visual thing, how the fuck do we check all this into source code control?" I think it also tried to generate custom .c files of the HAL based on your configuration, and I was so nope about the idea of having a custom set of libraries in each project. (we had simply built them into a .lib and included that in every project)
Fortunately an NXP guy came and left a 1768 board behind, and I learned about mbed and how it uses C++.
I'm still using their pre-HAL libraries, at least until I have to deal with one of their newer model chips. (but fyi their old I2C code is complete shit) And I've got a bag of old blue pills left from a bulk buy years ago before counterfeits were a problem. Actually, I'd seriously consider writing my own libraries, but that's something I call fun.

>> No.2442202

>>2441769
Maybe software defined radio? A USB3.0 transceiver with some extra processing in there? Video processing/format conversion? All the stuff I can think of already has special purpose ICs out there for it, but if you want some strange variation on it then it may be worth it to use an FPGA.

>> No.2442292

>>2441769
>>2442202
tiny FPGA's basically fulfill a niche where you need some small thing that is too slow for a MCU and designing your own ASIC would be too expensive because you only need a handful of units.

>> No.2442598

bros, in an arduino that generates a bunch of saw waves how can i turn each one on and off with toggles to ground connected to the digital read pins?

>> No.2442691

>>2442598
Are you generating saw-waves through DAC channels? Whatever it is, read through the code, understand the code, and the answer should be obvious to you. If you’ve yet to write the code, then start with one sawtooth and work your way from there.

>> No.2442793
File: 875 KB, 4080x3072, kw5xfqd1hfz71.jpg [View same] [iqdb] [saucenao] [google]
2442793

Where do you get rpi's nowadays? why are they so expensive?

Looking to get something like a pi zero 2 w at the advertised $15 price but everything's out of stock or like $200 for some reason. Hell even the pi 3 b+ is overpriced and out of stock.

>> No.2442832

>>2442793
>Where do you get rpi's nowadays?
you don't
>why are they so expensive?
because they don't exist except from scalpers.
Welcome to the ongoing chip shortage.

>> No.2443003

>>2440483
I'm making a switch style split videogame controller but I'm fucking lost on what to use. There are going to be two different units in each hand.
All I've done till now is designed the power input section.
>BLE VS 2.4GHz generic radio to USB receiver
>nRF51 chip vs ESP32 if Bluetooth
>external ADC or not (for sampling analog joysticks)

>> No.2443406

>>2443003
For latency reasons, I’d lean towards something other than Bluetooth. For side-to-side comms, maybe even something like 433 MHz would work fine. Use LoRa at low-power if you care about battery life and bandwidth. The actual RX/TX to the computer is a harder part, but if you just emulate a USB controller with a native USB MCU (STM32, pro-micro, etc) you could use whatever radio protocol you could dream of. There are also almost certainly special-purpose ICs for game controller RF, both dongle-wise and BLE, if you can hunt for them via appnotes. Less so for the two side controllers’ communication, but you may be lucky. Check out a thorough tear down of a switch controller to see what ICs they use.

>> No.2443426

>>2443003
>>2443406
>For latency reasons, I’d lean towards something other than Bluetooth.
You have no idea what the fuck you're talking about.
Standard bluetooth is 50ms interval between GATT notify events but can be reduced lower. Lowest I've used is 10ms.
Beyond that the easiest thing to do is make both controllers bluetooth and pair them to the host, GATT clients can have multiple servers after all. Each controller just sends HID packets for the buttons it has that are pressed. No need for an aggregator in the middle to connect to USB on the PC.

>> No.2443541

>>2443426
Is 50ms acceptable though? Remember you’ve got double latency due to the two stage nature, so make that 100ms. If your hardware can bring that down to 20ms it’s probably ok, but I’ve heard gaymers complain about less.
>pair both to the host
Definitely reduces latency, but IIRC the Switch has a master and slave. I’m assuming that was an informed engineering decision, but it would be interesting to hear the pros and cons. I suspect if nothing else, getting both paired might be a bit less user-friendly. They do band-hopping though so no problem there.
Captcha: VAG PH

>> No.2443543

>>2443541
>Is 50ms acceptable though?
that depends on your requirements doesn't it.
Which is why I said you can lower the interval.

>> No.2443599

>>2443426
>>2443406
>>2443543
>>2443541
BLE appears to be fine, I made a BLE based input device a few years ago. Anyway I still intend to leave footprints in the design for an atmega8 and nrf24l01+ breakout board and probably even one of those cheap 433MHz transmitters just in case I want them. I hope the board isn't too large.

>The actual RX/TX to the computer is a harder part, but if you just emulate a USB controller with a native USB MCU (STM32, pro-micro, etc) you could use whatever radio protocol you could dream of. There are also almost certainly special-purpose ICs for game controller RF, both dongle-wise and BLE, if you can hunt for them via appnotes.
Yes I have designed and made USB HID devices (and BLE HID as well) before, I use an STM32F1 usually. I did try to find the special purpose ICs but its sadly nigh impossible since I do not know Mandarin. Sourcing them would be similarly very difficult so I dropped that idea

>>2443426
>Beyond that the easiest thing to do is make both controllers bluetooth and pair them to the host, GATT clients can have multiple servers after all. Each controller just sends HID packets for the buttons it has that are pressed. No need for an aggregator in the middle to connect to USB on the PC.
This is a very interesting idea, I initially was leaning towards having the controller which turned on first to act as the 'aggregator' but your approach does seem to make sense in ease of implementation.

>> No.2443962
File: 97 KB, 896x672, 1643320200497.jpg [View same] [iqdb] [saucenao] [google]
2443962

>>2440483
I'm trying to code a driver for the BME280 sensor in micropython to be compatible with an STM32 board and have no idea what to do. The only micropython driver I could find was for a esp board and I also don't know what difference the board having a esp vs stm microcontroller makes. Also I don't know C, and only understand what I2C does in a general conceptual way. Any suggestions to help with my retardation?

>> No.2443965

> Anyway I still intend to leave footprints in the design for an atmega8 and nrf24l01+ breakout board
Just go with a modern chip like nrf52 or whatever STMicro makes, i know they have combo ble + mcu chips too.
For a drop in solution there are also modules with all the crystals and such on a single part, though it does cost twice as much as the standalone IC. Might not mater for low volume though.
>>2443599
>I initially was leaning towards having the controller which turned on first to act as the 'aggregator'
You could also do a combo client/server on one device and a server on the other in a master/slave combo.
The slave controller only connects to the master controller through UUID advertisement filtering and the master will connect to the PC and slave device, acting as a relay for the HID packets (or combining them into a single complete one)
NRF Connect SDK is something i've used a lot and I know it does this very well.

>> No.2443967

>>2443962
Watch lots of youtube videos.
You need to learn to crawl before you can run a marathon.

>> No.2443992

>>2443962
Try out C in the arduino IDE on a cheap arduino for starters. Once you’ve got the hang of writing to I2C registers you can try doing the same to the ESP. You may be able to just try to write to the I2C registers using python, but I don’t really trust interpreted languages for microcontrollers when you’re doing low-level operations.

Be sure to read what the MCU and sensor datasheets have to say about I2C, you should build up a picture of how they function.

>> No.2444091

>>2443962
I would take the esp driver as the starting point. Porting i2c driver written in C doesn't take much code. The driver only needs to read, write, initialize i2c and possibly get the time and deinitialize. So that's about 5 functions (or macros) to write. The esp driver probably has a function with a name like bmp_i2c_read referring to i2c_master_read whose equivalent might be HAL_I2C_Master_Receive.

>> No.2444610

I want to save sensor data to flash (on rp2040). When I run out of space I want to overwrite the oldest data. I don't have an RTC so time resets to 0 between "trials". If I didn't care about wear, I would store the newest address in a fixed location. It looks like there are flash ring buffer filesystems I could use. One complication is that the code is stored in the same flash. So if I change my code I will have a larger or smaller ring buffer, and I would like to still access the remaining data. Each block can have "trial index", current buffer size as well as the sensor data. A checksum of the previous block looks like the cargo cult thing to do here.

>> No.2444634
File: 192 KB, 2500x2500, stupid hub thing.jpg [View same] [iqdb] [saucenao] [google]
2444634

>>2440483
question: rpi hue light control without expensive hub
I want to control hue lights with my raspberry pi with python code, which interfaces directly with the bulb.
Is this simple, or am I pressured to buy something like phillips stupid light hub thing for connectivity?

>> No.2444642

>>2444634
You need some sort of bulb with RF (or IR) comms transceiver inside. Maybe just a receiver if you don't want to be able to obtain the bulb's state from the raspi. I was designing my own PCB that can fit inside an ordinary LED bulb housing that had an IR receiver in it, but powering the circuit in there with a tiny resistive dropper while being able to switch the load was a pain so I put it on the back burner.

Zigbee is a more open standard if you want something off-the-shelf to control via raspi.

>> No.2444797

>>2444610
Can't you put your ring buffer at a fixed address, leaving some space after the code for potential changes?

>> No.2444950

>>2444797
That's simpler, but then I need to decide how much space to leave.

>> No.2445228

How does a ring buffer figure out which data entry is the latest? Because if you tag that entry with a flag bit you’d need to read through the entire EEPROM looking for it, while if you have an address stored in EEPROM instead then those few bytes will get written to far more often than the rest of the EEPROM and shorten its life.

>> No.2445275

>>2444610
Empty flash is usually 0xff. Write a struct for your data storage with a magic number as the first element. Then in your code, read out the start of the flash and find the first non magic number section and start from there.
If it's all full then erase the page.

>> No.2445276

>>2445275
>>2444610
Also you partition your flash to avoid loosing data on flashes.
In your linker script make a .flash_storage or whatever section and put it at .END - whatever_size. Then reduce the available code size by 'whatever_size' so you don't inadvertently write to it.

>> No.2445346

Hey folks, Im trying to use PI control to spin a DC motor at a very precise speed. Does anyone have a youtube bookmark, link, or something to help me out?

I am struggling to learn about what the output of a control loop is, and if error should be normalized or if the process sorta magically does it. Do i need to actually pen and paper the physics equations or does the algo just handle everything if I were to get it working?

Also the motors response to different outputs of my ESP32's DAC seem to be about the same frustratingly so I am unsure how to use it.

This project is supposed to make me less of an idiot about controls but im still an idiot several videos later

>> No.2445375

>>2445346
There are some nice youtube videos on the topic of PID control, both on for intuition and qualitative understanding, and for the mathematical side.
Mathematically:
>Proportional = a*(x_desired - x_current) = a*error
>Integral = b*integral(x_desired - x_current) = b*integral(error)
Any normalisation would be included in the factors a or b, but for a single-directional motor system like this you can just set PWM = Proportional + Integral, and you should get somewhere good.

You could go through and calculate the physics, where certain parameters like acceleration and angular momentum will determine the theoretical optimal coefficients, but even that's not perfect. I think you should be fine just tuning it by hand. Or writing an algorithm to tune it automatically. You can take a measured behaviour (like a speed-time curve at 100% duty-cycle) and use that to build up a simple model of the motor to test your algorithm on using desmos.

>ESP32's DAC
How are you driving the motor? Because it had better be with a PWM circuit of some sort. DACs cannot output much current.

>> No.2445412

>>2444950
Okay, what if before flashing, you dump all data through serial to your PC? You could then flash the new firmware and send the Buffer back to the device.

>> No.2445446
File: 1.04 MB, 668x992, adsfdaedfion.png [View same] [iqdb] [saucenao] [google]
2445446

do any of you mess with arduino_cli? is it dogshit or decent?

>> No.2445511

>>2444610
Flash is always organized into pages, though sometimes the erase size is bigger than the page size. And basically you can always change a 1 bit to a 0 bit.
One thing you can do is erase the page ahead of the one you are working on, then you just need to find the last non-blank page to know where the end is, and don't forget about wrap-around. Start filling the page with records that start with an ID byte that isn't FF. When full, erase 2 pages ahead and start writing the next page.
And of course you decide on where all this starts and ends to give enough space for your code.
Of course this won't work if you're cheap and get something with so little flash that there's only two pages to work with. Some people are just obsessed with using an at-tiny for one-off projects.

>> No.2445518
File: 389 KB, 992x868, Io4u50y8jThrAqOI.jpg [View same] [iqdb] [saucenao] [google]
2445518

>>2440487
does it have enough width for mini ITX? there is definitely enough height for thin mini ITX and the HDDs
then you can use a mini PCIe NIC for another NIC
>I need USB for the USB > SATA adaptors I have bought
why the fuck did you buy USB > SATA adaptors
>>2440656
/g/ = consoomer general
iToddler trannies ruined it with constant shill threads

>> No.2445605

>>2445228
I thought setting a flag bit would also add wear but >>2445511 says I can skip the erase before changing the flag bit.

Originally I thought each element of the buffer has a pair (trial number, time since startup). On boot I don't know my trial number. First I find the lowest trial number in flash, say it's 0. Then after many measurements in trial 0 had there's trial 1,2,3,4. After trial 4 is one that's not consecutive, say trial 13. Then I will overwrite the start of trial 13 with the current trial 5. This allows erasing later than >>2445511 , so I get 1 extra sector (out of 500). But then each measurement (64 bits) needs 4 bits for the trial number and 1/500 + 1/64 < 4/64. So I'm going with >>2445511 which is both more efficient and obviously correct.

>>2445412
This is probably the best when finished but it's one solution per mcu: I would use "picotool save" for rp2040 but esp32's idf.py doesn't have it. The esp32 one must exist but I couldn't find it in 5 minutes.

>> No.2445641

>>2445375
I attached the DAC to the enable pin of a motor driver IC, I think its called an H bridge, uses a 5V power supply imstead of the ESP which is just controlling the output. Thanks for the tip about the DAC, gonna try PWM now because my motors were actingly like binary on/off instead of different outputs giving different speeds

>> No.2445649

>>2445446
I had thought it was outdated, haven't looked it up in a long time. You can always set to use an external editor in settings so you can edit in vim/emacs and still use the tools and upload button from arduino, or you can learn how to use makefiles and toolchains to properly use a CLI. I have done both and currently just use the former out of laziness

>> No.2445657

>>2445649
thanks anon, there is some conflicting info out there. I was thinking it was the opposite too, that arduino_cli was going but emacs/vim wasnt. Going to bone up doing it emacs style, thank you

>> No.2445661

>>2445641
Ok, in the garage now. Its not an H bridge but a "L293 Push pull four channel driver with diodes", Though now I see that it has switching speeds up to 5khz which is much too slow for the application. Now I think I gotta find something else.
>>2445657
Happy to help

>> No.2445668

>>2445661
Oh shoot I didn't remove all my DAC code, now with PWM I have more control over the thing. Now to figure out more of this PWM stuff. Thank you

>> No.2445682

for those of you more experienced with FGPAs, does implementing an ethernet hub on an FPGA sound like a decent beginner-intermediate level project? What about implementing an ethernet switch?

I have some light embedded programming experience (bitbanging i^2c, UART, SPI, wrote a driver for an LCD 14 segment display, stuff like that). I do not have much experience with programming FPGAs or writing stuff in verilog, but I want to get better.

>> No.2445691

>>2445682
cringe almighty do I really have to pay to download the fucking 802.3 standard

libgen save me

>> No.2445740

>>2445641
Does it want an analogue input? Because if it's a common H-bridge like an L298N, you'll want to keep it enabled and send PWM to the input(s).

>> No.2445754

>>2445740
Its L298D so yeah, I thought inputs were for setting direction, but if thats another thing I'm doing wrong then that could help, but right now the enable pin with PWM is behaving as expected. My implementation is almost completely working, I'm tuning it now per wikipedia and almost got it at the right speed.

My next issue is that one of my two motors needs to spin 10x slower than the minimum speed that I can put on the motor before it gives up and stops, so if that is something fixed by changing the enable and input pins then I might be in luck, else I have a lot of CAD on my hands to make a gear reduction

>> No.2445769

>>2445754
Assuming changing the PWM frequency doesn't help the slow motor, either go for a gear reduction or use a stepper motor instead.

>> No.2445790

>>2445682
That's hardly a beginner project, but if you don't know what "spanning tree" means, just don't go there.

>> No.2445911

>>2440483
don't get me STARTED! mfs will ask me if I have a bomb 24/7!! flashing blinky lights scare you, I get it, BUT GODDAMN ITS NOT A BOMB

>> No.2446316

I wanted to make a box that accepted a bunch of modules, what's the best way to connect multiple random things to something like a raspberry pi or similar thing? I don't even know if the idea is possible.

>> No.2446325

>>2446316
USB lol
I think there are probably some sort of splitter hats out there, but basically you have failed to define what a "module" is and what kind of interface will it use, I2C, SPI, a bunch of GPIO pins, etc.
I2C is probably the least bad choice for that, since it's an actual bus, more or less.

>> No.2446332

>>2446316
Depends entirely on the modules being connected. Personally I’d want to have a main-board with card-edge connectors on it, and plug the expansion boards directly into that. If the modules already exist, chances are they don’t share a uniform pinout, so you’ll just have to make custom pin socket pinouts for specific ones to plug into. Research that though, you might be lucky. If you get fancy with solder jumpers or dip-switches, you may be able to get a lot of custom pin outs with one board.
If the modules have rasppi hat pinouts, then just stack the damn headers and laugh at yourself for using up so much space for a piddly I2C sensor.

>> No.2446356

What are the security issues with FPGAs? Could I make a CPU that has no backdoors? Or is the FPGA itself vulnerable?

>> No.2446358

hello guys, I'm very new to this microcontroller stuff, and just got a Tiva C launchpad (tm4c123g, arm cortex m4). but im wondering, how do you manually flash code onto this thing? i can flash it easily using the TI Code Composer Studio IDE, but it kinda sucks ass. I'd like to just use my own editor + gcc and just flash it manually but idk how

>> No.2446376

>>2446358
arm SWD debugger.
You can compile with GCC arm toolchain and flash with segger/blackmagic probe.

>> No.2446421

>>2446356
From my understanding, if it were backdoored, someone could read all the gate states and have to replicate and/or analyze your design deeply, determine what parts do what, and then create a model for its suspected operation.

So probably very difficult unless theres some magic pattern recognizer for different logic operations or so.
You're a schizo, but with an fpga cpu, it becomes easier to install a hidden camera over your shoulder than rverse engineer and monitor your machine state.

>> No.2446775

my rpi pico makes a buzzing/whizzing sound when I do certain things like using multiple SPI pins. is this something that I should be worried about?

>> No.2446795
File: 53 KB, 171x129, file.png [View same] [iqdb] [saucenao] [google]
2446795

>>2446775
probably the switcher changing duty cycle in response to more power draw. Sometimes the inductors can vibrate in the audible range.

>> No.2447234

>>2443541
The switch connects both controller individually. Not sure about latency, I think it's 15ms.

>>2443003
If you're going with BLE definitely get nrf, they eat way less power.
Also you don't need external ADC.

>> No.2447286

>design board with esp8266 (esp12f) in mind
>find out about esp32-c3
>RISC-V and ultralow current in sleep
>module advertised as pin to pin compatible to esp12f for new designs
>solder it
>turns out its boot mode requires some extra pullups/pins
I know I rushed my decision to change the esp8266 but fuck chinks and their lies

>> No.2447296 [DELETED] 

>>2440483
guys i got myself one of those colourful smart globes, which i'm messing around with in python. There are a bunch of these 'DPS' values. I cant find anything on google about what DPS stands for.
wtf is 'DPS'? don't say damage per second.

>> No.2447325

>>2447286
Isn't it kinda odd that an ESP32 has the same number of pins as an ESP8266?

>> No.2447527

>>2447286
Welcome to engineering, never trust anyone's word even here.
Always verify.

>> No.2448151
File: 182 KB, 1210x907, PXL_20220815_165150700.jpg [View same] [iqdb] [saucenao] [google]
2448151

I built a PWM fan speed controller that sends different speed signals to a set of fans depending on whether an electric motor is running. The motor's power status is determined by using a current clamp around the power cord. I think I could make this smaller, and less expensive when more microcontrollers are back in stock. It was kinda' neat making a circuit board for the first time, surprised it actually works correctly.

>> No.2448449

>>2448151
What current clamp are you using?
As for making things smaller and cheaper, consider an MCU like the ATtiny84. I think it’s still in stock, and easy to program using the standard ICSP header, no bootloader necessary. 11 I/Os should be enough too. Newer series AVRs are even cheaper (ARTtiny214) but need a custom UPDI programming tool.

Wait are you programming that via UART? How does the resetting that’s normally done via the DTR pin work? Or just programming it out of circuit?

And also use SMT passives. Get any tip that isn’t conical and soldering should be a breeze.

>> No.2448462
File: 2.15 MB, 4032x1908, 20200605_091800.jpg [View same] [iqdb] [saucenao] [google]
2448462

>>2440483
I got this on an airplane.

>> No.2448488

>>2440947
>I'm just sick of them obsessing over mutilated genitals
A lot of board are like that now unfortunately

>> No.2448495

How do I do a battery backup to my home router? It is 12v 2A, it must always be connected to the network and work in case the electricity goes out.

>> No.2448498

>>2448495
translation was bad I am talking about connecting a battery to the router in case the power goes out in the area or when you have to do home repairs on your own and not lose internet

>> No.2448508

>>2448495
I just use one of those Belkin 12V UPS things that AT&T provided to DSL customers back in the mid-'10s. I haven't seen one at a thrift store in a while, but it's easier than getting the custom battery for my current router. But I get less than one power outage a year, so it hasn't really had to do much yet.

>> No.2448527

>>2448508
>>2448495
why not a gel battery (the ones used in UPS) + charging circuitry + boost/buck output

>> No.2448560

>>2448527
Yes, that's what the Belkin has inside, duh.
The only problem is they're usually old and dead by the time I find them, but it's usually at a by-the-pound thrift, so just ditch the battery.

>> No.2448588

>>2448495
Use a USB-PD powerbank and a 12V PD to barrel jack adapter.
This is the most practical solution.

>> No.2448600

>>2448449
The current clamp is one of those blue YHDC ones you can get on amazon, it has a 3.5mm jack on the end. I am using the ICSP header for programming, the UART is for printing debugging messages. I designed the board in january but just recently got a hot air station last week so I'm definitely going to use more SMT components in the future. Would like to get some Atmega 32u4 or 4809 TQFP, but all seem to be out of stock at reasonable prices. Did find some 4809 DIP-40 so I'll make do with big chips until... This time next year?

Cheers!

>> No.2448604

>>2448588
>keeping a lithium ion battery constantly at 100% charge
ishygddt

>>2448600
Oh shit somehow I missed that ICSP header.
>Would like to get some Atmega 32u4 or 4809 TQFP, but all seem to be out of stock at reasonable prices
IIRC the 1608 or 1609 is still in stock, which I consider sufficient specs for a lot of work. For native USB, check out the 16U2 or 8U2. As for that project, a gutless ATtiny would likely be fine. I bought 20 tiny1614s and 10 tiny214s because they were in stock and really cheap on LCSC.
At some point you just have to give up and put an ESP8266 in there instead, unless you actually need a lot of pins. Damn things are way too cheap for their specs.

Hot air isn't a necessity for SMDs, I only consider it necessary for desoldering them. I've been hand-soldering some of those modern MOSFET packages with barely visible pins (OnSemi SO-8FL) and it's been going alright. Hot air can be a detriment if you've chosen small passives like 0402s by blowing parts away, so don't go too stupid. I recommend 0603, 0805 if you're scared.

>> No.2449204

I bought a bunch of microcontrollers and raspi 4b 8gb years ago when they maxed at $50 and now I'm wondering if I should just sell them all since they are going on ebay for fucking $250.

>> No.2449387

>>2441471
Linking them up and making brains. Iirc, snail neurons were grown over some chips many years ago, and ‘evolutionary’ (right term?) coding was used to create functions in some chips like fpga’s and others that they couldn’t support normally and were individually tied to each chip depending upon its quirks or flaws, magnetic inductance etc. put the two together.

>> No.2449388

>>2441804
Get a Pi Pico and use it with Arduino IDE

>> No.2449389

>>2442832
>shortage
>scalpers
If we just killed them all, there’d be far less shortages

>> No.2449397

>>2449389
The niche won't disappear, the perverse incentives remain. Just the people exploiting them will be those in otherwise privileged positions. Like the family members of politicians.

>> No.2449404

>>2442793
>Where do you get rpi's nowadays?

I bulk bought some orange pi zero 2 since in the 3d printing community they're making controller boards with the allwinner chip, and I have a feeling this will be the next chip on the chopping block. It was another SBC I wanted to try but kept putting it off, and now I have no reason to say no.

>> No.2449408

>>2449404
>next chip on the chopping block
The supply shortages just keep pushing us towards more obscure, chinky chips with worse and worse documentation. Another 5 years of this and we’ll all be bumbling our way through OCR-translated Chinese documents that have way too few pages to tell us what we’re actually looking for.

At least STM32s have kinda become a standard architecture of MCUs more modern than a Z80, but even then the knockoffs can have different register addresses so they’re not exactly jellybean-tier. Not sure if SBCs are better or worse, but I suspect they’re worse.

>> No.2449436

>>2440483
I have this cheap Arduino nano.
What do I do with it?

>> No.2449624

>>2449408
>Not sure if SBCs are better or worse, but I suspect they’re worse.

Not sure what you mean by this? SBC is a self contained computer, and microcontroller is a chip with less resources.

But to respond in general, I believe the allwinner chips are more focused for SBC and STM32 are focused for microcontrollers.

>> No.2449626

>>2449624
Worse for IC shortages, I mean.

>> No.2449628

>>2449626
Damn it, I was right I initially thought you meant that, but I second guess myself.

>> No.2449672

Has anyone ever come across a microcontroller with DMA that can be driven by a different clock source than the CPU? In every MCU I've looked at they both have to run off the same clock.

What I'm trying to do is make a function generator with analog frequency modulation. I want the DMA to push a waveform into a DAC at a rate set by a voltage controlled oscillator. Reading an ADC then rewriting the waveform the DMA pushes out is too slow and clunky. I really need to control the DMA clock directly.

>> No.2449710

>>2449672
Can you not have a few different ranges, and adjust the MCU clock between 20MHz and 2MHz?

Also there are algorithms that could continuously vary frequency by subsampling from a lookup table without needing an ADC at all, assuming your frequency is set digitally. Having a fixed DAC sample rate also means your anti-imaging filter can be fixed.

Another option is to use two MCUs, one clocked at max for all the fast stuff and the other one just doing variable clock stuff. Not sure if you can have different clock rates to different cores within a multi-core micro.

>> No.2449725

>>2441471
Put a teeny little CPU in it!
https://hackaday.com/2010/12/01/j1-a-small-fast-cpu-core-for-fpga/

>> No.2449816

>>2449408
Pi Pico is microcontroller with good availability. Esp32 micros as well.

>>2449624
I remember some allwinners being used in chink action cams

>> No.2449817

>>2449436
I made lipo discharger that discharges until storage voltage is reached with a little display

>> No.2449969

>>2440483
Hi! Someone can tell me how I code an ATMEGA164 MCU to receive an IR signal from the IR receiver and use this signal as a command for later use?
TL;DR how to program an MCU to control a DC motor with IR remote

>> No.2450101

>>2449969
First assemble it on a board of some kind. Be it a PCB or protoboard. Ensure the board has the IR receiver (or wires from it) and motor driver, but also an ICSP header and any power supply stuff like filter caps and regulators and the like. A crystal too.
Then you’ll need some sort of programmer. I’d recommend a USBasp clone, but you can easily use an arduino nano with the “arduino as isp” program on it (and a cap on the reset pin).
For the code, I’d start reading the 164’s datasheet on how to use hardware timers for pulse width modulation. Then there’s just a Boolean for direction. Decoding the IR receiver isn’t trivial, I don’t think you can use the built-in serial hardware units for that so you’ll likely have to bit-bang it using interrupts on each edge, and one of the timers to tell you how long each period was. From that you should relatively straightforwardly get a string of 1s and 0s you can feed into RAM and later process for the meat of the signal, after any necessary decoding.

What skills do you have? What hardware are you starting with?

>> No.2450392

>get gyro board
>need 330 ohm resistors on the sda and sca lines on arduino nano just in case
>don’t have them
Ree desu

>> No.2450398

I need some LEDs that have a diffuser built-in, just like a couple of square inches so it's like a panel of light instead of a point. Anyone know an OTS part like this?

>> No.2450427

>>2450392
not to be a dick anon, when I had money put aside to finally buy electronic components I googled around watching different youtube videos and reading blogs on "essential electronic components for beginners" and 330ohm , 10k, 100k etc.. were specified to buy more of, and buy a assorted resistor kit for other values.

If you lived close by I would give you 25 since I have 100 or so of them.

>> No.2450434

>>2450398
so you can cut your own if thats what you're asking?

>> No.2450544

>>2450392
>wanting an exact value for I2C pull-up resistors
Depending on the loading in your circuit, usually 1K-5K is fine.

>> No.2450627

Is it more or less efficent if i power a MC with more batteries? Say both 2.4v and 3.6v is within range of a MC, would batteries last more if I power it with 2 nimh battery or 3?

I am gonna guess 3 is better but i have no idea. But maybe it doesnt matter?

>> No.2450642

>>2450398
No but you can definitely buy diffuser panels for LCD backlights on eBay and the like. Sanding down a piece of transparent plastic also works to some extent, but dedicated diffuser panels are a lot better.

>>2450627
I think lower voltages are more efficient in terms of energy drawn, and I think that’s still the case when you consider you only have 2/3 the total energy available. Quiescent current will be in the datasheet somewhere.
But read the safe operating area for voltage and clock frequency to see if 2.4V pushes your clock too low. Also checkout charge and discharge curves for NiMH to see how high or low the voltage across each cell can get in its extremes.

>> No.2451014
File: 80 KB, 1005x1005, OLED-pinout-diagram.jpg [View same] [iqdb] [saucenao] [google]
2451014

Is there a easy way to get small OLED display information to desktop screen? I have this small scale with PC driven trickler on top of it. So in short I need to switch between looking pc screen and the small scale screen.

My best hope is that I can create small window on my screen on top of the trickle software. Like can I wire the oled pinouts as a camera input and open some ghetto video feed program which displays the oled screen data?

>> No.2451059

>>2451014
i think that's kinda hard, I'd look for some debug/uart port and hook up the pc there, even setting up a fixed webcam might be quicker
also what kind of info does the PC provide to the trickler? is the scale completely independent of the trickler?

>> No.2451073

>>2451059
The tricklers measure different kind of portions of powder and we have scale there verify the results. The scale is not needed by the machine manufacturer statement but the tricklers drift.
The scale is there for our ease of mind cause we have made few fuckups cause the mixture was wrong (we make thermal epoxy).
I might just setup a webcam for it. Tough my monkey brain suggested that sollution could have been easy as smashing a webcam to bits and soldering the random wires to the oled screen ports. kek.

>> No.2451237

>>2451014
If you want video information, then yeah a webcam. But if you want text information without an OCR, then I’d send SCL and SDR into another MCU’s I2C ports and use it to speak UART to a computer. If it’s too fast, then use something like an FT232 for SPI or whatever.

Having the actual data from both would allow you to automate things beyond having a person look at the screen.

>> No.2451304 [DELETED] 

Does it matter if copper lines on a breadboard rusts/becomes green after you finish a product? Will it still properly conduct? I hope it is only at surface level

How can I prevent that?

>> No.2452270
File: 1.71 MB, 2250x4000, 7698c542-7e0c-40b4-8b1e-3155e9ce3a08.jpg [View same] [iqdb] [saucenao] [google]
2452270

I am a retard, how do I get JTAG to work on a board using an STM32F103R8? Can't get it to connect in any capacity.
Trying to break into this keyboard I bought from a warehouse in Israel, it's cool because it has two rows totaling 40 extra keys along the top, but they are all firmware-locked to be key combos, and are utterly useless in their current form. I figured I could dump the contents of the chip, set them to unique scan codes, and then use software to control their use instead.
I don't know shit about electrical engineering but I'm a software engineer, so I figured I could learn as I go. After googling a while it seemed JTAG was a good rabbit hole to fall down since these bad boys are poking straight out of the board.

>> No.2452272
File: 1.98 MB, 4000x2250, 55776487-a27e-4124-8be1-5c725d2cf3f6.jpg [View same] [iqdb] [saucenao] [google]
2452272

>>2452270
Pic of the whole board. There are two buttons near the controller that seem to power cycle it, and if one is held when the other power cycles it, it enters this interesting state where the caps lock blinks, makes me think it's some sort of debug mode. JTAG or related communication protocols don't seem to work in that state either.

>> No.2452273
File: 1.98 MB, 4000x2250, 01a05d82-b42d-47ba-98f6-4f0702461bf7.jpg [View same] [iqdb] [saucenao] [google]
2452273

>>2452272
One last pic focusing on the chip.

>> No.2452276

>>2452272
Post reverse side so we can see where the traces go

>> No.2452278

>>2452276
Sorry for the weird lens artifacts, I'm using a phone that I only just recently got LineageOS on, still tweaking everything and figuring out how shit works. This is flipped so that the chip is on the right, the pins are on the left, like if you flipped this pic up >>2452273

>> No.2452279
File: 1.86 MB, 4000x2250, 2dfa2618-af82-4a68-8d2d-2f3d0d91751c.jpg [View same] [iqdb] [saucenao] [google]
2452279

>>2452276
>>2452278
I am retarded, forgot to embed pic

>> No.2452289
File: 2.79 MB, 3863x2400, the_png_was_14MB.jpg [View same] [iqdb] [saucenao] [google]
2452289

>>2452279
Did some tracing, these are the only pins I can see going back to the micro. I'm guessing 64 is a reset pin or something similar since it's on a button. See if the datasheet points to the other pins being something in particular, assuming you haven't already done so.

>> No.2452291

>>2452289
wait did i get all those pin numbers backwards? if so just do 64-N

>> No.2452295

>>2452291
Based on the traces you outlined, here's what I've got:
Cyan, pin 48, VDD_3
Blue, pin 12, PA2, GPIO pin
Red, pin 11, PA1, GPIO pin
Green, pin 15, PA5, GPIO pin
Pink, pin 06, PD1-OSC_OUT
Yellow, pin 05, PD0-OSC_IN

>> No.2452298

>>2450398
that moldable plastic stuff that melts in hot water works great on leds just as long as your device isn't gonna get hot.
also a white styrofoam cup makes an excellence led lampshade

>> No.2452355

>>2452289
Did you beep trace it with an ohmmeter?
Get a fucking data sheet and find out where the appropriate pins from the CPU go, it's not like you have a mystery meat chip there.

>> No.2452357
File: 42 KB, 1716x1183, Untitled.png [View same] [iqdb] [saucenao] [google]
2452357

going to be setting up a simple HC-SR04 sensor to monitor the water level in my freshwater well
thinking to make some neat software apparatus like pic related
could this actually work with an STM32F411CEU6?
initially maybe i'll display the water level on a small display, but eventually i want to have it logged in a database and displayed as amount of water over time (or water level over time), may investigate whether or not to use an ESP32 instead
r8 pls

>> No.2452369

>>2452355
No I’m not the anon whose pcb it is. I think he’s >>2452295 and it looks like he did beep it out.

>> No.2452434

>>2452355
>>2452369
I'm the guy who has the boards. Didn't trace with ohmmeter, just used the data sheet and anon's excellent MS Paint skills to figure out the connections. Problem is I don't exactly know what to do with this information, as I stated here >>2452270 my experience with electronics extends to writing code for them, not building/breaking them. But that's why I'm trying to learn.

>> No.2452437

>>2452434
>But that's why I'm trying to learn.
Then trace it with an ohmmeter already.

>> No.2452467

>>2440483
If I were to make a bomb I'd make one that explodes 5 minutes early.

>> No.2452521

>>2452357
Pump flow rate would be good to have too, but it'll cost >10x the HC-SR04. Perhaps pi * r2 *(well level)' = -pump_flow + k*(aquifer_level - well_level). k is fit to data where well_level changed while aquifer_level didn't change much. In other words when you pump the well dry and then watch it refill, you can assume a constant aquifer_level and see that k is nearly constant (or not, and then you need a different equation). Then you can report k*(aquifer level - well level)=current recharge or k*(aquifer level - minimum well level)=maximum recharge. Hydrogeologists probably have better models.

The database probably fits in flash especially if you have an esp32 budget. See >>2445605

>> No.2452538

>>2452521
interesting, i havent much thought about reading flow rate since the well refills quite ok and im not a massive consumer of water
however, ground water levels are fluctuating quite a bit in my cunt as of recent years so i want to monitor the available water at any given moment
the well is 90cm in diameter and the suction pipe is 3 meters down so
liters of water = ((3 - water level) * .45 * .45 * pi) * 1000
reading the recharge rates would be very interesting though

>> No.2453651
File: 265 KB, 831x262, file.png [View same] [iqdb] [saucenao] [google]
2453651

I'm in tears, UPS magically disappeared an entire order of microcontrollers and electronics parts from Mouser. I opened a claim but it's been 6 days and nothing.

Pour one out for the six ATmega 4809 DIP-40s that are probably crushed up under a conveyor somewhere in Atlanta UPS hub.

>> No.2453811

>>2453651
RIP

>> No.2454248
File: 249 KB, 191x184, 1644505172856.gif [View same] [iqdb] [saucenao] [google]
2454248

I need the cheapest microcontroller that supports USB Device, two SPI, and is manually solderable (LQFP, TSSOP preferably, QFN is "acceptable", just a pain). The price would include whatever additional components it needs (in case it needs an external flash or a crystal for USB), excluding the LDO.
I don't care about architecture, development tools or programmers, flash or memory size. Give me your worst, dirtiest, cheapest thing. If it's not in stock, that's fine too, I'll keep an eye on it in the future.

>> No.2454265

>>2454248
>cheapest
How many of this are you planning to make? Saving fifty cents on quantity ten to get a chinesium piece of shit without English language documentation isn't worth the time you waste banging your head on the table.
And if you're making more than a hundred or so, there's companies like AVNet whose business is helping you find chips.

>> No.2454271

>>2454265
Not currently planning to make a lot, but I'm trying to broaden my horizons and learning about more kinds of microcontrollers rather than being stuck with atmega, stm32, nrf and raspberry. This is especially relevant now everything's fucking out of stock.

>> No.2454301

>>2440483
Can any one suggest where to look for embedded coding?
Internet is a dogshit nowadays, everything looks like it was scrapped off from every place i knew

>> No.2454302

>>2454301
What do you want to do/make?

>> No.2454306
File: 2.48 MB, 3264x2448, 20220825_115639.jpg [View same] [iqdb] [saucenao] [google]
2454306

/o/ here, i already have installed an arduino nano for radiator fan control, and i want to add a little LCD single line screen as pointed to in the picture (i am swapping this cluster into a manual). Any recs on a screen ? Or where i can browse screens? The opening is 53mm x 8mm. I will put my converted fan real rpm since the unit has a sensor on board, and maybe a clock since the car doesnt have one. What is needed to make nano keep time? I have it on switched 12V right now, so a battery setup of some kind?

>> No.2454307

>>2454302
For starters i want to make toys for children that can move, for example rc car. Difficulty isnt a problem, the issue is where to begin from

>> No.2454310

>>2454307
The best way to start is to just grab a development board, set up its development tools and read its documentation. Arduino, Teensy, Pi pico, ESP32, or if you're feeling adventurous, an STM32-DISCO board are all valid choices.
Beyond the usual shenanigans of coding in C, the main thing you'll have to realize is that you're working on bare metal with direct access to an array of hardware peripherals like communication, IO and timers, all of which can be combined in different ways and influence the CPU's execution through interrupts and such. If you are building battery-powered devices, you'll want to look into the respective power modes and shutting down the CPU, and waking back up with a timer interrupt, for example.
All of this differs heavily depending on the architecture of the device you're working with, so it's hard to point to any specific resources beyond whatever is available for your device.

>> No.2454311

>>2454310
>STM32-DISCO
I meant black- or blue pill mostly. Those are the cheap variants.

>> No.2454312

>>2454310
So it's boils down to choice of platform and architecture i am going to use.
Thank you, now i have something to work with

>> No.2454313
File: 108 KB, 1313x442, Screenshot_2022-08-25_12-18-39.png [View same] [iqdb] [saucenao] [google]
2454313

>>2454306

here is 8 mm digit, $4 each. https://www.digikey.com/en/products/detail/broadcom-limited/HDSP-U211/2219402

>> No.2454316
File: 336 KB, 1177x519, Screenshot_2022-08-25_12-21-53.png [View same] [iqdb] [saucenao] [google]
2454316

>>2454306
here is precision rtc with battery

https://www.amazon.com/HiLetgo-AT24C32-Arduino-Without-Battery/dp/B00LX3V7F0

>> No.2454385

>>2454311
STs nucleo boards are basically equivalent to blue/black pill boards with the ST-Link built in, the discovery boards add some other parts too.

>> No.2454386

>>2454385
at a not insignificant cost unfortunately.

>> No.2454500

>>2454306
Asuming there's plenty of room behind the faceplate, you could shove any old dot-matrix OLED or backlit LCD there and program the characters to be in the right position.

>>2454310
>STM32
Yeah, maybe if you want to be permanently cuckolded by the supply chain. The Pi Pico ICs are looking surprisingly attractive right now.

>> No.2454512

>>2454500
>maybe if you want to be permanently cuckolded by the supply chain
Not a problem if you just need a few devboards to mess with, but you're right that for custom designs it's being a nightmare right now.
I've been trying to find comparable microcontrollers that I can actually hand solder but it's being fucking impossible. Most other ARM cores are too expensive or big or come in QFN only, ATmegas have a pitiful amount of memory, often no USB and are similarly out of stock, PICs would be really enticing were it not for the awful fucking tooling surrounding them.
I've found a few F042s and L433s in stock on avnet/arrow for fair prices which I'm considering but I might just bite the bullet and chuck an entire fucking dev board onto my design because what the hell it's only $4 and at least it sits flush on the pcb.

>> No.2454527

>>2454512
>Most other ARM cores are too expensive or big or come in QFN only
Make or buy yourself a reflow plate.

>> No.2454531

>>2454527
I don't like needing more tools but assuming I do get one which micros would you recommend. Are the SAM any good?

>> No.2454533

>>2454531
I've barely graduated from the arduino IDE and are still using AVRs myself. But as I said, the Pi Pico's RP2040 looks pretty nice and it's only $1.40, but looking again they don't have onboard progmem so you'd need to load up on fast EEPROM. Datasheet isn't in chinglish so you don't get the xx32 clone issue. If you need more specs than that or an ESP32 though, couldn't tell you.

>> No.2454738

>>2454533
No the specs are fine, it's way too powerful for most of my uses even. The datasheet is pretty terrible however, despite being english, it's very obviously written by software people and most of it is copied straight from the datasheet of whatever peripheral they used, leading to inconsistencies across the entirety of it. I was wondering if there were other easily accessible arm cores right now.

>> No.2454745

>>2454738
Oh, didn't know about that issue. Hope that's fixed in the coming years as professionals try to adapt the pico and make their complaints known. Also hope they make one with nonzero progmem.

>> No.2454828
File: 77 KB, 1000x1000, 61hVTQ0a3oL._SL1000_[1].jpg [View same] [iqdb] [saucenao] [google]
2454828

Anons I have a question, how the fuck can I make a pwm for a brushless ESC I bought some like pic related, and by chance from googling around I saw someone control ESC with blue servo controller which I had lying around.

I have seen people use 555 timers to make servo controllers, and I have tried multiple circuits out there, and none of them work! I have checked my circuit multiple times, and what confuses me is when I see some different looking electronic component being used in the circuit and wonder if that piece is really that crucial and why mine isn't working.

I am trying to do t his with a NE555P is it not possible? Do I need to use a lmc555 timer??

I rather not use the blue servo controller and diy my own with what I have, and I thought what I had was sufficient. I have potentiometers from 1k to 1M I have assorted ceramic capacitors assorted electrolytic capacitors.

I just want to use a small chip or have a small footprint so its not a pain the ass to fit into a semi small area.

What other chips can I use? Attiny 85? I have some of those, I was hoping to use a chip where I didn't have to code (which is fine if I have to I do computer programming once in a while) I just find it unnecessary for something like this.

>> No.2454853

>>2454828
>555
try asking in /ohm/

>> No.2454891

>>2440483
What are some good tutorials or starter projects for Arduino? I bought a starter kit which promised to have tutorials in it but they suck. They all boil down to 'create a circuit in the diagram. Upload sample code. Look, it works!'

>> No.2454898

I planted something called 'jerusalem artichoke' this spring and I'm quite satisfied. It's grows even easier than potatoes in my region. It has edible tubers which have a taste unlike anything I've had before which makes it good for growing as I can't buy that stuff in the market. I say you anons give it a try if you come across it- it's very low maintenance and is unique in its flavour

>> No.2454901

>>2454898
Fuggg wrong thread :DDD

>> No.2454913
File: 886 KB, 1200x600, MicrocontrollerForKids.jpg [View same] [iqdb] [saucenao] [google]
2454913

What do you guys recommend for kids? Looking to get the kids into microcontrollers and programming, I'll be walking them through the programming part since I have some experience with it. Looking to avoid Python and Raspberry Pi. Does anyone make any cool Arduino kits that you guys would recommend with leds and other gadgets to get them hooked? Every kit on Google and Youtube seems to be 7-10 years old and out of stock, not sure if there's any kits that are more recent.

>> No.2454917

>>2452270
Just map out the matrix and make your own controller. Flash a keyboard firmware on it.
You'd be fucked if that chip is locked anyway.

>> No.2454929

>>2454898
>>2454901
lel /hgm/?

>> No.2454951

>>2448495
Buy an Uninterruptible Power Supply. This is a solved problem. Do try retarded shit with lithium batteries.

>> No.2454978

I have an arduino. Even if I don't power its vin pin, if I supply 3.2v to one of its io pins, it tries powering up (you can see the led). WTH?

>> No.2455009
File: 1.29 MB, 1395x1413, Mooninite2.jpg [View same] [iqdb] [saucenao] [google]
2455009

>>2440483
> Massachusetts Attorney General Martha Coakley said that the device "had a very sinister appearance. It had a battery behind it, and wires".
lel

>> No.2455039

>>2454891
You can find tutorials online. Getting into arduino is a lot easier if you have some background in programming and electronics.

>> No.2455040

>>2454978
input protection diodes and shieet

>> No.2455041

>>2454978
You might have fried your arduino.

>> No.2455043
File: 10 KB, 600x375, proxy-image.png [View same] [iqdb] [saucenao] [google]
2455043

>>2454891
Yeah it really is stupidly simplified. I say a good project base is a sensor, display, and user interface. So maybe you want a small 7-segment display that shows VOC contents, with a button to swap from VOC to eCO2. Or an OLED that displays the magnetic field strength read from a hall-sensor.
Getting more advanced we’d be talking datalogging or low power projects with interrupts. Can’t really use an arduino itself for low-power use considering the 1mA LEDs, so at that point you’d be looking at soldering a DIP AVR into protoboard. But interrupts are very useful to learn anyhow. For that you can use an “arduino as ISP” but I’d recommend buying a USBasp clone.

The other step is in code. Using libraries is pretty easy, but to use no libraries and instead directly address individual registers gives you a much better understanding of the underlying mechanics. In particular, learning how to use the built-in timers for measuring times or frequencies, triggering events at certain times, or pulse width modulation is very useful and far more flexible than simple analogWrite. Same for the ADC.
So you could pick any existing babby project and rewrite the code from scratch. Note that driving a dot-matrix display like an OLED is pretty complex, so I’d stick to a library for that until you know what you’re doing.

Of course the other aspect is analogue electronics, learning how to use op-amps and the like for signal conditioning is pretty useful for microcontroller use, a simple project would be setting up an MCU that measures its own voltage and current consumption using an LM358.

>>2454913
MCUs don’t get old, they’re all built on 15-20 year old designs anyhow. If they’re out of stock on Amazon, check eBay if not AliExpress.

>>2454978
Internal protection diodes from each input go to Vcc and GND. But feeding a voltage outside of the Vcc and GND supply rail is out-of-spec and you shouldn't ever design a circuit that does that. picrel

>> No.2455287
File: 2.39 MB, 480x480, CircleColours.gif [View same] [iqdb] [saucenao] [google]
2455287

I haven't touched code in ages and was pretty shit at it in the first place last time I did. I've got some individual LEDs (single-color) that I want to light up so that they scan with a trail in front of/behind them, kind of like this gif but with the brightness fading in both direction instead of just one.

Problem is, like I mentioned above, I'm pretty shit at doing this stuff and can't wrap my brain around how to actually FADE it and not just turn the LEDs before/after the "center" one on and off. Could someone please help me be less retarded? I'm using an ESP32 with the Arduino IDE 2.0, for context

>> No.2455292

>>2455043
https://hackaday.com/2022/08/26/dead-eeprom-dumped-with-help-of-body-diodes/

>> No.2455352

>>2455287
You can have RC filters on them to do a trail, but pre-fading basically requires individually PWMing each one. Or multiplexing them to that effect. I mean technically you /might/ be able to get both the pre-fade and post-fade with LC filters on each LED, but is that really worth the effort?

The code you use will be determined by your method of multiplexing. Chances are you'll either want to use something like a 74HC595 (or a bunch of them chained together) or charlieplexing. The latter is simpler but gives worse brighness, so I'd go for the 595s. You might be able to drive them with built-in SPI or USART hardware, maybe. Otherwise bit-bang them. Figure out a formula for the duty-cycle of a given LED as a function of time, then figure out the formula to turn that duty-cycle into an on/off state for a given frame, then turn that into a repeating serial stream that can run off an appropriately subdivided internal timer.
Or shove it in a lookup table if you're lazy, maybe it's symmetric enough that the table isn't massive.

>>2455292
Neat stuff. Are you the autist mentioning that technically it's an EPROM and not an EEPROM?

>> No.2455423

>>2455352
Why would I be? That would be very un-anonymous. And faggotry too.

>> No.2455524
File: 10 KB, 436x389, file.png [View same] [iqdb] [saucenao] [google]
2455524

>>2455040
>>2455043
Thanks, I will use pic related. It seems to be working fine (other than signal being inverted but I can handle that in code)

>>2455041
I think I already partially fried it, at least the built in led does not work. Other than seems to be fine so far

>> No.2455714
File: 73 KB, 1280x720, 1635244154390.jpg [View same] [iqdb] [saucenao] [google]
2455714

I want to power my custom microcontroller PCB with a 2v battery-powered supply. However, to communicate over USB, I need to supply 3.3v to the microcontroller's VDDUSB. I'm thinking of just having two shottky diodes lead out of two separate LDOs (one 3.3v, powered by USB, one 2v, powered by the battery), and connect them to VDDUSB, so the pin is still powered at 2v when the USB is pulled, allowing me to shut down the peripheral.
However I'm not sure if this is safe, nor if it's the right way to do this. What would other people do?

>> No.2455745
File: 17 KB, 368x352, proxy-image.jpg [View same] [iqdb] [saucenao] [google]
2455745

>>2455524
That won't work due to the intrinsic base-to-collector diode of the BJT. Pic related is one way of thinking about a BJT.
It would be better to use a small-signal MOSFET, or put a 1N4148 on the BJT's collector.
>at least the built in led does not work
You may have cooked one I/O channel. If it's an arduino nano, that's portB you've lost. Which is bad because portB contains the SPI hardware and the crystal.

>> No.2455751
File: 7 KB, 400x400, tegaki.png [View same] [iqdb] [saucenao] [google]
2455751

>>2455714
The diodes is a neat way. To avoid the diode drops you can use P-channel MOSFETs instead, allowing you to put the "diode" after the 3.3V LDO and avoid having to worry about reverse voltage across the LDO.

>> No.2455753
File: 77 KB, 934x1464, file.png [View same] [iqdb] [saucenao] [google]
2455753

>>2455745
I have tried it and it is working, the pic is how it was supposed to work

>> No.2455759

Is there a microcontroller with basically Commodore 64 hardware? Like an 8502 and 64kb ram? I guess that’s kinda slow with a lot of ram vs a nano with 16mhz and 2kb

>> No.2455770

>>2455753
Yeah but when that 3.3V goes to 0V and the input is still 4V, you'll get current flowing through the 1k, through the BJT, and into TP. Failstad may not model the reverse current through a BJT.

>>2455759
I think some more modern MCUs are based off older architectures like that, but I couldn't say for sure.

>> No.2455785

>>2455759
See:
https://octopart.com/search?category_id=4300&databuswidth=8&ramsize=65536
The only micros listed are ones that don't actually have the specified 64kB RAM. Either 64B of RAM, or can externally address up to 64kB of external RAM thanks to being based off an older-style micro like the z80.

Though note that the Commodore 64 used external RAM such that both the CPU AND the display could access the memory. In this case, even if you could get a micro with that much RAM, you'd need it to also have DMA in order to get that memory out to a display IC, and even that wouldn't be too quick. I think you're better off going for external RAM and progmem ICs on a little dev-board, with an 8502-derived IC on it.

Some 16-bit micros definitely have that much RAM though, like some PIC24s, which also pack 256kB of progmem. And something like an ESP8266 is cheaper and has far better specs. Up to you if you want to basically build an emulator or impose an artificial limit on yourself.

>> No.2455809

>>2455770
>Yeah but when that 3.3V goes to 0V and the input is still 4V, you'll get current flowing through the 1k, through the BJT, and into TP. Failstad may not model the reverse current through a BJT.
Hmm, i see. I am indeed getting 0.6ma. Unlike before the power led does not loght though.

I can increase the resistor to 100k or something. Right now it is actually 4.7k. That way very little current would flow to arduino

I will think about your original suggestion later but how harmful would that current in my npn solution would be? It will only apply for a moment basically because that signal also used for a latch that powers arduino

>> No.2455816

>>2455809
Actually i measured wrong I was measuring current on base which is also bc. I did not detect any current on be

>> No.2455822

>>2455809
>>2455816
Oh of course, the be-junction shunts any voltage to 0.7V from GND maximum, so yeah you wouldn't get anything at the micro. It's safe, my bad.

>> No.2455869

What's the best way to interface with a GPS chip? I want something that's as small as possible and has as much battery life as possible. I'd like to be able to run an OS on it though not just display data. Do I use a System on a Chip type thing? Or a small board?

>> No.2455922

>>2455352
>multiplexing
I don't think I'll be using that many to need to use it. I have what, 16 PWM channels, I think, and I'm only planning on using about that many LEDs; I will be getting a bunch of really small (0.5mm) non-addressable ones, but I have some 4mm strip I can use if I want to address them. I was more wanting to figure out the code/method to drive them in that fashion, not so much the hardware, I think I have that part down.

>> No.2455949

I hate programming so much it's unreal. When I stare at a schematic diagram it gives my visual center of my brain some pleasant endorphins, but when I stare at computer code it gives me a sense of disgust. It just plain looks ugly. fuck arduino up its stupid ass

>> No.2455951

>>2455922
You only have 2 or 3 timers though, I'm not sure if you can get 16 different PWM rates from just a few timers.

>>2455949
Try making your code nice to read. With indents and comments. Bonus points for going for a text editor that has nice colouration.
>arduino
Get pro and ditch those digitalWrite commands. Program the registers directly. Feel the bottom level.

>> No.2455953

>You only have 2 or 3 timers though
I am a dumb shit and do not quite understand what exactly that results in. I'm going to be syncing them all up (or, at the very least, updating them all at the same time) without any fancy interactive effects; the LEDs will all be in a diorama in various places so they don't really need to be activated at different times

>> No.2455955

>>2455951
>ditch those digitalWrite commands
I'm using a teensy 3.1 and using analogwrite but to my understanding it's still PWM which isn't ideal. If it was just a DC voltage set by software it would make more sense to me and not be technically flickering.
It continues to amaze me how hardware makes sense and software makes no sense at all and yet seems like it was made by complete retards.

>> No.2455957

>>2455751
Hey, thanks a lot. That really helps.
I've gotten the suggestion to use a boost converter on the 2v supply instead, to boost it to 3v3 and simply not use the USB supply at all. I'm still anxious about connecting VDDUSB to 2v and accidentally leaving the peripheral on and breaking something, but using a boost converter sounds a bit overkill, so I'm not sure.

>> No.2455961

Mega noob here. I am building a compact digital typewriter with an 6" e-ink screen and a reduced 52 key keyboard from scratch. I'm planing on soldering by hand the keyboard matrix, have already drawn the diagram on paper. For the switches I was thinking either Cherry MX red low profile or Keychron low profile. For the keyboard controller I've chosen an Arduino nano, Just because I have one laying around and because there are already projects using it with pinout and connections worked out. The "CPU" is going to communicate with the nano through I2C and with the display through SPI (both have good documented examples on the internet).
That being said, I need an actual CPU. I have a couple of Seeeduino Xiao with ESP32 256KB flash and 32KB SRAM that I could use. Since e-ink retains the image after it's been drawn I don't need a framebuffer or better said I can on-the-fly render the individual characters and keep only the text buffer in RAM.
So the question number one is: is the aforementioned MCU going to cut it as a glorified notepad.exe (or rather edit.exe if you remember the DOS era)?
The second question is, I have read that one can daisy-chain SPI devices. What's the most sane solution for the external storage? A couple of MB of extension RAM (max 4-8 MB) in SPI and then a slave screen (or better yet MCU->SPI(display)->SPI(RAM)? Getting eMMC to work seems too much hassle with incosistent results, so an SD card seems better...
Finally, I suck at /ohm/. To be able to carry it around, and not rely on the USB cable for power, I thought of having a single 18850 battery to power the thing for days. So I need a voltage regulator or two (the majority of electronic operates on 3.3V, some bigger e-ink displays need 5V). There would be enough place for two or three of the 18850's, is it a good approach to set them in series and use a cascading voltage regulator (2x3,7V->5V->3.3V)? My worries are voltage imbalances, if I was to charge them through USB port.

>> No.2455966

>>2455953
PWM works by having a counter looping from 0 to some value, and using a digital comparator to compare that changing n-bit number to some preset value. So if you just have one counter but 16 digital comparators, each with their own value register, you could do different PWM for 16 different pins. But I'm fairly sure that isn't the case. Going to the 16-bit Timer/Counter1 section of the datasheet, and scrolling to the Register Description, there's only 2 compare registers. So it can't be done. The same applies to the 8-bit Timer/Counter2.

Not like you can't bit-bang it though, if you don't have anything else to spend CPU time on. I'd still have the timer looping and use it as the independant variable that the PWM variables are based off.
>updating them all at the same time
Better be writing PORTB = 0bxxxxxxxx

>>2455955
Yeah I think that might be PWM. I'd advise buying or making a small DAC. Either way, going through the process of manually addressing the timer hardware registers and reading the datasheet to understand how to do that should give you a better understanding of what's actually going on.

>>2455957
>to boost it to 3v3 and simply not use the USB supply at all
That's another option, but if it's meant to be a low-power circuit you may find the booster's quiescent current unacceptable. Capacitive charge-pump converters may be better in that regard. Either way you drain the battery while the USB is plugged in, which may or may not make a significant difference to lifetime. If it's a rechargeable battery, I'd want to wire up a charging circuit from the USB (TP4056 anyone?).
>I'm still anxious about connecting VDDUSB to 2v
Worst thing that can happen is 5V destroying your battery, so at least the computer will be fine. But that's what the diode/PFET circuit is for. Test it with two FETs, some batteries, and a dummy load just to be sure there's no problem.

>> No.2455991

>>2455961
OP herw. The powering part seems to have been settled. https://www.instructables.com/Small-Format-Arduino-Nano-With-USB-Charging-Circui/

>> No.2456004

>>2455043
>MCUs don’t get old, they’re all built on 15-20 year old designs anyhow.
are you retarded?

>> No.2456005

>>2455785
>ESP8266
Yeah I know. I ordered a 16MB pi pico variant, and going to order an ESP32 board too. Was more curious as to being able to say “look what I made out of Commodre 64 parts basically”. Also curious about having more storage and memory for programs on an 8-bit. Have seen some chips with 128kb flash and 6kb sram and wondered why no dev boards.

Currently using a few arduino nano’s which I like and figure I might run into space issues. Atm going to try and make a flight controller (plane/wing nit a quad) out of one, make it simple and concise and run in the most basic hardware, that then could really run on anything, 8502 or Z80 based would be cool too, something you could almost cobble together out of junk/electronic landfill or stuff you old electronics you can find at 2nd hand/op shops.

Depends how much stuff I can get running on a nano. I might use transistors to switch between serial devices, receiver, gyro, GPS, barometer.

There’s the arduino nano every, with more flash and SRAM and support for more serial devices, but seems like far less commonly accessible hardware, no clones etc.

>> No.2456007

>>2455751
this circuit will backfeed the battery with 3.3V and kill it

>> No.2456008

>>2455869
Something like a BN220? Same way as you hook up to a flight controller. I believe it’s be UART from memory. Remember they have to be antenna side pointed up and outside and it may take quite a while the first time you use it for it to work and figure out where it is, then it’ll start picking up satellites.

>> No.2456017
File: 20 KB, 290x320, c6cpl.jpg [View same] [iqdb] [saucenao] [google]
2456017

I need some boards, but only aliexpress has them available for me. Should I trust the chinese, or will they send me literal mercury and lead.

>> No.2456022

>>2456017
I got some boards from there before why

>> No.2456060
File: 795 KB, 1586x1683, F06DA67A-0235-407C-BC5E-D69C9D455D1C.jpg [View same] [iqdb] [saucenao] [google]
2456060

So I had an idea of attempting to port inav to rp2040 and esp32, and then I found this cheap board… which is a Cortex M4 and might be a straight port and bills itself as STM32 compatible

>> No.2456061
File: 686 KB, 1506x1431, F210DE5D-8F0C-4136-B28D-B600A2E666C3.jpg [View same] [iqdb] [saucenao] [google]
2456061

>>2456060

>> No.2456102

>>2456060
It has "Falsh"!

>> No.2456153
File: 21 KB, 1412x729, 1658604366273.png [View same] [iqdb] [saucenao] [google]
2456153

>>2455966
Thanks anon, here's hoping I'm not doing something incredibly retarded. Don't have the tools to test it right now, so I'll make sure I have a backup plan when my board arrives and this idea doesn't work.

>> No.2456192

>>2456022
I'm just a little cautious about those little creatures, the standards are a bit iffy there but does it really matter with these things? I know plasticstuff like mounts or cases are a big no.

>> No.2456260

>>2456007
See, I knew there was something wrong with this. Thanks for letting me know, anon, I'll look for a different solution.

>> No.2456324

>>2456004
Can't blame him when all anyone ever talks about is arduino, atmega328's, esp or PIC's.
I have yet to see anyone here discuss arm M33 micros or anything made in the last 5-10 years

>> No.2456450

>>2456017
Anon, I have bought from multiple stores on there and was always sent what I bought, recently though some BMS didn't show up and was able to get a refund. I don't just buy from anywhere though, the places I have bought were these stores, and never got screwed over.

>all goods are free shipping
>https://greatzt.aliexpress.com/store/1101131833

>TZT Official store
>https://tzt2347088.aliexpress.com/store/1101215354

>Wavgat
>https://wavgat.aliexpress.com/store/1101169940

>Great IT Electronic components
>https://www.aliexpress.com/store/1101199632

>tenstar robot great wall
>https://tenstar.aliexpress.com/store/1100672150


The store I stick to the most is all goods are free shipping, the rest use to have free shipping after X amount, which is perfect for me, if you don't plan to bulk purchase all goods are free shipping might be your best bet, assuming they have the boards you want. I just got a package last week, and my next one is coming on the 31st.

>> No.2456480

>>2456004
>>2456324
Don't take me out of context, he was talking about getting microcontroller dev-boards for kids. He hardly needs 32-bit multi-core micros with USB hosting. Caring about what's "new" is objectively a bad idea when you care about getting something with a mature and intuitive toolchain, for which the Arduino IDE isn't actually too bad at.

>>2456007
Oh fuck

>>2456153
I don't think that works, pretty sure the 2nd PMOS will turn on when VDDUSB is disconnected, putting a negative voltage across the 3.3V linear regulator. Also you can't put 2V into a linear regulator and have it output 2V too, there's a minimum dropout.

>> No.2456629
File: 21 KB, 1415x598, 1634934855889.png [View same] [iqdb] [saucenao] [google]
2456629

>>2456480
>I don't think that works
Yeah you're right, and I probably went a little overboard with this. I should just grab a buck-boost converter.

>> No.2456699

>>2440483
Is there any method of modding rubber domes so they have a linear feel?

>> No.2456796

https://www.youtube.com/watch?v=4Fy9bZEufx0
It's over, they are weaponizing capacitors now

>> No.2456810

>>2456629
You could add a comparator or 2 BJTs and some passives in order to turn the FETs into proper diodes that can handle nonzero voltages at either side. The only issue is doing so may increase quiescent current.

There a reason you’re trying to use a 2V regulator?

>> No.2456818

>>2456480
To be fair, I do agree that newcomers would be better off starting on a 20-yo microcontroller design, as it is considerably easier to get started with.
You literally need to set 3-4 registers to get something to work, as opposed to something modern, where you have to read through thousands of pages of reference manuals just to get a couple of peripheral units working.
Arduino is shit though. The level of abstraction is just right to keep the users at the very peak of the dunning-kruger curve.

>> No.2456832

I'm trying to learn how to use the stm32 and stm32HAL. It's very, very confusing and I feel like I'm approaching it from the wrong angle.

I took an embedded programming course this past summer, and we used the msp430fr6989. It was an intuitive breeze to program. A single header for the board, mask and write bits to a register in order to configure things, and then let it rip in the IDE. A peek at the family user's guide here, a poke at the datasheet there, and it just worked. It felt like I was writing programs for a normal computer almost.

The stm32HAL, on the other hand, comes out swinging like a bat out of hell. It almost feels like I'm back on arduino where I can only do what the HAL lets me, and if I try and configure around it, it'll get very mad and implode on itself.
Am I able to use the stm32 and stm32HAL as I used the msp430? Just simple C files and header files?

>> No.2456861
File: 205 KB, 959x774, file.png [View same] [iqdb] [saucenao] [google]
2456861

/mcg/bros I have a question. I'm taking this course on micro and I was told by my friends that the language is in assembly "but also not assembly", I've provided a picture of the instructions and can someone tell me what it is so I can start studying for it? I have no clue what they're talking about because this is my first time dealing with this type of stuff. It's for the PIC18F452 Microcontroller.

>> No.2456894

>>2456861
>PIC
Fucking elder runes
>BANKED
For an intro to anything involving programming, one of the crappiest successful architectures with bank switching is not a good choice. Programming a fucking Arduino in assembly language would be much saner, and there are millions of them. The only ever good thing about PIC was its hardware units. They were fucking awesome... twenty years ago.
Do you know why people program PIC in assembly language? Because its assembly language sucks too much to use with a proper high-level language.

>> No.2456954

>>2456818
Yeah, arduino is great for getting started but it’s too hard to migrate out of it. Even VScode and platformIO is so far removed from the convenience of Arduino that it’s night and day. If I were able to influence the direction of Arduino, I’d add a pathway out of there. Tutorials on direct register manipulation, writing your own libraries, writing efficient code even. Add the ability to use main.c instead of whatever is going on with the auto-grabbing of loop() and such into the actual main.c. I’d turn it into a platform for MCU programming AND DEBUGGING that you could easily use with an external text editor.

>> No.2457128

What processors do old basic calculators use (no scientific functions) that you can find for like $1 in op shops?

Or, what's the best bet for salvaging processors from garbage and cobbling together a MCU onto a prototype board or something?

>> No.2457132

>>2456861
Yeah this is essentially assembly, but of course assembly is different for different architectures. But the principles are the same.
>>2456894
Brainlet cope lol pic is god. Arduino in assembly? How would you do that since arduino is a high level architecture? You mean an avr? Yeah of course you can those are the main two classic options to start with. Avr is arguably better because compiling and programming are free and open, not some retard shit about banking lol.
If you want to learn asm you need to understand the processor, that's literally the point, so whinging and moaning about its layout is stupid.

>> No.2457139

>>2457132
>How would you do that since arduino is a high level architecture?
Arduino the fucking board you nitpicking mong. Yes, AVR.
And if you're trying to teach someone to program, don't shit in the waters with crap like having to keep track of shit like banked registers.

>> No.2457152
File: 1.08 MB, 1668x1575, DC11BA03-FEFE-4C45-A663-3B024EC7C65B.jpg [View same] [iqdb] [saucenao] [google]
2457152

Has anyone seen this dual mcu board before? Seems quite odd

>> No.2457180

>>2457128
Basically any shitty 8-bit jobbie that you can actually reprogram will work for simple calculations. It’s all bottom-tier micros are good for. A bunch of shit probably has flash locked and unreadable for intellectual property reasons, though there are obscure ways around that. You’ll also need to desolder it, so you’d better have hot-air available.
I’d look towards things that won’t have a special purpose controller in them, which these days is almost everything. Low-ish volume things that have a small amount of digital stuff in them. Maybe an FM radio transmitter or receiver? They’ll have something digital for selecting the station, may well be done via I2C from an MCU that handles the buttons. Something too cheap may just have a blob on board though. Or an OTP Paduak.

>>2457152
That is strange. I’d have thought it was just using the ESP for wifi, but it’s fully individually programmable and can be used separately depending on the USB C orientation.

I’m a mini-B kinda guy.

>> No.2457181

>>2457152
Nothing really odd... Your laptop is like that.

>> No.2457190

>>2457181
My laptop has an i7 4720hq… it doesn’t have two different types of CPUs from two different manufacturers side by side that can be used at the same time.

>> No.2457198

>>2457190
It does. You have cpu from Intel, ec controller from idk who...

>> No.2457234

>>2457198
No, it isn’t anything like that. It’s a dual mcu board. Both the ESP32 and RP2040 are both the cpu, programmable by the user. There is no laptop with both a x86 and PowerPC cpu that are both individually programmable.

>> No.2457271

>>2457234
What that anon is trying to get into is that your laptop has several ARM, PIC and who knows what else cores embedded in various parts of the hardware. These all have their own flash storage and memory embedded in them, sure, and they're insanely hard to reprogram too, sure (although you often can), but having different cores to handle different tasks in a system that are only interconnected by some IO like SPI or UART, isn't much different from this setup where you have two microcontrollers with different capabilities interconnect to handle different tasks. I'm sure the intention here is to have the rp2040 handle the main logic while the ESP handles the wifi. Hell, the ESP8266 *started out* as a non-reprogrammable wifi module you could control with a different microcontroller to handle wifi, until people figured out how to reprogram and use it standalone. Other well-known examples of this include for example the ARM Broadcom chip embedded in the Wii's GPU, which received firmware updates and only handled encryption, but wasn't ever meant to run the main OS but was programmable by Nintendo.

>> No.2457277

>>2457271 (Me)
Also daily reminder that a lot of drivers upload code to the respective controllers upon bootup, or contain firmware to update these controllers with, sometimes requiring a reboot. Good examples recently being the USB-C firmware updates on various laptops.

>> No.2457296

>>2457128
It's been the same circuit for over 30 years. There is no way to reprogram the really cheap shit, they don't even put it in a chip package any more, just stitch the raw chip to the board and blob it down.
As a general rule, the cheaper it is, the less likely you can use the parts for anything.

>> No.2457468

>>2457139
Arduino is an ecosystem there is no such thing as an arduino, not really. if you meant the avr on a board you should have said, some of the kits have different hardware architectures.
There is nothing wrong with learning about banked or paged datasets. Do you struggle with it? It's a fairly simple concept, it might seem like an outdated relic but it's not any more difficult to understand than any peripheral register or external comms for example. I dont know what your big fuss is about? I think it's nice to close the loop and show how asm relates to byte code and showing some of the issues like banking registers is just part of that.

>> No.2457628

>>2457468
>if you meant the avr on a board you should have said, some of the kits have different hardware architectures.
ok reddit

>> No.2458037

I want to add capability for OTA firmware updates to an ESP32-C3. Espressif's example has me run a server hosting firmware on my computer which the ESP32 checks at boot. This seems backwards, as I want to be able to push firmware, not have to run a server on my computer. It looks like this tutorial does what I want but it's the usual cobbled-together solution by a random Indian and I can't tell if it has a lot of backing. Is there a more standard way of doing what I want?

>> No.2458038

>>2458037
Forgot the link
https://randomnerdtutorials.com/esp32-over-the-air-ota-programming/

>> No.2458053

>>2458037
esp32 probably has bluetooth OTA?
In that you would command the device to go into bootloader somehow and then it would broadcast the BLE OTA service.
At least that's how we did it with nrf52832.

>> No.2458461
File: 578 KB, 496x856, AS7265x_IM000287_1-00.png [View same] [iqdb] [saucenao] [google]
2458461

Hi, I was soldering some LEDs to some sensor dev board and the 3.3 volt regulator responsible of powering the logic is now outputting 1.8 V, respite having a resistance to ground of 9kOhm.

My soldering station isn't grounded and I fear the induced voltages might've killed the regulator, since visually the board looks ok, no solder bridges or anything.

The regulator is an AS1364, and it seems to be obsolote almost everywhere. Can I just bodge it with a 1117 3.3 volts regulator? Thx.

>> No.2458476

>>2458461
Are the LEDs running off the 3.3V rail? If so you may be drawing too much current. You may have overheated it when soldering either way, where did you solder to? I don't think induced voltages would damage it.

>Can I just bodge it with a 1117 3.3 volts regulator
Well it will look like shit if you don't find a regulator with the same footprint, which you can probably do on Octopart without too much difficulty. More importantly is whether the voltage dropout is acceptable.

>> No.2458478

looks frens, cheap dof camera for rpi
https://www.kickstarter.com/projects/arducam/time-of-flight-tof-camera-for-raspberry-pi

>> No.2458832

Is there such thing as a quality breadboard? I bought some on aliexpress, and alot of times there is no friction when I put parts in or when I put a jumper wire in they come right out I hate these fucking jumper wires and the pvc insulation no matter how I bend the wire it goes lol no fren and goes back to original form and popping out the bread board and catch on everything in its path.

>> No.2458837

>>2458832
Yes there are, I think Ben Eater may sell some decent ones on his store, or otherwise refers to decent breadboards in a video.
Also as for jumpers, use 28awg solid core wire instead. Looks way nicer and you don't have springy wires causing issues.

>> No.2458891

>>2458837
Do you happen to have a link to solid core wire? I think I came across some solid core wire that weren't tinned on aliexpress but I end up not buying any.

>> No.2458900
File: 552 KB, 447x641, Byte 1975-11 p6.png [View same] [iqdb] [saucenao] [google]
2458900

>>2458837
>28awg solid core wire
If you look at ads for solderless breadboards back in the late 70s, the proper wire gauge is 22awg solid. Yes I know cheap-ass chink resistors have a lot thinner wire these days, but that doesn't make it right. 22 gauge is the only stuff you can be sure of, because that's what they were designed for.
Cat5 solid wire is 24 gauge, it's sort of okay, but 28? I use 30awg wrap wire for bodge wires. 28ga in a solderless breadboard is just begging for shit to flake out on you when the metal fingers wear out. If you use that shit, don't blame the breadboard, blame your own sorry cheap ass for using that gay wire.
If you're going to be cheap, at least find some cat5 solid. (that's the stuff that goes in the walls)

>> No.2458904

>>2458891
I'd advise the tinned stuff. Untinned can't be reused for quite as long since human fingers on the copper oxidises it and makes worse contact with the breadboard. No link, I got mine locally untinned, but I recall that my maker space had tinned stuff that was perfect for breadboards, and I think they got all their shit from aliexpress.

>>2458900
>22awg
Ah must have misremembered. 28awg is one of my spools for winding inductors, and yeah it's definitely too thin.

>> No.2458916

>>2458904
I've been using some of the same wires for decades. The oxidation on browned copper hasn't had any adverse effect for me.
But I have some telephone breakout boxes in my neighborhood where they leave the scrap wires on the ground, and it's all 22 solid. For some reason it's mostly black/yellow and sometimes blue/purple. Very rarely is it any other color. But it is free, so there. I just did my rounds to the nearest two boxes and found a few feet of wire.
>28awg is one of my spools for winding inductors
It's a very nice gauge for that purpose.

>> No.2458925

>>2458916
The blue/purple is probably for new vdsl installs. Black yellow is old school/pots

>> No.2458953

>>2458900
alot of jumper wires on amazon and ali use 28awg, its not about being cheap I just dont know any better since thats all I see when searching for dupont jumpers.

>> No.2458954

>>2458904
>I'd advise the tinned stuff

Sorry, I mean stranded wire with tinned tip, not precut for breadboards.

>> No.2458975
File: 52 KB, 480x320, proxy-image.jpg [View same] [iqdb] [saucenao] [google]
2458975

>>2458953
If they're dedicated jumper wires with crimped on connectors, it doesn't matte what thickness the wire itself is. Pic related are the solid core 22ga jumper wires I'm talking about.

>>2458954
Oh. To be honest I think cheap dupont jumpers might be aluminium, not tinned anything. Otherwise they're tinned mild steel.

>> No.2458995

>>2458975
It's also good to have 0.1" and 0.2" U-bends of bare copper.
And I hate those male jumpers, the "regular" ones are bad enough, but there's also some out there with cheap crimped metal for the pins.
If I want to connect to something external, I'll use a female jumper and a single header pin as a gender changer. I also save the multi-pin header plastics from old junked PCs when I find them, and use a straight pin to pop the wires out and mix them the way I need.

>> No.2459019

>>2458975
baka I didn't specify dupont jumpers, the duponts themselves have barely any friction when placing them in breadboards, some parts of the rail it has a nice grip, others its like nothing, at times if I use a dupont jumper on same rail with something else, I'll shove dupont in the same hole to get a tight fit.

I may just say fuck it buy solid core wire on ali if I can find it, and just do shit like in your pic.

>> No.2459020

>>2458975
>Oh. To be honest I think cheap dupont jumpers might be aluminium, not tinned anything. Otherwise they're tinned mild steel.

I am all over the place tonight, the tinned wire I was talking about, it was a misleading ad on aliexpress, when I was looking around for solid core, they would list "solid core for breadboard" and when you look at the pics and reviews its just stranded wire with solder tinned on the ends. I hope that clears that up.

>> No.2459023

>>2459020
>its just stranded wire with solder tinned on the ends
Yuck.

>> No.2459056
File: 140 KB, 1687x748, 1662050995069.jpg [View same] [iqdb] [saucenao] [google]
2459056

whats the smallest and cheapest way to build my dream project?

>> No.2459066

>>2459056
You can make extremely small sirens for very cheap as for actually being able to have it scream "NIGGERS!" I have no idea I've never made anything that plays actual audio and not just screeching noises

>> No.2459071

>>2459056
isd1820 module with lm386 amplifier? might be able to add a bigger speaker than the 8ohm 5w ones that usually come with them.

>> No.2459074

>>2459071
Not bad anon, now i just need to figure a way to delay the playback activation for at least 10 secs or soemthing
gonna deliver results in two or three weeks

>> No.2459078

>>2459056
Do you plan to leave it somewhere or something? Otherwise just get a cheap bluetooth speaker and play it on loop from your phone or something

>> No.2459081

>>2459078
I was planning to use chewing gum to stick it under the front bus seats and watch the niggers and people reactions, so of course i want it to be cheap and hard to find by the naked eye

>> No.2459092

>>2459081
lol sounds cool, better record their reactions

>> No.2459097

>>2459056
Stealing your idea

>> No.2459099
File: 3.08 MB, 4624x3472, IMG_20220902_153601.jpg [View same] [iqdb] [saucenao] [google]
2459099

>>2457180
>>2457296
So after browsing local second store again, there's a few things that catch my eye, old radio cassette walkmans and casette radio recorders, telephones with LCD display. Old $2 digital cameras. Etc. Pic related

>> No.2459125

>>2459099
I suspect old telephones like that use mass-produced special-purpose ICs for display driving and remembering keypresses, though I can't be sure. Anything with cassettes are purely analogue, likely won't have much digital in them, especially not in the 80s, but 90s models may be worth a try. Digital cameras may be more promising.

t. never taken apart old thrift store junk

>> No.2459208
File: 40 KB, 741x333, lcd-screen.jpg [View same] [iqdb] [saucenao] [google]
2459208

>>2459099
>>2459125
I mean it's fun to take shit apart, just don't pay actual money for that junk. Basically anything with an LCD that isn't the standard 14-pin text display is likely to be COMPLETELY USELESS.
Best is free, when people leave shit on the curb for bulk item collection. There's nothing like the fun of taking apart an old ink jet printer and having it pee ink on your leg. Just don't expect anything useful other than a few cheap switches.

>> No.2459212

>>2459208
all about them motors and magnets

>> No.2459254

Can somebody explain to me how adc gain is calculated?
Say the scale from 0.0v to 3.0v.
Using 12bit resolution 0 to 4095.

Gain 1, result in mV
measured_value * 3000 / 4095

So if I set the gain to 4 what happens?
The measured values are smaller and so I need to to multiply it to get to 0-3.0v scale.
measured_value * 4 * 3000 / 4095
Did I understand correctly?
What's the point of the gain?

>> No.2459442

>>2459254
The point of the gain is to shift the range of the input. It’s presumably an analogue amplifier inside the unit that sits before the ADC. The best signal to noise ratio is obtained when the input signal is almost clipping the bounds of the ADC. If you have a low amplitude signal you can increase the ADC’s gain so you can get maximum SNR without having to put an external amplifier stage.

If it was just a digital multiplier afterwards, arguably it could be useful for normalisation without having to waste clock cycles, as multiplying an ADC value by a constant is reasonably common. But I think it’s the analogue thing.

>> No.2459627
File: 618 KB, 762x992, file.png [View same] [iqdb] [saucenao] [google]
2459627

>>2440483
> Anon is an engineering student from Mexico
> He makes a clock with a 7-segment display, decides to upload a picture of his clock to facebook.
> Anon also buys a plant to give as a gift to a chick
> He brings both to his college
> A feminist saw the day before on facebook her of his clock, but she doesn't know what it is, she claims it's a bomb.
> Feminists at his university call him a terrorist for bringing a bomb to campus

>> No.2459629
File: 1.78 MB, 1526x846, file.png [View same] [iqdb] [saucenao] [google]
2459629

>>2459627
> A feminist says that the bomb is inside the flower pot he bought.
> The authorities are alerted, helicopters start flying over the campus, the army arrives and journalists start broadcasting live.
> Anon has no idea what is going on or what he should do, he has autism, he is just scared and doesn't know how to respond.
> The bomb squad confirms that there was no bomb in the plant and neither was the clock a bomb.
> The feminist are not happy about this.
> The university gives in and decides that his bad behavior, by alerting the army, led to his expulsion from school.
> The feminist are not happy with this.
> The government sentences him to 30 years in prison and a fine of around 334,000 dollars.

we made it r*ddit

https://www.eluniversal.com.mx/metropoli/edomex/proceso-estudiante-que-amenazo-con-bomba-en-la-fes-aragon

>> No.2459673

>>2459629
is incredible how much damage two brain cells can cause
i mean i dont blame them they literally evolutioned to literal walking onaholes

>> No.2459720

>>2441804
Sane people use stm32 with VS code, GCC for arm cortex-m microcontrollers, OpenOCD with gdb for debugging and libopenCM3 as a library

>> No.2459724

>>2459720
>libopenCM3
lgpl3... can't use it at work

>> No.2459726

>>2459724
ofc, at work you're gonna use the vendor shitty libs or make your own

>> No.2459733
File: 331 KB, 1024x1018, wirelessComs.jpg [View same] [iqdb] [saucenao] [google]
2459733

Made this when the war in ukraine kicked off.
It allows me and my gf to text each other via 433mHz. You simply connect your phone to the Blutooth module, open the app I wrote and send text messages to each other.

It works fine but was made in a hurry.

>> No.2459795

>>2459629
The article makes multiple references to the guy explicitly telling people the school would explode. This isn't another ahmed mohammed incident.

>> No.2459877

>>2459733
Anon, I have those same 18650 battery holder, how did you secure it to the protoboard? I have the kind that also through hole, but the tabs are to big to go through the proto board soldering holes.

Also is the communication secure? Hows the range?

>> No.2459880

>>2459877
not him but i just stick zipties on them, create holes where necessary

>> No.2459940

>>2459733
what's the range?

>> No.2459956

>>2459733
Do you live in Ukraine? I’d have gone for LoRa, but maybe the range from that’s fine. Do any encryption? Looks like you’ve got an on-switch, but personally I’d have designed them to run at low-power standby for listening to comms constantly. I’d think you’d be able to get he quiescent current down to a hundred microamps or so, though you’d have to ditch the SMPS and the power LED.

Also make stand-off feet so it’s not resting on wires.

>> No.2460005

>>2458476
The LEDs ran from the 5 volt USB rail. Turns out the regulator was indeed at fault so I solderded a 1117 with a couple wires, doesn't looks as good, but the baord works as intended. And yeah, I suspect my soldering iron killed the regulator, since it isn't grounded and the floating voltage can be quite high. Combine that with touching the board while soldering and you can kill the components, since I only soldered the LEDs and the regulator should've not been affected.
I tried to find the same exact regulator but it comes from the same manufacturer as the sensors and it's quite rare, they stopped it producing it like four years ago and can't be found anywhere else.
Thanks fo the reply anyways.

>> No.2460239

>>2440487
I would go for a RPi Zero W or RPi Zero 2 W. The former is available new for 15 bucks, the latter for 40.

>> No.2460242

I'm trying to control a mecanum wheeled RC car
My idea is to have an Arduino read the receiver pwm, calculate the components for each wheel and then control the motors accordingly
Problem is I've ran out of pins
Any suggestions pls?

>> No.2460540

>>2460242
What are you using all the pins for? Post schematic.

>> No.2460562

>>2460540
>Schematics
Nigga please
I'm running out of pwm pins for 4ESCs and servos

>> No.2460573

>>2460562
An arduino has like 26 usable pins man
you can always multiplex outputs using SIPO or inputs using POSI shift registers, speed shouldn't be an issue

>> No.2460589

>>2460573
It's a smaller one and only a few of the pins are marked as pwm
I need to read 6 channels and output at least 4

>> No.2460649

>>2460589
Just bit-bang the PWM instead. You can run interrupts off the timer to toggle any old I/O pin.

>> No.2460877

>>2460649
you can only have so many compare register values at a time
youd have to do it without interrupts

>> No.2460916

>>2440483
So, I've been struggling to get my 64x48 oled and mlx90614 working at the same time.

The code I wrote is -#include <Arduino.h>
#include <Wire.h>
#include <i2cdetect.h>

#include <Adafruit_MLX90614.h>

#include <U8x8lib.h>

U8X8_SSD1306_64X48_ER_HW_I2C u8x8(U8X8_PIN_NONE);
Adafruit_MLX90614 mlx = Adafruit_MLX90614();

void setup() {
Wire.begin();
Serial.begin(9600);
Serial.println("i2cdetect example\n");
Serial.print("Scanning address range 0x03-0x77\n\n");


i2cdetect(); // default range from 0x03 to 0x77
delay(2000);
mlx.begin();
i2cdetect(); // default range from 0x03 to 0x77
delay(2000);
u8x8.begin();
i2cdetect(); // default range from 0x03 to 0x77
delay(2000);
}


void loop() {

}
The problem is, after u8x8 is initialized, the mlx90614 stops getting detected

>> No.2460919

>>2460916
Forgot to tell that it works on arduino nano but not esp12e

>> No.2460938

I'm trying to make my an RGB LED fade red, fade green, fade blue. This is the hardest, most frustrating thing I've ever encountered in my entire life. I really don't think this hobby is for me. A long time ago I found some elses code that you could just specify an RGB value and it would fade to it but now google wants to play dumb and only recommend how to attach the wires.

>> No.2460940

>>2460938
isnt RGB LED dependent on the voltage? you want to manipulate the value of output to match your desired colors

>> No.2460944
File: 701 KB, 1200x910, 1662123310136641.jpg [View same] [iqdb] [saucenao] [google]
2460944

any tips/guides/tutorials on batteries? I need to remotely power a raspberry pico.
Normally it requires 5v, so i would need at least 4x 1,5v batteries with voltage regulator, right?
But how do i know that it's fine? I want to do some math before buying anything, but I have no clue where to start

>> No.2460945

>>2460916
I’d bet there’s some funky shit going on with interrupts being used by both functions causing conflicts. Also maybe interrupts being used by that i2cdetect function, though I doubt it. Write your own instead of copying chang’s shitty library is what I’d do, also check through the .h files to see if there are obvious conflicts and use them to idiot-check your code.

>>2460938
Is it an LED with three seperate cathode or anode pins for seperate PWM signals, or is it one of those individually addressable guys with internal digital circuitry like a WS2812? What are you sending he signals with? Do you have a mathematical description of how you want the duty-cycles of each colour to change with respect to time?

>> No.2460949

>>2460940
I have everything up and running, each RGB pin is a value 0-255. I can specify each color manually but I don't know how to write code to tell it to fade in between to get there smoothly. Ideally I just want to tell it go to (255, 255, 255) then delay however long, then fade to (0,0,0), etc. But it's way too hard.

>> No.2460950 [DELETED] 

>>2460944
Most good regulators have more than a volt and a half of drop-out, so you need 6.5 v or more. Id go for 5 AA batts or an E batt. If you don't mind getting 9v in.

>> No.2460954

>>2460949
check out official arduino documentation, Im pretty sure there's a guid exactly for your case. Basically you want to know how should your RGB fade in and out. Draw a graph of how should the output change in time. Your code should consist of: change state to HIGH, wait X seconds, change state to LOW, change value of colors, wait Y seconds; and repeat

>> No.2460955

>>2460944
Mate you can power the pi pico via VSYS at anything from 1.8V to 5.5V since it has a built in buck-boost converter. So you could use two or three AAs with no regulator.
t. just googled it

>>2460949
How about:
int x = 0;
int inc = 1;

analogWrite(pin5, x):
x += inc;

Then you could do something like
if (x == 255) {inc = -1;}
if (x == 0) {inc = 1;}
To get a nice triangle wave, otherwise it will just overflow and make a sawtooth wave. Syntax allowing. Note that a linear trend ends up looking pretty nonlinear to our logarithmic eyes (1-to-2 is twice as bright, while 254-to-255 is imperceptibly different) so you may want to mess about with exponentials or quadratics or whatever to make it look better.

>>2460954
I forget, do common arduinos have the capability to PWM 3 outputs at once? Or do they have to bit-bang them?

>> No.2460958

>>2460955
i have no idea what buck-boost converter is, that why I asked for a guide, thanks for the tip tho

>> No.2461036

>>2460958
>buck-boost converter
it's a type of power supply, ask /ohm/ about it

>> No.2461058

Im a newb at Arduino and I have a Samsung phone which I no longer use. I was thinking of tearing it apart for some components like microphone or speakers, but more importantly- cameras. Does anyone know if they will work together with Arduino though? Is there a way I can find it out? I heard that Arduino requires 'serial communication' to its components, is there any way to check if a given component is 'serial'?

>> No.2461234

>>2460242
>My idea is to have an Arduino read the receiver pwm, calculate the components for each wheel and then control the motors accordingly
Just use the arduino be the receiver too and put a wireless module (or use an arduino compatible with built in radio) to control remotely

>> No.2461237

>>2460919
Arduino is a glorified HAL library for portability.
if the same code works on one MCU but not another the issue lies in the lower level i2c implementation.
Compare outputs with a logic analyser and find the difference.

>> No.2461250

>>2461058
The camera will speak some sort of protocol, likely not purely serial but using multiple data lanes. You’ll need to find a data sheet for it to be sure what protocol it’s using and whether your microcontroller can read it at sufficient speed. The camera part number may be written on it, if not you may be able to find it on a site like GSM arena.

>> No.2461997
File: 19 KB, 456x423, keyboard.png [View same] [iqdb] [saucenao] [google]
2461997

>use RPi2040 to open rickroll upon plugging into PC
>really excited to try it out on someones else PC
>hand it over to a friend
>picrel
It's not fair bros

>> No.2462089

>>2461997
RIP, I just coded my RGBduino to play megalovania through the built-in buzzer.

>> No.2462344

>>2461234
Yup, it's what I figured out would be easiest

>> No.2462416

>>2440947
>The place is a shit pit.
I agree. It sometimes has it's moments (some days ago an anon looked into that keyboard that used lasers to project the keys, and it was kinda cool), but usually it's a consoomer shithole, shilling the latest iPhone, the latest wincuck laptop, or shilling shit distros for le heckin geymin.

>> No.2462818

I am making my own custom board for my project. In terms of minimizing dev pain. Am I better off going with somthing STM32 or something like atmel SAMD? Yeah, cubeIDE is complete shit but like, but I feel like ST has way more documentation than Atmel does. I'm still using the Arduino framework now and I want to start off fresh using something like libopencm3. or maybe just write my own libraries using the HAL or something, but one thing is for sure, I'm sticking to VS code. Both ST and atmel have equally shit software imo.

>> No.2463037

>>2459629
what a fucking joke. fuck the government. he may have not detonated a bomb, but I will

>> No.2463370

>>2462818
use zephyr, supports both platforms.