Previous thread:>>xxxxxxxHere we discuss microcontrollers (MCUs), single board computers (SBCs), and their accessories, such as Atmel mega and tiny AVRs (Arduinos), PICs, ARM boards such as blue/black pill STM32, ESP8266/32s, RP2040, Raspberry Pi, and others.For general electronics questions (power supplies, level shifting, motor driving, etc.) please ask /ohm/.>where can I find verified quality microcontrollers and other electronic sensors or partsdigikey.commouser.comarrow.comnewark.com>but that's too expensivealiexpress.com (many parts here are fake, particularly specific parts out of stock in the above sites)lcsc.com>I need a part that does X and Y, with Z specifications. How can I find it?use DigiKey's or Octopart'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>RISC-V microcontroller list:https://codeberg.org/20-100/Awesome_RISC-V/raw/branch/master/RISC-V_MCU_development_boards.pdf
actual previous thread: >>2774325
no interest anymore?
>>2803735I am interested but I am busy with a move, but I still lurk
>>2803735No. I quit embedded and took up gardening. I now think of snails as Arduino users. The day of the rake is coming for you.
>>2803735The autistic shithead brigade ruined this general long ago.
>>2803735I successfully managed to avoid putting a microcontroller in my last two projects. Used relay logic for one, and an LM3914 in the other. Started work back on a BLDC driver though, I’ll need to mess around with 32-bit MCUs for the first time to get that working, so I’ll post about that in a month or so.At least we can keep the thread bumped with arduino hatred.
>>2802510I need to run 4 arduino input / output wires 50 yards. 5V going through them max, need no signal loss. Using CAT6 Ethernet cable atm. What are my other options?> waterproof> no signal loss without repeater bullshit> can be rolled up, stepped on, cows might shit on it
>>2804613What kind of current draw? If no power is needing to be transferred (i.e. there’s a power source at both ends), I’d want to add differential pair transceivers on each end, with termination resistors to keep the line impedance low. Like RS485 or whatever. That would use up all 8 wires in your cat cable. But if it works as-is then I probably wouldn’t worry about it. Run it through conduit if you want something stronger, or use that double layer insulated outdoor rated cat cable.
Have any of you successfully connected an ESP32 or nrf52840 that is emulating a keyboard to a PS4 console? I keep trying and it tells me it's not supported and then I change the vendor and product IDs and it gets me to pair it before it tells me that it's unsupported. Any advice on libraries or options?
Any of you fucks have experience with using rust (inb4 troon) on an esp32?
>>2804751What does that even mean? You want to compile and edit and run on the esp?If just run compiled, the existence of mrustc—turning your rust code into C—and using that would pretty much solve your problem.Then, once you have the resultant C code, delete the original rust code and maintain it C as you should have in the first place.
>>2804737I bet it doesn't like your report descriptor.And I am not going to help you with it because I haven't touched that shit in years.
>>2802510What’s OPs image? I see the pi, the arm, the sd and the leds plus the nip characters. Some kind of serial interface/led light chaser?Here’s mine latest. Paper speaker, lm386 and some 555s made baby’s first synth today. Worst speaker I ever heard and I cooked one timer trying to pull too much current when the amp didn’t work but it makes lights and sound and there’s only room for improvement.
>>2804871Hooking the fan up in place if that “speaker” would orobably sound better.
>>2804751Why would anyone want to use rust on embedded? I am not saying use C++, just use C
>>2805061Memory safety I guess, but all these examples of managing hardware (which are "singletons" to desktop brain damage programmers) with the retarded Rust ownership model makes me not want to take them seriously.
>>2804905I don’t see how? The pulses that drive the speaker wouldn’t be enough to get the fan going and spinning is not the same as oscillating. I do however have my eye on some audio exciters that should shake things up.
>>2805338No, but the fan doesn’t have to “go” it just has to vibrate and the blades act as the “cone”.This was an actual product from a few years ago, except it was an actual spinning fan that could impart the audio through the fan blades.>>2805086> memory safetyHeh, I see singletons as more of a new name to “global variables” but the cargo cultests follow the “globals are evil” doctrine without understanding how computers work.Embedded and microcontrollers bring you a lot closer to the computer. The C++ and Rust people are out of work theoreticians and neither one ever had any practical value except to be different and sell O’reilley nutshell books. And maybe for dummies books. That’s why they’re constantly adding and changing shit.If you want memory safety, look up MISRA C rules and valgrind. Ultimately, they’re just bugs, and it’s up to you to fix them by whatever means necessary.If you look through he gnu C standard library, like half of it is written in assembly to take advantage of SIMD anyway. Only works with long strings, the setup and checking sometimes takes like 100 clocks, so it’s worthless. Hopefully the compiler can figure out if it’s a “long haul” sized string or can fit in an m_128… oh it can’t? Well, so much for that.I dropped rust when I updated the compiler and it kept crashing. The compiler itself is written in rust. It’s worthless, and it told me so by dumping core.
Is it possible to make a somewhat useful computer with a P8X32A?
>>2805663>I dropped rust when I updated the compiler and it kept crashing.I bet that's because they use LLVM, a C++ project, to do the real work at code generation, and some API or ABI incompatibility got them.
I learned C intending to get into programming some stuff, but ended up using other dev environments instead. Is there much difference between regular C and embedded C, and can I use it on any old microcontroller? I'd love to give some electronics projects a try, since that kind of low level, simple programming looks like fun.
>>2806396theres not really any fundamental differences in syntax. however things like dynamic memory allocation, multithreading/processing, networking are just a few of the things that dont work out of the box on a mcu. instead those features are chip specifc and may use different function names and have other limitations
>>2806449To start with I'll only be doing basic shit like a light controller or a garden watering monitor. Is it possible to use assembly to program mcus as well? >instead those features are chip specifc and may use different function names and have other limitationsI guess as long as the documentation is good I'll be fine.
>>2804828Anon, I will give you the finest PP touch that a straight man can send over text if you at least point me in a direction that isn't "sucks to suck, faggot."
>>2806452Assembly is usually preferred on smaller mcus.You can almost always emit assembly code from your C code. Everything used to work that way until idiots became involved.Even microsoft C++ could do this and you could assemble the output it with masm. Up until 2016 or so, but then they said “the asm might not complie any more” … but the microsoft boat is adrift at sea with no captain and infested with pakleds.If you write it in assembly, and you gave trouble with something, sometimes it’s helpful to “cheat” and see how the compiler emits the code for it. Maybe you want to copy it verbatim, but more likely you can cut it down by two thirds… it’s a little chatty sometimes and does useless checking or saves registers you don’t care about.CISC cpus were more designed to be programmed in assembly, back when they cared about that stuff. RISC CPUs, not so much… this culminated in the Itainium, the ultimate expression of RISC and the futility of the endeavour. Thank god it never made it to the embedded arena but the lesson should be observed from a distance and learned from.
>>2806396Read a microcontroller datasheet to see what you might be getting yourself into. I recommend an older AVR like the popular ATmega328P. It has both assembly and C code examples, though I prefer how the later AVRs handle their I/O ports.The relevant assembly manual may also be useful, if just to see what instructions the part you've chosen has. Whether it can do hardware multiplication or division, floating point, etc. Whether it can bit-shift multiple bits at once, or just one at a time. Whether it has instructions for easily reading longs from adjacent registers, or if it can read-bitwiseop-write a register in a single clock cycle. Additionally, and this may be in a different document, how many clock cycles it takes for things that don't have instructions, like different multiply and divide routines from different optimisation levels. The kind of stuff that's important for optimising code.I'd also check out Ben Heck's videos where he programs an ATtiny10, a chip with 6 pins, 1kB progmem, and 32B RAM, to run space invaders. Surprisingly entertaining.
Hello /MCG/ is there a better, high IQ way to talk to individual pins on a shift register than just to specify every bit digit individually?(I'm too embarrassed to ask chatgpt again)[code]#include <SPI.h>/*Define the pins we are using on the Arduino Board and cross reference them with the pins on the Shift register so you can give them appropriate names*/int latchpin = 3; // chip selectint datapin = 11;int clockpin = 13;byte shiftLED1 = 1;byte shiftLED2 = 2;byte shiftLED3 = 4;byte shiftLED4 = 8;byte shiftLED5 = 16;byte shiftLED6 = 32;byte shiftLED7 = 64;byte shiftLED8 = 128;void setup() { SPI.begin(); //Start the SPI library SPI.setBitOrder(MSBFIRST); //Set LSB as bit order, this means we will send the least significant bit first and it will be written to Q7 = Register Pin 7 with the most significant bit being written last to Q0 or Pin 15 /*Configure the Arduino pins we use as OUTPUT, so they can send data to the Shift Register */ pinMode(latchpin, OUTPUT); pinMode(datapin, OUTPUT); pinMode(clockpin, OUTPUT); delay(50);}void loop() { digitalWrite(latchpin, LOW); SPI.transfer(shiftLED3); // Send a test byte digitalWrite(latchpin, HIGH); delay(0); // 1 second delay to observe changes digitalWrite(latchpin, LOW); }[/code]
aah how would I even iterate a for loop this way?im brain ded
>>2806527you need a "shadow register"add a variable to keep the state of all your LEDs, turn bits off and on in that, then send it out to the shift register
>>2806527Instead of >byte shiftLED1 = 1;>byte shiftLED2 = 2;>byte shiftLED3 = 4;it's more common to see>byte shiftLED1 = 1<<0;>byte shiftLED2 = 1<<1;>byte shiftLED3 = 1<<2;Of course, you should call them LED0-LED7, not LED1-LED8, for more clarity. I'd also use the term "bitmask" (or "bm") instead of "shift" when labelling these variables.But better than that is to use the bitmasks that come along with the register data in the header files that the compiler uses. I don't actually know where to get human-readable names for these bitmasks, I see them in tutorials and code that MPlab wizards create for people, and in examples in datasheets, but nowhere in whole. They make more sense with status registers, here's an example:>/* Write logical one to WDCE and WDE */>WDTCR |= (1<<WDCE) | (1<<WDE);Where WDCE is bit 4 of the Watchdog Timer Control Register WDTCR, and WDCE stands for Watchdog Change Enable. The actual constant WDCE is just "4", it's intended to be used to bitshift for bitwise boolean setting or unsetting of bits. For I/O ports specifically, here's another example:>/* Define pull-ups and set outputs high */>PORTB = (1<<PB7)|(1<<PB6)|(1<<PB1)|(1<<PB0);>/* Define directions for port pins */>DDRB = (1<<DDB3)|(1<<DDB2)|(1<<DDB1)|(1<<DDB0);Here, writing "PB7" is the same as writing "7", but it's more clear.The arduino IDE uses something similar but more removed from the user and less flexible, it uses a selection of functions to calculate which bitmask of which port a given "i/o pin number" is, e.g. arduino pin 12 = port B, bitmask 0b00000001. It's fine for static use cases as it all gets precalculated at compile time, but if you're trying to iterate through several pins it becomes extra bloat. See:https://forum.arduino.cc/t/get-portx-from-arduino-style-pin-number/469729/8 If you want to optimise code portability (e.g. in a Marlin compiler) then using this sort of function may well be desirable. I don't know how to use it properly.
>>2806539>>2806527also i misread your entire question but i think it's not entirely out of place
>>2806539Ok anon. I didn't really get it. but thanks for your effort anyways.I asked chatgpt where I learned about bitshifting. I feel retarded for having everything spoonfed but I guess I also learned something new:https://pst.moe/paste/gyenln
Getting ready to start a phone alert security project with esp32. Sensors are of the 433mhz sort. I’ll figure out the hardware stuff but I’m confused about the pushing of notifications. Looks like a lot of options. Was going to try and learn MQTT and use mosquito but I’m not sure if that’s the best route.
>>2806539> byte shiftLED2 = 1<<1;Except you shouldn’t make a variable for a constant. I’ve worked with microcontrollers that are 128 bytes of memory and you don’t want to trust the compiler to optimize that out.
>>2806482That's really good to know, I'm kind of hoping to build up enough knowledge to eventually make my own 8-bit microcomputer clone, but first I need to get a grasp of the basics. Having watched the Ben Eater 6502 videos, assembly seems like an interesting way to program.>>2806520I've got a few 328Ps and a 2560 that I need to dust off and put to use, then.>Ben HeckI'll definitely give that a watch, thanks anons.
>>2806785Well I'm pretty sure that will get consistently optimised out, but I can feel some of that apprehension. Is #define the better way to go?
>>2806662Mqtt implies the need of having a server, if you want to keep it simple just set it up to send emails or telegram messages
>>2806530What is your expected result and what do you get instead? The loop condition won't end as the "i" counter isn't ever increased, but instead the test byte (?) "shiftLED".
>>2806530>for (led i = 0; i <= 255; testLED++)should probably be >for (int i = 0; i < 256; i++)Then increase testLED inside the loop, either directly after usage or at the end. If that's even what you want done?
>>2806543>asked chatgptPick up a book or find a bootstrap example. No one sanitize the output of AI and it is frankly rude comining with that crap and asking others to do it for you.
>>2806543>asked chatgptDon't forget to kill yourself, low IQ retard.
>>2806530>delay(0) // 1 second delay to observe changes
>>2806894> use #defineMost certainly. Always use the simplest tool that accomplishes the task.Also, assembly typically uses macros as well, so it’s easier to adapt. I sometimes prototype fluffy things in C and then rip out the assembly code and optimize it.A lot of microprocessors have special instructions that you can sometimes take advantage of.Microsoft’s C++ template system used the C preprocessor to work, which was kind of funny when it was discovered since the C++ theoreticians and neo-purists hated the C preprocessor without realizing #include was just that.
>>2806931Thanks, I’m an aspiring boomer that’s never used telegram either but I’ve already got a new bot so that was pretty easy. What’s my exposure puttying WiFi credentials into the arduino IDE and sending a hello world message from the ESP32? Are the hackers going to come in through my back door?! Any steps I can take or concepts I should explore to protect said back door?
>>2807040>t. born with intrinsic knowledge of everything>shitposts on a Tibetan homesteading forumnice
>>2807201Just don’t hook up your dev env to the internet. Simple.
>>2807207Development environment? Is that the same as arduino IDE because the machine running that is connected to web. Is there a sandbox or something that should be involved? Also what’s the secret to flashing these fucks. I swear I’ve done it before but I’ve got 8266 and 32WROOM and between the two I can’t figure out why the ESP8266WiFilibrary won’t work or if the flash/boot button pulls pin 0 low or how long I’m supposed to do that. At least I keep getting different errors. >t.ignorant, please spoonfeed.
>>2807435> dev env == arduino ideSo, it depends on the microcontroller. For the older architectures, you can get by with an old 386.So what do you have on there?Editors, compilers, debuggers, emulators, eeprom burning stuff, now writes flash instead, telix, serial ports, rs232 to uart box, parallel ports, your pickit2 or whatever. It’s sometimes useful to have a few dev microcontroller dev boards to handle things like i2c, spi, gpio, d/a and a/d converters, or maybe a raspberry pi or latte panda for usb stuff. Or, maybe you want a pentium if you’re doing Usb.
>>2803735its summer in the US, alot of people would rather be outside, than cooped up inside doing electronics.
>>2807482It’s already too hot out.This is peak basement-dweller productivity time.
>>2807444Checked. although took too many neurons to figure out you’re probably suggesting I use an old dedicated machine with no internet connection. If so, good advice and I imagine anything else is beyond my scope. Currently I think my usb cable is charge only because I cut up the other ones to use for powering leds.
>>2802510How do I charge esp32-cam with a lipo battery?
>>2807035>it is frankly rude comining with that crap and asking others to do it for you.Reading back on the post it does sound kinda rude, but wasn't intended to be. I didn't really understand the entirety if Anons post but he led me in the right direction with bitshifts and the code example chatgpt provided was genuinly helpful.
Hi /mcg/Doing my first ever electronics project:a doorbell camera.Saw a video on the esp32-cam and it looked simple enough.Have ordered bits from aliexpress.Wish me luck.
>>2808390>run esp32-cam from lipoFrom https://www.dfrobot.com/product-1879.html>Power supply range: 5VYou could step up your 3.6v lipo to 5v using a step-up/boost circuit.Or step down 7.2v (2 cells) to 5v using a linear regulator.>charge lipoIf 1 cell then maybe tp4056 ?If 2 cells then I don't know.
>>2804737Does it work against your pc ?Here's a video showing an oscilloscope-level view into usb keyboard stuffhttps://www.youtube.com/watch?v=wdgULBpRoXkIt does briefly talk about the usb from 27:58.
>>2808583>It does briefly talk about the usb setup from 27:58.Fixed.
>>2808583I thought the point of that video was to show that PS/2 keyboards and mice were simple and worked well, and USB started off as a disgrace, and went downhill from there.“let’s base the USB supply voltage on TTL logic since that will be around forever and will only become more popular”
>>2808610That must be some other video.He spends the bulk of this video looking at traces and decoding by hand what is being sent between computer and keyboard.
Here's some AI kino that got posted in this SO thread:https://electronics.stackexchange.com/questions/715517/artificial-intelligence-in-pcb-component-definitions
>>2802510>have a need for an analog/digital io block to can bus module for attaching various signals to and making them available on the can>find no products or even projects that do just that>"fine... I'll do it myself">stm32, can bus transciever, 8 channel optoisolator for inputs>find some basic example code off ST's website and strip it down further to build off of>whole thing done in 3 hours>want to expand the project a bit>want to pull in data from a 1-wire bus >one project exists for it>doesnt compile>bullshit OOP issues >get fuckedFINE ILL DO IT MY FUCKING SELF AGAINwhy is everything hard and make me learn how to just solve it myself instead3 year old code on github, load the .ino, put the header file in the right folder, click compile, dozens of undefined reference errors.clearly the code worked at one point, and 3 years later it doesnt. why
>>2809111People like myself, and probably yourself, that are pro-grade, don’t vomit their failures on github, and don’t have time to write books about it either (back when those were a thing)I’ve seen shit on github that’s so bad, I’d have sworn they were planted by our competitors to fuck us up. You can even find stuff that basically implements security holes and could damage d to a attached equipment, like all lines locking-up hi simultaneously due to bugs when they try and bit bash a 3ph motor signal.Of course, this cesspool of github detritus is what a lot of the code-writing AI feeds from. Might as well have someone from india do it.
>>2808583Yep, it works perfectly on PC. But I know that the PS4 only supports a few Bluetooth keyboards. My goal is to figure out a way to spoof one of those keyboards.
>>2809118But they have working examples in videos and they are white American. I think it is a case where the code works on their machine or worked 3 years agoIt's only a few hundred lines of code anyway so I can just simplify it and de-oop it until it works perfectly as all things do. It just doesn't help that I'm low int on c++
>>2809126> low int on c++I’m high int, I started decades ago on cfront.After too many decades, I realized that oop and c++ is bullshit, and is made worse with every new c++ misfeature that out-of-work theoreticians put forth because they’re academic and not practitioners (who are too busy getting things done). There’s a few neat tricks and whatnot in c++ over C, but nothing very extraordinary.Could be worse though… python comes to mind.> de-oopGood. You’re ahead of the game.
>>2809119> ps4 bluetooth keyboardsI find that all kinds of devices randomly support/or don’t work at all on random bluetooth keyboards.Some can’t even see them to pair. But it’s random, across apple, PCs, laptops, PS3/4, etc, and all kinds of bluetooth keyboards both big names and chiwanese knock offs.The worst thing is when you have to go dig out the original controller to use that stupid pad thing in one random place where sony paid-off the game devs just to include it somewhere in the game to make it artificially relevant.
>>2809111>.inothere's your problemassuming your stm32 actually has hardware 1-wire support, it should be pretty easy to just read/write the registers in the right order and shuffle data like any other comms hardwareif not, you can bit-bang better than a tarduino
Give it to me straight bros: what's the minimum voltage you can run a Arduino Nano at? ESP2866? Surely you can run it on a single button cell? All I get is "but you wouldn't do that, you would run it of AAs"
>>2809189read the datasheet
>>2809184It might have some hardware, but I'm using it for hardware can supportIt just level shifts to 3.3v and goes in an pin.I don't have to transmit so I can really strip it down
>>2808557You’ll need more patience than luck. Following a video is almost retard proof just don’t get mad when you start coming to terms with how retarded you are, like most things it will be an opportunity to be less retarded. I believe in you Anon.
are there any cheap FPGA dev boards like the icesugar line, but that actually have a serdes?
>>2802510Will I be able to play a 4gb .mp4 video file even though the pi 3 B has 1gb of ram? I need to convert a raspberry pi 3 B into a media player, with composite video/audio coming out of the 3.5mm jack. I have an understanding on how to configure the 3.5mm jack, but I also need a script to have the device launch a running media player app upon startup. Can I get some help on where to go to find a script like this, or where to find a how-to for a project like this? Big thanks in advance for any help you can provide. I'm hoping to have this running by Saturday for a video art installation.
>>2809493>Will I be able to play a 4gb .mp4 video file even though the pi 3 B has 1gb of ram?Sounds fine.Bits of the .mp4 will be read from usb drive as they are needed.>need a script to have the device launch a running media player app upon startup.(1) install raspberry os to sd card(2) confirm install by booting your raspberry pi from the card(3) poke around the desktop and see if you can get it to play your .mp4 file at all(4) poke arounds settings to see if you can boot without login or password straight to desktop(5) poke around settings to see if you can get it to launch a program as soon as you login, eg: a web browser
>>2809501I found an install (Video Looper) but I can't get config.txt settled so the pi outputs a working NTSC 4:3 signal. I tried sdtv_mode=0 and sdtv_mode=16, and neither are working. The config.txt also said to uncomment the sdtv section for PAL. I commented the section and no clear picture. The pi boots up and my tv displays a messed up NTSC signal. Any ideas? I'm using a 3.5mm headphone jack RCA splitter and I have the composite cable plugged into the correct jack port.
>>2809536I think I figured it out. My 3.5mm RCA adapter isn't the right style for a raspberry pi.
>>2809493>also need a script to have the device launch a running media playeryou can install an OS that contains just a media playerbest is LibreElec, second best is OSMC(or OMXPlayer if you prefer a geeky command-line experience)https://www.youtube.com/watch?v=ngGkVd-_LP8
>>2809493>Will I be able to play a 4gb .mp4 video file even though the pi 3 B has 1gb of ram?The total size of the video doesn't matter shit, because it will be streamed from the storage media. What matters is how the video file is encoded (resolution, codec profile), and how the player manages memory.
>>2809493Every media format since caveman times has been readable incrementally, instead of having to load the entire thing in ram. The rest is up to how your media player handles things, it should be fine if it’s not potato coded.
>>2809961> potato codedReading everything into memory has been commonplace among the retards that infiltrated 90% of sw devs for the last 15 years at least.
>>2810000checked quads of truth
>>2809493>that picWhat is this thing? Tried various terms in google and I can't find anything like it.
>>2810388https://youtu.be/pbpFgvttBZw
>>2810388>he doesn't know about eurorack synths
And idea what I'm missing here. I'm expecting TX to idle high, but it's not. (SAMD21E18A). Pullups? idk..void UART_init(void){ uint32_t u32_baud = 36000; // Configure pins IO_pin_gpio_init(IO_PIN_PA24); // init TX IO_pin_gpio_init(IO_PIN_PA25); // init RX IO_pin_pmux_enable(IO_PIN_PA24, IO_PERIPHERAL_FUNCTION_C); // Enable peripheral function for pin TX IO_pin_pmux_enable(IO_PIN_PA25, IO_PERIPHERAL_FUNCTION_C); // Enable peripheral function for pin RX // Enable the peripheral bus for SERCOM3 PM_REGS->PM_APBCMASK |= PM_APBCMASK_SERCOM3(1); // Use GCLK 0 to clock SERCOM 3 GCLK_REGS->GCLK_CLKCTRL = GCLK_CLKCTRL_GEN(GCLK_CLKCTRL_GEN_GCLK0_Val) | GCLK_CLKCTRL_ID(GCLK_CLKCTRL_ID_SERCOM3_CORE_Val) | GCLK_CLKCTRL_CLKEN(1); SERCOM3_REGS->USART_INT.SERCOM_CTRLA = SERCOM_USART_INT_CTRLA_MODE(SERCOM_USART_INT_CTRLA_MODE_USART_INT_CLK_Val) | // Use internal clock SERCOM_USART_INT_CTRLA_CMODE(SERCOM_USART_INT_CTRLA_CMODE_ASYNC_Val) | // Async mode SERCOM_USART_INT_CTRLA_DORD(SERCOM_USART_INT_CTRLA_DORD_LSB_Val) | // Send LSB SERCOM_USART_INT_CTRLA_RXPO(SERCOM_USART_INT_CTRLA_RXPO_PAD3_Val) | // Pad 3 for RX SERCOM_USART_INT_CTRLA_TXPO(SERCOM_USART_INT_CTRLA_TXPO_PAD2_Val); // Pad 2 for TX SERCOM3_REGS->USART_INT.SERCOM_CTRLB = SERCOM_USART_INT_CTRLB_SBMODE(SERCOM_USART_INT_CTRLB_SBMODE_1_BIT_Val) | // Single stop bit SERCOM_USART_INT_CTRLB_RXEN(1) | // Enable RX SERCOM_USART_INT_CTRLB_TXEN(1) | // Enable TX SERCOM_USART_INT_CTRLB_CHSIZE(SERCOM_USART_INT_CTRLB_CHSIZE_8_BIT_Val); // 8 bit char size SERCOM3_REGS->USART_INT.SERCOM_INTENSET = SERCOM_USART_INT_INTENCLR_TXC(1) | SERCOM_USART_INT_INTENCLR_DRE(1); SERCOM3_REGS->USART_INT.SERCOM_BAUD = u32_baud; SERCOM3_REGS->USART_INT.SERCOM_CTRLA |= SERCOM_USART_INT_CTRLA_ENABLE(1);}
>>2810757> uint32_t u32_baud = 36000;> SERCOM3_REGS->USART_INT.SERCOM_BAUD = u32_baud;Why is this a variable?
>>2810898It makes it easier to track in gdb, you pedantic twat
What is the cheapest SBC out there that can hold "full" linux (kernel + some networking)?Raspberry Pi Zero 2 W is $15, but can we find something for below $5? Specs can be worse.
>>2810945> linuxThe real goal should be running something like bsd 2.11.
>>2811006To be honest, linux is not a hard requirement, as long as it has networking stack and can communicate with ethernet camera
>>2810757do you have a device connected to it or are the rx/tx lines floating? im pretty sure the "idle high" is actually done by the receiving end not the transmitting end.
>>2811125I have them being passed through my debugger. TX lines are typically pulled up by the transmitter. Receiving devices expect their RX line to be pulled up by the transmitter. Could also be the case that there's some peripheral muxing problem. Not sure. Will take another crack at it tomorrow. Let me know if anything comes to mind
>>2810945>What is the cheapest SBC out there that can hold "full" linux (kernel + some networking)?>Specs can be worseYou phrased that a bit retarded. What's your tasks/requirements? What are you trying to accomplish?Is it for personal education? => Better buy popular board, you'll get more options later.Is it one board only project? Can you (re)use old board? => Buy a used router (check OpenWRT support though).Why do need GNU/Linux at all? You can use networking on more simple OSes. => STM32, ESP32 etc support networking almost natively
Programmer here, not new to microcontrollers but don't have a lot of domain knowledge.>friend has idea for product>pick up Xaio ESP32-C6 to prototype it>oldered on a battery>blink program killed it in a few hours>want to start experimenting with the deep sleep mode to try and squeeze more life out of it>need visibility into the battery stateI know I can basically read the battery voltage as a close approximation of battery life, but all my searches have returned no results on how to do this or if there's a nice battery info package.I know some of these pins are analog, so is it as simple as just reading one of the analog pins with nothing connected to it to get the voltage and doing some math, or is there some electrical concept (voltage drop? idk) that makes that flawed? What is the proper google search terminology to figure this out?
whats the easiest, least bullshit way to add a ntc thermister to a stm32?any simple built in functions or some simple code I can use? I dont want to use some bloated 3 file 1200 line abortion to read the fucking outside temp, especially when it gets condensed down to the same damn fucking shit in machine code no matter how autistic you write it
>>2811382If you don't want to use shitty third party code written by idiots (like most "driver" code in embedded seems to be), you need to do it yourself. First get the shitty third party code to work to make sure the hardware works. Then either write your own code by reading the datasheets, or minimize the third party code by removing all bullshit.
>>2811351Okay I figured out how to do this I'm just reading A0 and doing some math, but I am unable to upload sketches while connected to both battery power and USB power. If I disconnect the battery, it works, if I unplug it then reconnect my battery, the sketch works.Anybody know why this might be?
>>2811405I think i figured it out already>buy TPM36>analogRead(pin)
>>2811415>voltage linear to temperatureI guess that works, if your ADC is good enough.>Ardushitto APIDie.
>>281141812 bit adc, it's temperature, it does not matter.>ardushittoNigger it's a stm32All I am doing is getting the pin value to however many decimal places, and sending that value over can bus.
>>2811421analogRead is Arduino convention. I thought maybe they ported it to stm32. Most C devs would probably prefer this_convention.
>>2811425I'm sure there's some other method like HAL_Get_Pin or something like that but I just don't care, I already do digitalRead for other functions and it just werks
>>2811421>>ardushitto>Nigger it's a stm32"Wiring", "Processing" and other arduino-like APIs are not confined to the AVR chips
>>2811406posting a schematic of how youve wired it up might help for a start
>>2811351Battery capacity voltage/capacity curves are very non-linear and differ by chemistry, size, etc. On top of that, you can discharge a battery less (i.e., set your "0%" to a higher voltage) to get more lifetime charge/discharge cycles out of it. In most consumer devices 0% is definitely not 0% on the cell.The easiest thing for you to do software wise is add a discrete fuel gauge IC. It will do the compensation, filtering, measurement, etc. that you need. Do a search for "fuel gauge," pick your flavor, TI, analog devices, etc. Follow integration manuals for those components because measuring voltage affects the voltage, which affects the curve, which affects the measurement, etc. If your MCU is running and you really care about battery life, that means there is a load on the cell that will affect the voltage you're trying to measure. A discrete IC gets around this.You may also want to look into cell characterization, that's the process by which you work out those curves for your particular cell/load. If you are doing a production part you'll want to do some testing to figure out how to squeeze the battery life you want out of the power budget you have.
>>2811351>>2811611(2/2)As for software, different peripherals of your MCU will have different current draws; if the datasheet is good they will tell you. But in general, you want the MCU to be in the deepest sleep it can be while preserving the state that you need for your application (many can power down SRAM but only partially, for example) Your RTOS also probably has configuration options that will sleep the processor to various degrees when entering the idle task, for example; the tradeoff is that there's some latency to wake back up.Having the CPU running, or a lot of RAM, is expensive power wise. So it's better if you can to do e.g. DMA, or batch sensor reads so that a SPI line can be kept "on" for only a short time, instead of waking it up a bunch of times every time a tiny amount of data comes through. For that ESP, the Wifi and BLE radio are very very power hungry peripherals that you should keep alive as infrequently as you can manage. Techniques like that. And, choose your MCU well. Keep your memory footprint as small as it can be. Not sure about the ESP32 family but MCUs come in various flavors, one of which is usually a "low power" version which is designed with good sleep current draw and fewer power-hungry peripherals.
>>2811406The pixies line up and march from the negative of the battery, through your MCU, to the positive of the battery. Your MCU measures how energetic they are on the positive side by having them flow from ground into a capacitor inside the MCU and then timing how long it takes for the voltage to equalize.So if you connect a USB, your MCU starts drawing power from that, and the pixies don't really know where to go. Why would they go towards the cell when they can just go towards the higher-voltage USB port instead?That's why it works only one way.
I'm logging data to a csv files on an sd card (esp32c3 sdspi), do I have to worry about synching the fat filesystem or at least blocking the main loop if the 5V starts to sag?
>>2811751esp32s are a 3.3V device so it hardly matters. why would your 5V line "sag"?
>>2811806Because I'm unplugging it to turn it off.
>>2811807Don't do that
>>2811807well thats fine when you are not dealing with external memories or internal flash writes. but since you are, you should explicitly finish all transfers and unmount the memory before turning it off. most actual devices that datalog have a battery backup if the main power source is lost, and it will kick in and allow the device to turn itself off properly
>>2812001I was hoping that a smallish capacitor (500uF) would last long enough to do the File::sync_all(). Another way it can go wrong is if somebody ejects the SD card without powering it down.
what microcontroller (programming) and frameworks/tools/standards should i learn if I want to get into automotive embedded programming?
>>2812541It depends on what you mean by that.MISRA, obviously, for that high level C fluff.The tesla still uses the ‘ol MC68HC11 in places.
i have stm32 blue pill and stlink v2 and i need to program a bios chip and i've tried flashing it with this program to use it for thathttps://github.com/dword1511/stm32-vserprogbut i can't get through with it because my PC doesnt detect /dev/ttyUSBxxx nor /dev/ttyACM etc. i've tried on Xubuntu liveusb and still no luck, my regular install is nixos and my user is in flashrom group the jumper is on 1 on BOOT0 and 0 at BOOT1i am an absolute beginner
>>2812751>beginnerThen you may be interested in knowing that controlling serial lines directly requires some special permissions, at least on Ubuntu. You don't need root, it's just standard Linux shit about adding random lines of text to random config files. That's the way i remeber it at least. Try ithttps://askubuntu.com/questions/58119/changing-permissions-on-serial-port#58122Idk if this is your exact issue>>2812719Misra, rightFanks
having trouble with RPI interrupts:i was on here a while ago asking if a RPI could handle GPIB. i bought a board, installed the drivers, and was able to successfully transmit a message to my oscilloscope. reading from the scope, however, is not working. i send "*IDN?", which asks for the name of the device, and i get back "T" (the first letter of "Tektronix"), but nothing else, and the Pi times-out waiting for EOL. the scope shows the DAV (data available, active low) line going down several times, but the interrupt routine in the kernel module (which gets the interrupt with request_threaded_irq()) is only being called once. im not sure how to proceed. any ideas?>>2802510hey, its my image! thanks for saving it! btw, the LCD says "lolicon".>>2804871its an STM32L462 (or something like that). i bought one and tried to get it to do something just to see if i could (and also to learn how MCUs work under the hood). the reference manual was like 1600 pages long and it took many nights just to get an LCD to blink. the Pi (same one in pic rel!) uses SPI to program it and it uses UART to get output. i got printf() to output over the UART controller, quite proud of that one. the LCD is controlled with some hardcoded GPIO stuff. i never got the SD card to work, not for lack of trying.
>>2812771i'm new to electronics, not linuxi can see the stlink device in lsusb but i dont have any interface in /dev/not sure if that's a permission problem because i tried that on root think i've had that same issue with my arduino i dont know, i dont use ubuntu i fucking loathe how not streamline it is, they just change shit for the fuck of it
>>2812772>im not sure how to proceed. any ideas?Get a USB logic analyser (or a second scope) to probe the lines and see if it is sending more letter than just the T, or if it’s waiting for flow control pins or a clock edge or whatever. Compare what you see to a handy timing diagram that I hope someone made already.I did the same logic analyser snooping to figure out that my scope RS232 was actually a master that was to be sent to a plotter, and was carrying HPGL data. For that I used a cheap FX2-based unit.>>2812776Maybe /g/fglt will have some archaic insight for you?
>>2812841>Maybe /g/fglt will have some archaic insight for you?they wonti'm asking here because i wasnt sure if the jumper is set correctly or the device is fucked for some reason or maybe someone's used that program before/g/ is just /v/ with gpus, we don't even discuss linux anymore
>>2812841>Get a USB logic analyserdont have that>(or a second scope)do have that>see if it is sending more letter than just the Tfrom what i can tell, it's sending the T, then it tries to send the E but the Pi never acknowledges that it receives it. this is backed up by 1) the debug menu on the scope shows that it tries to send both T and E, and then stops; and 2) the scope otherwise works fine with a USB GPIB adapter.this discussion is kinda pointless for now because i reinstalled the OS on the Pi and now nothing works :c
>>2812851the gpio_request_one() is failing on the first call. it was at least partially working before reinstalling the OS, but its fucked now. its also concerning that the function is apparently deprecated. i dont think any other processes are using any GPIO pins. not sure what to do.
>>2812751no. what you have is chink shit clones of "bluepill and stlink".
>>2812876ok i also have a chinkshit clone of arduino and it works fine, why wouldnt this
>>2812883because its much easier to clone. expecting any chink shit to work properly its just retarded. get some legit devices, verify your shit works, then roll the dice with chang
>>2812861What’s errno?
>>2812911iunno, errno isnt working in the kernel module for some reason.
>>2812876iirc stlink is an open source design so anyone can make and sell thempretty good idea for making your products more accessible, especially considering the low price of the stlinkatmel can eat my ass im never buying an atmel ice or dragon>>2812914well i’unno either mate
I thought i would use the day productively today and progress with the ARM Cortex courseI hit the point where I need a simulator now. i've spend the ENTIRE day trying to make the simulator work but it tries to build something and then fails.i have no idea what to do.i fucking H A T E packages that you have to build yourself. Today is a wasted day thanks to those delays.I'm going to jerk off to some porn, and then i'm going to the gym. fuck this shit.
>>2813014apt install qemu-system-armGetting it to work requires some fiddling if you're new to this.I rarely need an emulator. I run everything local (on x86) or on a dev board. the only time when an emulator makes sense to me is when writing asm.
I'm looking to make a battery powered device that can be controlled with an RF remote controller inside an apartment. The device will be idle for 99% of the time and during periods of activity I don't expect it to consume more than some tens of mA, and I want the battery to last as long as possible, preferably months to a year.So, what I need is a digital radio protocol that can remain at a very low power consumption idle while still being able to wake up on radio activity, my understanding is that WiFi, BLE etc. will not work because they need to remain connected in a high power state to hear anything at all, does what I'm looking for even exist in a neat module or will I have to resort to a separate RX detector and all that?
>>2813029>I don't expect it to consume more than some tens of mA.thats a lot, low-power MCUs idle current is typically in the nanoamps. the IR receiver in pic rel has a typical supply current of 350uA. they probably make low-power IR receivers too.
>>2813092oh i can read lol. well you got your answer.
>>2813093fuck, cant type either, apparently.
>>2813029https://forum.allaboutcircuits.com/threads/low-power-ir-detection-circuit.115744/page-2#post-911606guy on this forum reduced the IR detector current by a factor of 10 down to 35uA by cycling it at 7%.
>>2813092‘FT’ is the acronym for ‘Five volt Tolerant’ now?That’s a disgraceful example of zoomerese.Data sheets an app notes are going down hill.> STMAs expected, about as much street cred as batteroo.
>>2813092Thanks, I was looking at RF remote controls so it's not so sensitive about directivity but those do seem like really good numbers
>>2813029Receiving only? Some sort of 433 MHz bullshit like zigbee or whatever would probably be my go-to, so long as the protocol does t require duplex. Ideally built into an MCU like an NRF something. LoRa is great for low power transmission but that’s not a requirement unless you want to really minimise the remote’s power consumption too. Even then it’s probably overkill since normal RF remotes last years on a 2032, and the NRF-based LoRa receivers are really expensive.Also check out cnlohr’s latest video.
>>2812541QNX is somewhat popular, but its for chips with Raspberry Pi power, not microcontrollers.
>>2810945There's the Milk-V, a RISC-V board with an Arduino core on the sidehttps://www.youtube.com/watch?v=SeExddxWdNs
>>2809493if you install lightdm you can login upon startup without having to type the passwordon xfce you can graphically select software to be launched upon login/ bootup
>>2813014>I'm going to jerk off to some porn
>>2813783porns great, youre missing out bro.
>>2813783
>>2812861update: finally got it working after spending the entire working day yesterday (and most of monday) crawling around in the kernel module source. i had to replace the deprecated function with the new interface, but it was a fucking headache and there was very little documentation in the matter. i might push the changes to the kernel module after i clean it up a bit. thanks to everyone that believed in me <3
>>2814336>(and most of monday)friday*
>>2812911>>2812914i figured this out too: inside kernel modules, there's no global errno variable (errno lives in userspace). instead, errors are encapsulated in return values. if a function returns a pointer (gpio_request_one probably returns an int that i was too retarded to check, but the new gpiod_get returns a pointer), then you check the pointer with IS_ERR(ptr), and then get the error code (long) with PTR_ERR(ptr). strerror() doesnt exist in kernel headers either so i had to copy the error code to another program in userspace to check it.
Any way to tell if this Arduino Pro Mini clone is the 3.3V 8Mhz version or the 5V 16MHz one?
>>2802510Is there good reading material on how to design pattern a state machine for MCU code?I am trying to get into more than blinky LEDs and such breadboard level toy projects. My code is turning spaghetti with the if statements and the mess of logic strewn about. Literally unreadable. Unmaintainable.
Does this field makes any money or you are like 3DPG?
>>2815201>makes any moneynot about money3dpg makes the ass dildoswe make them wigglewho even thinks about money when your holes are getting tickled
>>2815209Big oof!
>>2815143yes
>16 MHz MCUsWhy does anyone bother?
>>2815186You might want to look at Algorithmic State Machine (ASM).The first link from Google is a not bad overview:https://uotechnology.edu.iq/ce/Lectures/Dr-Ikbal-Electronics-2nd/ASM1.pdf (There is a ASM2 too.)If your shit is small Karnaugh Maps are old but good.
>>2815186Think about it hard and come up with something good.
>>2815186Use a table driven state machine. Two columns, current state, next state. One statement.OrUse the switch/case statements instead of ifs.
>>2815186Rewrite it until there's no more spaghetti.
>>2815242Well?
>>2815143the voltage regulator should say what voltage it outputs on its label, LG50 probably means 5.0V version of the MIC5219 regulatorit should also say 8.000 or 16.000 on the crystal oscillator itself
>>2815394He trolled ya, man! You've been trolled! You're a victim of a troll!
>>2815476What? I'm getting trolled on 4chan? What is the world coming to?
Why are Arduino clones so expensive these days?You could get 10 for $2.5 a couple of years ago, but for the at least the past year you can't find a single one under $5.
>>2815540World War 3
>>2815438In ENGLISH Carter!
*takes a pin-up poster, folds it in two and then pierces with a pencil*And that's how we will travel through time!
>>2815540>can't find a single one under $5.where are you looking? i cant find an arduino above 1 dollar on aliexpress
>>2815582I'm not retarded, Anon.Pro micros/Unos/Leonardo all costs above $5 on AE and the few listings below that are all shipping rate scams (pay $2 for the controller and pay $6.5 + $3.5 per additional controller for shipping).
>>2815581Indeed.
>>2815602(it's a /tv/ meme ya dip)
>>281559832U4-based boards have never been cheap in the first place, plus I don’t think they’ve been cloned like the 328P has. Compare the board price to the individual price of the chips on LCSC. The 16U2 (8U2) are cheaper as far as native-USB MCUs go, you probably don’t need 32k of flash. Though the CH32V203 is probably cheaper again, has much better specs, and actually has dev-boards available.>>2815609for you
can i find a charger that's capable of driving pinecil for ~$15 or should i maybe look into some other iron (recommendations?)
>>281659060W+ for $15? I don’t think so. Maybe for $25 on alibay, but I wouldn’t trust anything cheaper than what Ugreen and those chinky brand names sell them for. Pine64 themselves sell one for a decent price IIRC.If it has a barrel jack on the back too, see if you can get a 19-20V laptop brick at a thrift store. I think they might be able to handle up to 24V, but don’t quote me on that.
>>2816590the pinepower is 25 bucks on their global store and it works really well, its what ive been using for it, you can probably find slightly cheaper 65w chargers but i doubt it will go below $20
>>2816797$25 after tax is more like $40 and that's pretty expensive for me>>2816659>If it has a barrel jack on the back too, see if you can get a 19-20V laptop brick at a thrift store. I think they might be able to handle up to 24V, but don’t quote me on that.yeah i've thought of that but i'd have to reterminate one to a smaller barrel and i'm not sure if that's safe to do for someone who has little experience with electronicswould it even work? to just cut off the connector and put on something different?
>>2816806>i'd have to reterminate one to a smaller barrelSome laptops use 5.5x2.1mm jacks, it's not that common but it's not that uncommon either. The universal replacement laptop bricks almost always come with it, if you see one of them at a thrift store you might be able to ask the shop that sells them to see if they have the spare ends.>i'm not sure if that's safe to do for someone who has little experience with electronicsIt's not really unsafe to replace the plug, the devices have internal circuitry that shuts off the output in event of a short circuit.>would it even work?>to just cut off the connector and put on something different?I see no reason it wouldn't work, assuming you make the middle positive. You might even be able to buy a plug adapter if it's a common one.
>>2816844if i could just get adapter from my thinkpad charger i'd be elated but i think i've tried searching for one and couldnt find iti'll look into the chargers, shouldnt be too hard
>>2816845buy a replacement thinkpad charge port, and solder an adapter cable to that
>>2802510I want to make a USB version of Colecovision controller. See pic related: it's a 3x4 numpad with joystick and 2 buttons. This would be for emulation; I'll print an enclosure and probably use SNES controller layout with the numpad in center.> USB interface to retroarch machine running on Win10 machine> Use arduino nano for sizeIs following tutorial a good way to think about interface? It's basically having the arduino unit pass back keyboard commands... which doesn't seem right, would think there's a "gamepad" input of some sort that could be used instead. https://www.arduino.cc/education/diy-game-controllers
>>2816939Code. Just doesn't seem like right way to do it.
>>2816939Sorta, yeah. You can ignore the serial comms, the actual sending of the key is done via "Keyboard.write(87);", though I don't think it's actually sending the ASCII value, rather the keyboard module is probably converting that to a scancode or some other format. I wouldn't know though.You can't use an arduino nano though, it says in the tutorial you need to use a samd or 32u4 based board, because they're the only arduinos with native USB capability (well, the lillypad too). In practice there are lots of other non-arduino boards you can use, like a pi pico, ESP2S3 or C6, bluepill or blackpill, probably other's I'm forgetting. You can also bit-bang native USB with V-USB, but I advise against it. /g/ do a bit of diy keyboard stuff on their mechanical keyboard general, ask them for memey low-latency and n-key rollover methods.
>>2817048Thanks. Saw the bit about 32u4 and ordering some Arduino micro knockoffs that should work along w keypad. I’ll check over at G on keyboard stuff. Never would have occurred to me to check there.
>>2816939>which doesn't seem right, would think there's a "gamepad" inputarduino has essentially crippled multiple generations of embedded enginnersusb has an idea of device classes, that is your uc can identify itself as a number of different things to the computer and then talk to the computer in a sensible waywhat arduino does ( i don't care enough to check if this is correct ) is use a serial to usb bridge ic where the bridge chip (e.g. ftdi/cp2102) identifies its device class to the computer as a serial port and so the only communications you can do with ardino is emulate a serial port.if you has a proper usb SIE you could tell it to identify your device using a game controller device class (most HID classes do not need drivers thank fuck because windows sucks ass at usb drivers)for example if you had a microcontroller like a pic18f45k50 with a USB serial engine as a peripheral, you could have it send an HID game controller in the initial descriptor and the computer would treat it as a game pad controller. sending keyboard commands over serial bridge is just lame dogshit.read usb 2.0 specification if you are at all interested, you can quite easily write a very simple usb stack on a microcontroller in a couple hundred lines of C.
>>2816849do you reckon i could just buy a USB-C to thinkpad adapter and just use the usb-c port? the thinkpad barrel is very uncommon and it would be a huge hassle
>>2817110>i don't care enough to check if this is correctIt’s correct for normal arduinos, but not for the leonardo and pro-micro. I can’t fault you for assuming arduino keyboard projects were just bit-banging shit over serial and relying on computer-side glue code to make it work, considering the backwards neanderthal programming conventions that the arduino environment fosters. Bootloaders (that aren’t for end-user use) and HALs were a mistake.
i have an esp cam i want to use at a hotel but i don't see how i can get past the wifi authentication that makes takes you through a web browser.
>>2817149nvm. should have thought about it for more than 8 seconds, would have realized computer can put out a mobile hotspot for esp32cam. too bad i dont have any PIR sensors with me. do have a laser emitter/collector that could be a trigger but i think the HCSR04 will be more discrete.
>>2817112is it something that takes the thinkpad charger as an input and has a usb c plug on the output? if so, maybe? i don't know if the pinecil would like a flat 19/20V on its usb c port without first negotiating for it
>>2817110>crippled multiple generations of embedded enginnersI think it's more like "enabled a generation of non-programmers / EEs to futz around on projects with crummy code> your uc can identify itself as a number of different things to the computerThat's it. If I've read correctly the micro / leonardo ID's itself as such to the computer. Haven't looked yet to see if you can change that to something more suitable. In meantime, appears there are gamepad libaries that make the correct USB calls. >>2817125>bit-banging shit over serial and relying on computer-side glue code to make it worklol I've actually done that for a project. What a complete pia. > t. MechE that futzes with projects and crappy code to automate things
Im using a black pill instead of a bluepill for a project. Is there some type of equivalent to the usbcomposite library the bluepill has for the blackpill. I cant find a single example of stmduino custom hid descriptors for anything but the bluepill. In the core theres a usb bare minimum example but its blank.
>>2817206actually i couldnt find usb-c either but i think it'd be technically possible if i could get an adapter like that i think i'll just get a charger that has the same plug, this one is $10 shipped and does 90W, same connector
>>2802510In the early stages of designing a smart humidor for my cigars. Does anyone know of any decent CO2 sensors, sub-$100, that work in humid environments? I want to be able to detect any potential mould growth. My idea is to detect CO2 and particulates in the air, then record and track their amounts; if both go up, this is indicative of mould growth. So I can quickly intervene
>>2817605Looked into this more myself, and the SGP40 seems like a good option. It detects VOCs too, which I need
>>2813014Just learn what the error messages tells you. If you are the most lucky retard ever you search your platform + the error message to hit a home run solution at once.Often it's some failed dependency or a retard filter in the code sample you just copypasted. They actually publish faulty examples to force you to learn.
>>2817645>SGP40That doesn't actually measure CO2. To some extent you can assume CO2 based off VOCs, but in your case I'd probably want to use an actual infrared CO2 sensor. They're like $50 where I see them, see Andreas Speiss's video on the topic.
>>2817963Just realised I meant SGP30 anyway. The specs for that seem to say it does both VOCs and CO2, with the 40 dropping CO2, but I'll keep looking anyway. There's probably something better
>>2817971>>2817963Nevermind, I see what you mean. The SCD-30 looks interesting and comes with temperature and humidity sensors. If I pair that with an SGPC3 for VOCs, I think it should get what I want
>>2816939>It's basically having the arduino unit pass back keyboard commands... which doesn't seem right, would think there's a "gamepad" input of some sort that could be used instead.USB HID class handles everything. You just need to provide correct descriptor during enumeration.>>2817248>If I've read correctly the micro / leonardo ID's itself as such to the computer.There are two options, and both are bad:1. there is an intermediate usb-to-serial chip and your PC talks to it. Then you need a separate USB port (if MCU supports it) to be installed somehow.2. you are talking to the ardushitto bootloader. Then you need to somehow force re-enumeration on behalf of your PC, and send correct USB descriptors>>2817248>>crippled multiple generations of embedded enginners>I think it's more like "enabled a generation of non-programmers / EEs to futz around on projects with crummy codeNo, it totally messed up the learning curve and labor market expectations.1. Entry level jobs are destroyed, because "Oh I can blink a LED myself"2. Above entry level there is a wall of "No way I'm reading the 300+ pages datasheet" and moving from ardushitto libs into something actually usable3. And then customers come and "Whyyyy are you saying you need to rewrite everything from scratch?? It MOSTLY works"
what would I need to do make a bluetooth light turn on from a program? I want to make a very simple program that just turns on a lightbulb because I think that would be cool. I have no real idea where to begin on the physical side...
>>2818526>There are two options, and both are badOption three:>get a programmer dongle>wipe the bootloader>use the dedicated USB hardware to implement the HID class just as God intended>>2818530It’s probably pretty easy with an ESP32 and ESPhome. This is like five layers of abstraction atop what actually goes on, but I wouldn’t recommend bare metal C for a complicated peripheral like a Bluetooth modem to a beginner.
>>2818530https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/esp-ble-mesh/ble-mesh-index.html#esp-ble-mesh-examples
>>2802510is there a point to the i2c protocol on HD44780?none of the instructions use sda for data and instead read from d0-d7 and use another bit for coordination with the embedded controller
>>2803735>the way those led-legs and resistors are bentFUCK
>>2819165>>2819165nvm i went to set up the pinout and i think i am supposed to program mutliplexing here
>>2819382>>2819386
>>2819387>an array of 8 booleansyou know that’s just a byte, right?
>>2819405Quit explaining how computers work and let me exist in my zoomer python world
>>2817248>>2816939Draft design. Waiting parts from China, micro knockoffs and 10-key pad. Will steal rest from from GBA controller.
>>2802510bros i need some help because things seem very silly:https://pastebin.com/2hjVQqaLit is well commented dont worryBut basically this is what happes no matter what i try to do: PICRELwtf?things are lighting up and they are simply supposed not to
part is 1602A btw
>>2804128I see an instagram video where the gardener protect their plants with an 5v open wires circuit.. the snails dies instantlyu
>>2819543>the snails dies instantlyuha, so you're the intended audience for those ridiculous fake videos like ''double your internet speed using just a paperclip''
I just bought a Nucleo H755ZI-Q board since the H755 is evidently a dual-core arm cortex M7/M4 microcontrollernow, how does that actually work? I always assumed that to effectively make use of multiple processor cores/concurrency you need an operating system. Does that mean I'll need to install an embedded OS onto it somehow?
>>2802510>several months old generalah, i see. Needs to be made again in g, this fits technology more than diy after all, nobody here is daily driving their own processor.
>>2819658chapter 11 or intel manuals volume 3, local apic.
>>2819521read the datasheet
>>2819673i did, i posted pastebin and part number, the datasheet is 12 pages long (assumes you know how th lcd is supposed to work) so i went and read hd44780 and i still have no idea what is going on
>>2819671Pretty sure it wouldn't get bumped quick enough there. From my experience, not many people on /g/ are doing embedded.
>>2819680we can psyop the autists into it and it will trickle down from there through shitpost and inclusion in the other generals' OPs
>>2819681>more people who don't understand electrical hardware wondering why their arduino won't power a motor, why they need pullup resistors, or why they can't sample a 12v signalno thanks
>>2819521Just include "hd44780.h" tardiuno
>>2819679if you read the datasheet table 11 on page 39 it walks through the setupyou seem to only do function set and then skip over display on, entry set steps.have you tried following this example?i had a look when you posted first and i don't think you posted the part number of the driver or i didn't see it.unless you post more info we can only assume wiring/voltages etc is correct, don't just assume a new or unfamiliar part of what you are doing is whats wrong, consider all possibilities.
>>2819521there are instances where you pull E high but don't pull it back to low. Line 138, 157 etc. Write a helper function that writes a byte to data pins and calls init_transaction. Probably also waits for WAIT_BUSYFLAG before doing anything. Use that function alone for writing data.Start by a simpler examples that just inits the thing and puts a char and nothing elseRead the data sheet (carefully)
>>2819691looking at the table right now, i think internally you cant access ram until display on/off is called and i am doing my whole setup (clear, nigger, return home) and then turning it on>>2819693i am a bit worried about speed (controller is one instruction per microsecond, claimed at least) but i will write the wrapper and remove it if i *need* toCant mess around right now so i will report tomorrow, thank you Anons.
>>2819699>clearly didn't read the datasheetEverytimeIf are worried about speed then write your data directly to io registers instead of using tardunio's API to write them bit by bitAs long as you prepare your data on io pins for next command before that 1ms is over, you are not really losing time
>>2819703>clearly didnt read the datasheetyou literally have to write them bit by bit per the manual>there must be an intermediate state between a change from an output high to an input etcetcsection 13.2.3 of atmega328panyway, the IO clock is as fast as the instructions clock...
>>2819826I haven't checked the Atmega but on the pic the IO ports were just registers and you could write the whole port at once if you wanted.
Now i am perplexed, writing display OFF and display ON makes picrel happen no matter whatSome things are commented because i have been trying stuff to find something that might work but nothing does, a second line showed up at least :D
btw i did fuck around with the pulse (20 micros is super short), nothing worksit is over.
I want to make a Linux SBC I've laid out several boards (nrf52) for work and they work fine but I've never done anything with DDR memories or high speed data linesAlso another problem is, i have no use for such a board. I just like having random Linux devices which i can SSH into and make them so dumb stuff like web scraping etc
>>2819836use it as a proxy for random web surfing (downloading loli doujinshi)
>>2819826Read the datasheet. It even has an example for reading all bits at once. Set Enable pin after setting up all other data pins (all together) so your display does not try to read things while things are in intermediate state
>>2819848are you ignoring the pastebin or something?I found a different document for the part, didnthe init sequence and now a cursor showed up (holy shit), i think the problem is solved and i just need to fix the bits for writing nigger since they seem to be different from the other document, not gonna update because this general is dunning krugers who dont click on pastebins and an unfrenly autisti will move it to g on my own.
>>2819876>are you ignoring the pastebin or something?ignoring what? it is just tardinio code. I am suggesting you to use port registers directly so you don't write write those registers bit by bit and not the make mistakes I pointed before
>>2819876>an unfrenly autisti hope you don't mean me because it would bring me an overwhelming sense of vicarious wellbeing to see a pic when you get it working and i didn't mean to be unfriendly just succinct.ganbare friendo.
>>2819836> sshIt’s a meme.Just hard-wire it with ethernet and use telnet.They used to make 68000 based microcontrollers with eth phy on them back when fruit pi was something your mom made on Sunday.Or, better yet, RS422 (or RS232).
>>2820009>telnetI guess it's ok for local network, and if you put an embedded thing on the internet you deserve anything that could happen. I'd even go further and drop TCP altogether. Use UDP, which you can implement on top of raw ethernet in a couple of lines of C.>RS422>RS232Isn't that different from a normal 3.3V UART? Why use that garbage?
>>2820009>They used to make 68000 based microcontrollers with eth phy on themThe original ESP32 has MAC hardware>>2820016>Why use that garbage?because it's standardised, plus it uses the best connectors ever madethey're sturdy, can be screwed together so they don't accidentally come apart, you can easily have cable-mount and chassis-mount versions of both the male and female end, there are very reliable waterproof versions of the plugs, you can easily solder the connectors up yourself, the pins are the right width apart to solder a standard 2-sided 1.6mm PCB between them, they have their pins numbered on them, they have a convention as to master and slave but you can use a null modem if you want, they're perfect.if only ethernet had as good a connector, maybe we wouldn't have to use USB for all our data and power peripherals
>>2820018You mean D-sub? They don't dictate any protocol. You can just use 3.3V UART with it instead of using that weird legacy odd-voltage shit.
>>2820019>You can just use 3.3V UART with it instead of using that weird legacy odd-voltage shit.yeah but that's not standardised.with rs232 at least you can just plug it into your pc and expect it to just work without caring about pinout or voltage levels.and when you die, your wife's grandson will be able to just plug a quantum optic to rs232 adapter into your microcontroller project and not fry it with ±12Vthe max232 just worksthe only downside of rs232 is that you can't carry significant amounts of power over it, which is why ethernet is the better standard electrically speaking. i want to charge my phone over poe.
>>2820020Literally everything I've touched (except legacy PC hardware) used 3.3V UARTs instead of RS-anything.
>>2820021yeah and what connector did they use?
>>2820021then what youve touched is tarduino tier garbage. in the real world, where robustness and longevity matters, nothing uses 3v3 UART to do comms with off board/external systems
>>2820077This isn't entirely true. On a lot of professional electronics there's a serial port present on the board as a simple 4-terminal unpopulated pin-header. It isn't intended for use by non-technicians, or anything other than a temporary connection for debugging or reflashing hardware, but these are usually 3.3V UART. I'd be more amenable to using 3.3V uart if there was a half standardised connector for it, especially one that I could panel-mount. Dupont crimps don't count.
>>2820077>tarduino tier garbageMCU and FPGA stuff isn't "tarduino tier garbage" you mouth breathing fucking retard.
>>2820109>I'd be more amenable to using 3.3V uart if there was a half standardised connector for it,How is "solder wire to pad" not standard?
>>2820141I mean a standard for easily plugging and unplugging various peripherals. For one-time debugging I kinda agree, but soldering wires to pads is never gonna be a replacement for RS232.
>>2819829You need a potentiometer to control the backlight brightness. Looks like you don’t and the backlight has full voltage.
I'm making a synchronous 20W boost converter with a 64MHz ARM MCU, a gate driver IC and some pretty slick 1.6mΩ FETs. Wish me luck boys i have never made anything like this before and i have barely any knowledge about control systems etc. I'll just dump the details i calculated if you guys are interested>input voltage 3.2V from a LiFePO4 32650 cell, output 12V at 2A max>switching freq 500KHz to 800KHz>inductor 20uH 10A saturation 50mΩ>this should give me between 150mA to 125mA of ripple current (can't fit a bigger inductor in the space i have)>aiming to do basic proportional PWM from the feedback i get>ADC measurements triggered when low side FET turns off (every single switching cycle)Happy to receive feedback
>>2820573>every single switching cycleIs your ADC fast enough?Generally for SMPSs I want to use an analogue main PWM loop (e.g. TL494) and maybe use an MCU to control the reference voltages or provide a readout if needed.Also put extra footprints for a snubber network at the switching node, and footprints for a small choke or resistor in series with the analogue power supply. Don't forget to minimise the switching loop.
>>2820590Thanks for mentioning that, i actually do have a comparator which is fed the feedback against a reference and it's output feeding to an interrupt pin on the MCU for a faster digital only feedback if i need it. I don't plan on using it for now.The way i see it, ADC feedback can let me add more intelligence to the device firmware without having to modify the hardware.Also a good point to add a choke in series to the switching node. Its a non isolated SMPS, do i really need the snubber network? I don't foresee any major flux leakage (or whatever it's called) which could happen
>>2820592>a choke in series to the switching nodeNo the choke should be in series with the power going to the analog supply rails, to stop high-frequency noise.>do i really need the snubber network?Maybe, I've found it helped on occasion, it's nice to have the footprints in case you need them, but I probably wouldn't populate by default. I don't know the precise theory behind why you need them, but in general they'll eat the very highest frequencies from the peak of your inductive spike, it's those highest frequencies that radiate the worst electric field noise and could interfere with your circuitry if it isn't very thoroughly shielded.Any plans to measure FET drain current? If so, you could implement current-mode control or voltage-mode control, or some combination. Or just use it for fault detection to prevent your bottom-side FET from exploding.I'd also add footprints for RC filters on your analog inputs, if you don't have them already.FYI all the extra footprints and things I'm suggesting are things I usually add to my very first prototype, where I don't know what I'll need and want to avoid ugly bodge jobs, before probably iterating the design once or twice more.
>>2820573> 20 μH @500 KHzThe resonant frequency is around 8 MHz, you are forcing it at another frequency which is going to be very inefficient.
>>2820869it's a boost converter, not some fancy resonant-mode switcher
>>2820869Switching at high frequencies is extremely difficult and never done because of high losses and the absolute behemoth of a gate driver that will be needed, capable of sourcing and draining several amps of current. Even the buck converters used in motherboards to feed CPU power are multi phase but still individually switch at low frequencies.Another solution would be to increase the inductance but high value inductors are larger in size and much more expensive.To be honest I'm not sure where you got that switching an inductor at its resonant frequency will increase the efficiency. I've never heard of this
>>2820923Resonant converters are more efficient because they have far less switching losses. When they close the switch, the current going through it is virtually 0, at least for a ZCS topology. It's similar for ZVS topologies, I think you get less energy loss to unwanted oscillations or something, but idk the details. They're also lower noise because you don't have anything above the fundamental frequency.To not require an enormous inductor with thin wire, you lower the system's resonant frequency using capacitors. Now there's a thought.
>>2820925I have heard of ZVS and ZCS topologies as well but i too don't know much about themI guess I'll try to build one sometime. PCBs are cheap
>>2820918> boost converterI think it would be more important for a boost converter, no?> Switching at high frequencies is extremely difficultNot really. And it’s becoming more common in mass-produced electronics. The converter in my “inverter” microwave oven uses multi-strand wire in the main switching inductor to overcome the skin effect. I can never seem to fix that dammed thing.> bigger and more expensive inductorsThis is what I’m suggesting.For a only 20 μH it’s completely feasible to build your own using 14 awg house wire depending on your core and whatnot, but bigger to keep the frequency down unless you have multi-strand insulated wire.> never heard of resonant and efficiency correlationI would think it’s kind of obvious if you think of how the inductor works—in this case it will be most efficient probably around the “top end” of it’s power output. As are transformers.The tesla coil people might have some good insight on that (I’m not one of them)Obviously I haven’t seen the whole circuit, I’m just saying test as you go. I made a lot of assumptions to come up with 8 MHz, it could be wildly different in your circuit. It just seemed low by about an order of magnitude.
>>2820936>I think it would be more important for a boost converter, no?Going resonant is an entirely different topology. A boost converter works by turning on its main transistor, the current through the inductor increases linearly, then the transistor shuts off after some amount of time or after the current reaches a threshold. The shutting off of the transistor causes the magnetic field to collapse and cause a voltage spike, shunting the energy stored in the inductor out through the diode and into the output cap. This is fundamentally non-resonant. To control this topology, you just need to modulate the duty-cycle or threshold current as a function of output voltage. You can make it even simpler by just turning the oscillator on or off depending on the threshold, a simple 555 timer can be used as a boost controller if you're desperate.A resonant converter turns on the transistor, the current increases and then decreases sinusoidally. The current passes back through 0 on this sinusoidal path, at which point the transistor shuts off. Then a different transistor on the opposite side of the inductor turns on to do the same thing but out of phase. The control of this kind of topology is much harder, since you can't vary the frequency or duty-cycle of the switching without breaking resonance or collapsing the field. Switching controllers that operate with this topology do exist, but they're pretty complex, and are only used for very high-power supplies where heat dissipation matters. Even kW ATX power supplies still use TL494s.
>>2820957No one was actually suggesting using a resonant circuit, but choosing a more optimal inductor for the pump frequency in typical operation, and that optimum point is the resonant frequency whether it’s free-running or externally pumped.In this case, it’s a fixed 12 V output, and a nominal 3.2 V input so fixing the voltages makes computing all that (or testing) it easier.
>>2821203A mild inter-winding capacitance would slow down the ride time of the boost voltage spike, so the diode/high-side FET would have the current spread out more. Maybe this will make it significantly more efficient, but operating close to the resonant point for a topology that usually assumes the inductor has no capacitance may play havoc for control loop stability. Especially for a current-mode converter.The aim of most switching converter design is to maximise performance while minimising inductor size, an inductor with a sensible low self-resonant frequency would be significantly more expensive for a couple percent more efficiency at best. If you wanted to use a small inductor and a parallel capacitor to drop the frequency, then the inrush current into the main FET would be awful and kill your efficiency gains. That might even happen with the big inductor approach. It would be objectively more sensible to use a resonant topology either way.
esp32cam keeps crashing when writing to SD card. i think its because im using ext0_wakeup and it is being held low too long by the PIR sensor. it seemed to work at first and took multiple pictures, but when i test and hold pin low manually it only works with a low pulse and fails to mount sd card if held for more than a few millis. dont think i want to de bounce since im getting long pulses from the PIR instead of multiple shorts what else can i do?
Would you recommend this to a total beginner? I'm about to make a perhaps impulsive purchase here. No idea what I'm doing.
>>2822085If you want to use arduinos, please learn basics of electronics and C-like programming so you don’t just flounder like a lot of tarduinos. For anything other than just copying an existing project, arduino relies on a foundation of supporting knowledge. Even for copying a project, if the tutorial isn’t very good you may find some assumptions and implications hard to follow.
>>2822085Not chink shit the collection, like in your image. Just buy any of these tiny boards for not more than $15, that will be enough for a start. I'd tell you to stay away from Arduino shit and maybe buy something cleaner like a RPI Pico, but I guess you'd blame me for suggesting something that isn't part of the Arduino ecosystem with its thousands of retard-level resources.
>>2822085that seems pretty expensive for what you get, also consider getting an atmega32u4 based card like a teensy 2.0 or a pro micro so that you can learn to program it with C/C++ and actually modify and read the registers with bit shifts which you can find by reading the datasheet, you will learn much faster and your knowledge will be deeper. you can skip bare metal programming for now and start with avr's microchip studio though.for the arduino uno get one with a removable chip, that way you can use it standalone and then use the arduino uno just for flashing it.also i realize now its hard to find good resources for complete beginners about the programming aspects of microcontrollers without access to courses, does anyone have a book or website for this? would be nice if it was added to the op
>>2822085If you have zero electronics crap laying around, and $45 is pocket change for you, it's probably fine. There are a gazillion of those kits out there; I've never tried to actually value all the parts but it's basically taking advantage of the combined shipping cost and low unit part cost to get you as much stuff as possible under 1 pound. You'll at least have enough to keep you busy dicking around with projects on your desk. I had most of that stuff on hand when I started playing with Nanos, and any "real" project required other specialized modules I needed to buy seperately anyway. This kit wouldn't have been a good option for me, or other that are already doing electronics work.
I'm looking at Santroller to set up some guitar controllers for a console. Software appears to allow you to program Pi Picos ootb; you connect up the Pico to the controller inputs and then use Santroller to configure the thing for whatever console you want to run it on. I've only use Arduino for my controller projects, not familiar with Pico. The short bit of reading I've done, sounds like Picos are programmed using MicroPython... which it runs natively? Or compiles on board? The example I saw was using Thonny to dump code onto the board, but wasn't clear if it was compiliing it on PC, on Pico, or just sending over the code.
>>2810945It's worth the extra $10 for the giant code base RPi already has. If you spend 14 hours re-inventing the wheel to get your $5 Grape/Mango/Papaya/PlantainPi glorified broadcom breakout board working what you're essentially telling me is that your time is worth $0.71/hr.
>>2822195Tarduino has better library support
>>2822224Apples to oranges
>>2802510Radio is hard. I want to make outdoor thingmabobs that send/receive things to an indoor base station. Once I put my thingamabob outside the signal really turns to shit.Maybe its the ass tier modules I get from AliExpress.
>>2822428increase power, or, put a high gain weatherproof antenna on your roof and run the coax inside. that way all rf is running outdoors.
>>2822428LoRa
>>2822428>>>/diy/ohm/
>>2802510is there any future in fpga career?
>>2823237Depends on the application.Are you going to work for Tek or something? If not, then no.
>>2823256I meant working for intel etc...
>>2823237The picrel doesn’t make any sense.For a data acquisition application a fpga can’t access memory (i.e. for oscilloscope acquisition) simultaneously either.What they do is interleave it to different memory chips.Programming is no different. As an example, the PS3 Cell BE had 9 cores and each had 256 KiB of independent memory so you didn’t have to fence, c&s, etc, and it just settles up later over the bus.Only retards vigorously read and write the same variable in a memory location across many threads in critical applications inside their innermost triple-nested for() loops.
Retard-tier RPI Pico question. If you plug one of these into a Win11 machine via USB... what should happen? Do the LEDs light up, does it open a system volume? I've tried plugging this Pico in on a couple different cables, both with and without pressing the BOOTSEL button while plugging it in, and not getting anything. I have two of them, both are doing the same... nothing. Hard to believe both are DOA but I'm ready to ship them back. My experience w/ Nano is they at least flicker the onboard LEDs as they come up...
>>2823287Nm… bad cables. I fucking hate micro usb cables. And no lights on these even when they are working.
My friend gave me 8-10 ESP8266s dev boards and I got my env setup to the point where I can make it blink.I know a little bit about programming (webshitter stuff) and nothing about embedded development.Time to learn some C and tinker.>enjoy the free bump and feel free to call me a useless faggot or whatever
>>2802510Is this the place to ask about whole home generators? I’m dealing with a multiple day power outage and looking for some ideas to avoid this in the future
>>2823347No, this is a thread for microcontrollers. Best bet is probably an sqt thread, or making an off-grid energy thread if there isn't one already.Cheap method is just to buy a UPS (maybe a 2nd hand one with a dead battery) and bodge in a 100Ah or two to the internal connections. Then plug in your fridge and any pilot lights. Run some 12V stuff like lighting and your router directly off the battery.
I love ESP32, is that really wrong of me?
spent the last 5 hours fucking around with a project designed to be built using stm32cubeideeven vscode would be easier
>>2823334cables werent bad, they are charge only. you need data cables.>>2822085if your going to buy that do it soon, those kits were $30 3 months ago... then you have to watch the paul mcwhorter arduino tutorials, he goes through all the projects without just teaching you to copypasta. >baud rate 9600
I'm trying to flash firmware to a T12 soldering controller that has an STM32F103C8 on it. I was following the instructions for using OpenOCD (stlink util is only for windows) here:>https://github.com/deividAlfa/stm32_soldering_iron_controller/blob/master/Readme_files/Programming.mdBut I get the error:>** Programming Started **>Warn : no flash bank found for address 0x08010000>** Programming Finished **>** Verify Started **>Error: checksum mismatch - attempting binary compare>embedded:startup.tcl:1516: Error: ** Verify Failed **>in procedure 'script' >at file "embedded:startup.tcl", line 28>in procedure 'program' called at file "ocd-program.cfg", line 12>in procedure 'program_error' called at file "embedded:startup.tcl", line 1577>at file "embedded:startup.tcl", line 1516It reads with an ID of 0x20036410 and a 64 KiB of flash. Is the code be trying to address reserved memory? Or is there some other problem? I'm fairly sure both the STlink and the KSGER V2 board have legit STM32s on them, but while the greaseweazel blinky code did load fine I couldn't see any flashing on the PC13 pin with my scope.help
>>2823568Wait 0x08010000 should be in range of the normal flash addresses, it's only just over halfway into the flash address space. There's 0x00020000 addresses of flash memory here, which corresponds to 131072 * 32 / 8 = 524288 = 512KiB, the maximum size for an STM32F103. But this firmware should definitely work on chips smaller than 512KiB, as it says:>The actual requirements are 10KB RAM and 64KB (*) flash.>(*) Currently the firmware has surpassed the 64KB limit, and uses the additional undocumented 64KB flash block.>(*) All 64KB devices have 128KB, with the second 64KB block untested from the factory, so not guaranteed to work.>(*) To date, I have found zero issues. Original KSGER firmware also does this.>(*) ST-Link checks the written data and the firmware uses CRC for settings, any error will be detected.I don't get it.
>>2823564>they are charge onlyYou're probably right; I keep these cords in a box and just pull as needed. Problem I have now is nothing I have actually uses micro USB so I've no way to test whether a data cable is good with a known good device. Well, other than these Pico. Which I now know work.
>>2823568>>2823573Shit, now it isn't being detected by the OpenOCD, OR the bloaty STM32CubeProgrammer. We might be bricked, or even fried.>>2823579Test them all and put some (coloured) heatshrink around them to designate the cables as power only or data capable. I tried to colour code the USB A ends to tell me what was on the other side at a glance, but then the heatshrink just slipped off. Get the glue-lined stuff.
>>2823581if you want to color-code USB connectors, use markers. This is why I avoid black USB connectors from thrift store bins, except that I only do it to color the logo so that I can see which side goes up.
>>2823573what kind of shitty programming is on that thing that takes up more than 64K. holy fuck
>>282361164K? That’s nothing. It’s still using TCL… i haven’t seen that travesty in more than a decade
>>2823665>It’s still using TCL… i haven’t seen that travesty in more than a decade>is not using openocdWhat are you doing here?
>>2823585>I avoid black USB connectors from thrift store binsimpossible to avoid black USB cablesbut they're not a problem to mark if you got some paint markersor just some oil paint and a small brushanything from a lil tube of artist's acrylic in ''robin's egg blue,'' to a gallon of house paint
>>2823581RIP, the STlink (the other STlink I have too) connects to another board, but not to this one. I'm pretty sure I didn't burn some fuses I shouldn't have, even then I think it should be detected. Unless that blinky script somehow shares some of the SWD pins.Maybe I try and desolder the chip and resolder one that I scavenge from elsewhere, but my bluepill is fake. The STM32 on one of my STlinks looks to be real, but without hot air it will be nigh impossible to recover. I might try to desolder it with a shim underneath. People online are suggesting a piece cut from a razor blade.
>>2823754they're usually too short for anything useful so I've been cutting and splicing mine with 18g wire to make an 8" cable into 8' cable. nothing stopping me from making it longer except maybe ohms law. usb-jews hate this one trick.
>>2823339Good luck.
if i throw a Pi in my PC case for reasons, is there a way to connect my motherboard to the Pi that would guarantee SSH access to the Pi from my PC even when the Pi isnt connected to the network?
>>2824693>doesn't even know how to set up a private network linkgo back to /g/ and stay there until you learn some basicsnetwork <--- eth [PC] eth ---- eth [PI]
>>2824694seems simple enough but 1) im running wangblows so im not sure how straight forward setting up a VLAN would be; and 2) my motherboard has one physical ethernet port so id need to buy some usb adapter, meanwhile my motherboard definitely has some sort of USB header on it somewhere so if this could all be done over USB that would be perfect.
>>2824696>running wangblows>one physical ethernet portnot our problem that your PC sucks, also you failed to mention such suckage in your original post, which is even more faggotry
>>2824700can you go be a nigger somewhere else please?
>>2824693I'm not sure whether PCs have this these days, or if it would be naturally available on the pi when it boots, but a UART header would be my first go-to. Well it's not SSH at that point, it's just opening a serial console, which is arguably even nicer.
>>2824693>>2824737Or use something like this:https://www.blicube.com/blikvm-v2-pcie/A pi that slots onto a board that plugs into one of your PC's PCIE slots. This one uses a compute module though, so if you already have a pi you may want to look for a different model.
yo dawg heard you like stlinks(both have fake/clone chips btw)
>>2823775>>2824740I GOT IT WORKINGturns out i had to manually hold down the reset line for just the right amount of time, i guess the big cap on it might have been messing with the stlink
Fuckin' piece of shit cheap Chinese ESP32 cam boards. I built this little doorbell cam over a year ago, it's still working great, no problems. I've now rebuilt the same thing again with a new round GC9A01 display, and I can't for the life of me get it working consistently. It crashes any time I point it somewhere bright, if I keep it aimed down it stays running smoothly. I assume this has to be the camera's fault. The power is fine, no dips, no change in behavior from disabling and removing the LCD and stopping the stream, it still crashes if pointed out a window or toward a bright screen. Dammit Ping
>>2825002How much was the camera chip? And did it have a lot of reviews? I'm looking to do a camera project for security too in the future.>>2824767Way to go anon.
https://streamable.com/dwors8>inb4 this links to porn in a couple of days
Glory be to the Fuhrer of Germany.
>>2824767dropped it and broke a corner of the OLED, not including any pixels but possibly including some micro tracesit still works fine for now, super-glued the back of it, hopefully it keeps working.