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

/diy/ - Do It Yourself


View post   

File: 99 KB, 800x750, Arduino-Mega-Pro-Mini-05.jpg [View same] [iqdb] [saucenao] [google]
1689490 No.1689490 [Reply] [Original]

no such thing as "too many pins" edition

thread for everything arduino and other devices in the arduino ecosystem (esp32, blue pill etc.), raspberry pi and other microcontrollers are also allowed

>what is arduino?
https://www.arduino.cc/

>useful resources
I don't have any, pls suggest some

Previous thread: >>1651573

>> No.1689497 [DELETED] 

What are your favorite SBCs and microcontrollers? Which ones do you avoid?
What are the "better" alternatives to Arduino and rPi?

>> No.1689683

>>1689497
rpi zeros and arduino micro clones are so cheap, there's no reason to use anything else desu.

>> No.1689733
File: 1.34 MB, 2048x1536, 20150918_154129.jpg [View same] [iqdb] [saucenao] [google]
1689733

>>1689497
>>1689683
I disagree. ESP32s are pretty cheap, and if you want to build something around it you can get a lot for only $8.

>> No.1689734 [DELETED] 

>>1689733
the /pol/tard compares apples with oranges
chocking development

>> No.1689735 [DELETED] 

>>1689733
Hitler did many things that were wrongs. Hitler was guilty of the deaths of millions of people, both whites and what you would probably call "subhumans".

>> No.1689737

>>1689497
STM32 Nucleo or bluepill if I had to pick.
32 bit arm > twenty-year old 8 bit avr technology IMO

rPis are pretty decent nowadays but if you want something better get an embedded industrial PC.

>> No.1689746

>>1689737

Back to /g/ with you assholes.

>> No.1689830
File: 201 KB, 1032x581, Numitron Progress.jpg [View same] [iqdb] [saucenao] [google]
1689830

Also progress update.

>programmed numbers
>programmed PWM fading
>hooked up and programmed RTC
>did not need the SN74HTC595N since the HC will still be triggered by 3.3V
>received voltage regulators

Still more to do:
>finish schematic for circuit so far
>order peripherals for voltage regulators
>integrate a voltage monitor
>so many things to program

>> No.1689847

>>1689746
>Back to /g/ with you assholes.
Explain, I've been on /diy/ since post 1, I'm not a /g/ reader.

>> No.1689975 [DELETED] 

>>1689746
no need to be mad. the comment you posted is on-topic

>> No.1689978 [DELETED] 

>1689746
no need to be mad. the comment he posted is on-topic

>> No.1689979

>>1689733
Bro what display is that?

>> No.1689989
File: 2.56 MB, 300x424, downloadfile.gif [View same] [iqdb] [saucenao] [google]
1689989

>>1689735
There is a place called reddit that you would be more suited to. Please go there.

>> No.1689997 [DELETED] 

>>1689989
keep /pol/ in /pol/

>> No.1689999 [DELETED] 

>>1689989
just stop injecting politics into everything

>> No.1690012

>>1689979
Some shitty oled I got on ebay.

>> No.1690111
File: 3.07 MB, 480x640, wonder.gif [View same] [iqdb] [saucenao] [google]
1690111

>>1689735

>> No.1690115 [DELETED] 

>>1690111
again: keep /pol/ in /pol/

>> No.1690117 [DELETED] 

>>1690115
/diy/ is rightful /pol/ clay and you'll be reminded of this every time you try to fight it

>> No.1690118

Any ideas for arduino libraries, I have 3 published now in the library manager.

>> No.1690125

>>1689497
I use PICs arduino are boring , copy and paste someones elses library and everything works.
I prefer to write entire project myself

>> No.1690132 [DELETED] 

>>1690117
nope. repeating it doesn't make it so. you're just trying to infect all the other boards. keep your nazi idolatry in your containment board.

>> No.1690160 [DELETED] 

>>1690115
Fuck off lgbtqpjidf brony, /diy/ is rightful /pol/ clay

>> No.1690165 [DELETED] 

>>1690160
No. This is a /diy/ board, specifically a general for SBCs and MCUS.
Keep your politics out.

>> No.1690404

Well then
Is the performance of the ESP32 worth it over the 8266?

>> No.1690632

>>1690115
>Mommy! Protect me from '3030303'!!!!!!

>> No.1690879

>>1689979
Cheap i2c oled from AliExpress or eBay. Costs 5$

>> No.1691019

>>1690632

Finally. We have an arduino savvy janitor. Praise the lord and let the river flow.

>> No.1691682

>>1689830
Looks really comfy, how much did it cost?

>> No.1691722

>>1691682
I'm not sure yet. The components I have on it now are more expensive then when I just order the bare bones parts. When I get the schematic and board layout finished I'm going to have a BOM which will include price.

>> No.1691825

Anyone have a recommendation for a battery power adapter for the Raspberry Pi?
I'm looking for something that can keep a Pi powered for about 8 hours at small CPU loads.
I'd rather not power the Pi through the USB port, since I'm afraid it might get snapped off.

I've looked around a bit, and it seems most of the available hats either cost 3x the price of the Pi, or they're barely usable junk.

>> No.1691933

>>1689733
what about ease of use

>> No.1692143

>>1691933
Pretty easy. Had to get one special library to be able to run it and that's it. Aside from having to something different for analog read and write it's not bad at all. Unless Atmel comes down on their prices I'm sticking with ESP32s for now.

>> No.1692184

anyone do arduino sketches on upwork? I have no idea what to charge. It seems to be mainly middle eastern college students outsourcing their homework

>> No.1692201

>>1689847

They had an eterna-thread about arduinos for years. I haven't been on /g/ in a long time though and omg it sucks hot spicy donkey dick now.

>> No.1692240

>>1690118
Something for PID thats got better documentation than whats out there presently.

I need to do water conditioning and lots of thermostats and if I could use a single library for PID of anything it would be nice. Otherwise I need to be a math major and an expert at reading someone else's code.

>> No.1692360

>>1689490
i have some of these old rgb led and wanted to build a dot matrix with them. thought about using tons of multiplexer but saw they save a lot of them because the eye is slow. are there any good tutorials to read into? don't know much about electronics, just want to get it done to start the programming on my raspberry pi2 and expand it being controlable by my smartphone. don't even know how much current these diodes need, i don't have any sheets. just have the diodes, my raspberry, 5V 5A power supply and some resistors.

>> No.1692365

Why can these little shits only listen to one serial port at a time? I wanna listen to my GPS module and an rf receiver. Don't tell me I need to step up to a full blown Linux board

>> No.1692413

>>1658298
>a SMALL nuclear battery (photoresistors and tritium just for the memes)
are nuclear batteries legit for hobby projects?

>> No.1692416

>>1692413
Yeah if you want to spend $100,000 on tritium

>> No.1692426

>>1692365
Because you're using meme hardware that actually sucks for anything other than flashing LEDs.
Get a real uC with dedicated peripherals and decent interrupts.
Or hell, get a dual core uC if you don't want to play with interrupts.

>> No.1692448
File: 43 KB, 1393x485, sigrok_lcd_nano_rgb60.png [View same] [iqdb] [saucenao] [google]
1692448

>>1692426
>Get a real uC with dedicated peripherals and decent interrupts.

Arduinos (meaning AVRs) have perfectly fine interrupts and you can easily handle more than one UART on something like a Mega2560 as long as the baud rate isn't too fast.

On another note, anyone who doesn't have any type of logic analyzer seriously should look at the Salea knockoffs that are about 10 bucks and can do amazing things with Pulseview from sigrok. Pic related is me looking at why my LCD wasn't working. Turns out it was a bad connection, but this told me that all my data lines and the code were ok.

>> No.1692498

Anyone have experience with using cellular data? What's the ESP32 equivalent for cellular? Anything about this that's a bad idea? (aside from data prices, though hologram io looks pretty nice)

>> No.1692503

>>1692498
>https://docs.espressif.com/projects/esp-idf/en/latest/index.html
here's the esp-idf full (stable-latest) doc by espressif.

>> No.1692505

>>1692503
By "ESP32 equivalent" I meant a popular board for using cellular/sim cards. The docs you linked don't seem to cover anything cellular related, unless I'm blind.

>> No.1692530

>>1692498
Lora

>> No.1693607

So I need a pwm fan controller that will take a reading from a 50k temp sender.
Its for fan control on my watercooled pc so I want it to start the fans at around 30°c and full speed at about 55°c.
I've probably got all the stuff (Arduino, sensor, resistor, breadboard etc), I'm just not sure I can be bothered to build it all and write code when I can buy one from AliExpress for £5. I can't fit a full on aquaero in there cause it's in a tiny mini itx case.
Can anybody convince me not to be lazy and build it?

>> No.1693631

>>1693607
>>>/fit/sig

>> No.1693725

I'm finding it hard to get real answers on the googs, so here's my problem:
If Im making a pcb with micro and other ics that need an 8Mhz oscillator, is it better to give each one it's own oscillator, or to split one between devices? The devices in question will be ~4 to 5 cm away from each other max.

>> No.1693758

>>1693725
8Mhz Isnt that fast, the clock skew shouldn't be a problem.

>> No.1693765

>>1693758
Thank you. What resources do you recommend for learning good pcb design as well if you don't mind me asking

>> No.1693791

>>1693725
>8Mhz oscillator
If you are talking about a crystal, then each chip needs its own. If you have something like a powered silicon oscillator, you can use it on multiple chips, as long as they don't load down the oscillator

>> No.1694097
File: 1.15 MB, 2704x4056, IMG_20191003_1934114.jpg [View same] [iqdb] [saucenao] [google]
1694097

>>1689490
>build a bootleg lidar out of tof-sensor and steppermotor
>copy and paste together a script that reads a distance, draws a line on the oled and turns the motor 1 step, mostly imports from pre-made libraries
>script runs so slow it does like 1 step/second
>rpi b+ overheats to the point where it shuts off
is this task really that demanding or is my script so badly optimized that it's keeping the rpi at 90%load constantly?

>> No.1694102

I want to use a arduino to control a robot arm, with the eventual aim of having it draw and paint things for me. is the a reasonable use of an arduino and can anyone suggest a nice robot arm kit?

>> No.1694104

>>1694097
how about you post your code, and maybe htop on the raspberry too? too little info to know where the problem really is

>> No.1694286

>>1694102
You need a servo controller.

>> No.1694510
File: 18 KB, 376x400, 7seg.jpg [View same] [iqdb] [saucenao] [google]
1694510

I've found some old Soviet 7-segment displays and want to hook them up; problem is, they're all common-anode, and I'm too stupid to figure out how to control them. The best guide I've found so far is pretty poorly written (or at least in a way I can't read it), can someone please help me out here? I'd love to put these to use. Pic related is very similar to what I have but not mine.

>> No.1694608

>>1694104
posted my code on /dpt/ yesterday, turned out drawing to oled every step is too draining. Re-wrote it so it stores all values in a list and draws them once every 180deg, now it's running fast and with virtually no cpu-load

>> No.1694620
File: 29 KB, 474x474, 17999561.jpg [View same] [iqdb] [saucenao] [google]
1694620

>Programmed pro micro to move the mouse randomly
>Now I can't upload anything else to it because I can't control the mouse
What do?

>> No.1694628

>>1694510
fuz them

>> No.1694799

>>1694620
Time to learn hotkeys and keyboard navigation

>> No.1694898

>>1694510
VFD?

>> No.1694910

>>1694898
Not a VFD, just old LEDs. I can get them to light up with 5v.

>> No.1694928
File: 27 KB, 1016x818, shift regsisters.png [View same] [iqdb] [saucenao] [google]
1694928

>>1694910
Then control them directly with the GPIOs of a uC or use shift registers to limit the amount of pins you use.

>> No.1694932

>>1694928
I'm not sure if you're getting what I'm trying to convey. I'm having issues specifically trying to light up common-anode displays; I've only ever used common-cathode, where I can set each pin on the arduino high/low to turn it on/off and use a common ground, but with common anodes, my understanding is I have to have a separate ground pin that I can toggle at will to light them up, since there's only a single 5v supply pin which I have to connect to all the segments simultaneously and therefore can't use it to control them.

>> No.1694936

>>1694932
I think I understand now. Have you looked into Darlington arrays?

>> No.1694938

>>1694932
>common-cathode, where I can set each pin on the arduino high/low to turn it on/off and use a common ground
I'd think common anode would be the same, just different polarity with a common +
Anode to the positive then a low on other pins to turn on individual segments

>> No.1694940

>>1694936
I haven't, but I'll look into this

>>1694938
I'll give this a go, didn't think I could use the pins as a ground for some reason

>> No.1694972
File: 187 KB, 847x532, PLCs.jpg [View same] [iqdb] [saucenao] [google]
1694972

>>1694940
are PLCs allowed here?

>> No.1694984

>>1694972
that sounds like overkill for what he's trying to do

>> No.1695032

Does anyone have experience with non raspberry pi microcomputers?

I don't mean esp/arduino etc, but specifically alternatives the the pi.

When I look it up I get stuff that has a lot more power but is also 4 times the price.

Similarly to how you can get noname arduinos, are there pi alternatives with similar/slightly better specs for less money?

There are the banana pis, but I am unsure if they offer similar experience to a pi, especially regarding the gpio pins.

>> No.1695133

>>1695032
I got myself 2 orange pis, the "one" and "PC". orangepi one died randomly after a year or so (can't remember), the PC is still going. Bad thing about cheap clones is that support is next to none, the only thing I got working (because it's the only thing I needed) was armbian.

As general computing devices they are good, but tend to overheat. Afaik gpio pins work with a library, so those are good to go too. Last time I used the PC, ssh had a problem that it would stop working after a random amount of time, not sure if it's a problem for me only.

That's not all I can tell you, if you got any questions, feel free to ask.

>> No.1695146

>>1694984
Isn't overkill the bread and butter of PLCs?

>> No.1695167

>>1695133
Thanks for the answer, that's already kind of what I was wondering. Basically I was asking if I can go cheaper than a raspberry without major issues down the line, I'm not using it as a media center or something, but for light programming and hardware hacking.

>> No.1695168

Does the Raspberry Pi zero have enough processing power to run a simple html server with flask, getting inputs by users and controlling some LEDs, a stepper motor and a servo?
The application seems overkill for my pi 3 and I could save some money by getting a zero for it and keeping my pi3 instead of buying a new pi3.

>> No.1695218

>>1689490
I am looking for some way to read full 102 keyboard with arduino, so far no luck.

>> No.1695241

>>1695167
I can only recommend it for general computing eg. webserver, file hosting, arduino-like stuff like driving gpio pins and the likes. As for light programming, I can tell you that it's doable as long as you use light DEs and maybe vim as editor, but forget using an orange pi PC/one as a replacement for a desktop.

>major issues down the line
expect non-existent support for anything other than bare linux; hardware support is also scarce af, since the boards often have GPU acceleration, but no drivers for it (the corporations rely on the community for the development, cheap fucks).
I'm not sure if my orangepi one failing was just bad luck or not, but I'd say go for it as they are easily repleaceable and very cheap. You'll learn a thing or two by using microcomputers that are badly supported, therefore without having your hand held by literally tens of thousands of guides and pages and readymade libraries. Buy a spare microSD as a power outage can fry them, and a heat sink too : those things tend to run very hot.

Again, if you need something else answered, just ask.

Also, for "hardware hacking" what do you mean?

>> No.1695249

>>1695218
how about a keyboard matrix circuit + a shift register? with those you can control an almost unlimited number of individually addressable inputs

>> No.1695264
File: 94 KB, 736x825, pr.png [View same] [iqdb] [saucenao] [google]
1695264

Encoding pushbutton presses into 4-bit BCD code with a priority encoder:

>> No.1695275

Does anyone have any experience connecting SX1276 modules to LoRaWAN? arduino-lmic doesn't seem to work on my Uno, and I've tried several things on my STM32, to little avail.
To make my question a bit more concrete:
What library/microcontroller combinations worked for you? Are there any pitfalls I should watch out for?

>> No.1695278

>>1695275
Oh, and if not, are there any cheap-and-small alternatives that do work?

>> No.1695310
File: 33 KB, 722x494, Clipboard01.png [View same] [iqdb] [saucenao] [google]
1695310

Any idea why this shit doesn't work?
It is supposed to count pulses from a rotary encoder, and the interrupt gets triggered when one of those two pins changes states .
I tested it and the ISR does get triggered so the problem is with the code

>> No.1695314

>>1695310
the problem is that the value variable never changes

>> No.1695320

>>1695168
Fuck yeah it does

>> No.1695322

>>1695275
This question is too specific; do not expect us to solve your problem. Break it down to a set of more common problems (like how SPI works) in which we could help.

>> No.1695377

>>1695310
I don't see anything wrong with it but I've never into encoders.

I'd temporarly,
-remove limit checking for value
-make sum a global and watch it
That may tell you something

>> No.1695404

>>1689737
8 bit avr easily does anything short of emulating other systems. RPi is good for PiCades and Pi Holes, that sort of thing, but for your LED blinkers and stepper motor driven art projects, arduino is forever king.

>> No.1695409

>>1695310
>when one of those two pins changes states

Are you sure the encoder is not turning too quickly?

Do you actually have a single interrupt that is triggered of of two pins? If it's only triggering off of one pin the sum will never equal any of those values. If that's the issue just make two interrupts.

If you have a three channel scope you could easily get a lot of information by raising one pin on the entry to the ISR and lowering it on exit, and looking at the encoder pins at the entry point on two subsequent ISRs and making sure they match one of the eight patterns.

>> No.1695693

>>1694620
>pro micro
>no ISP port
lel
hold reset and release during uplaod, maybe?

legit made me laugh.

>> No.1695697

>>1695241
Thanks for all the details. I may just get one for the fun of it.

>Buy a spare microSD as a power outage can fry them, and a heat sink too : those things tend to run very hot.

Makes sense, thanks for reminding me

>Also, for "hardware hacking" what do you mean?

I'm familiar with arduinos and esps and I build the occasional electronics project. I use my computer for that, and that computer only has one screen. Programming the pi with one screen is pretty shit, because I like to look stuff up on my main pc at the same time. I plan on building a small portable solution, similarly to those Cyberdecks where I can plug in an Arduino and pi, have a small screen, keyboard, battery and an integrated solderless breadboard, so I can use it for hardware projects.

I'm working with a bunch of people together to build a bigger project and I am currently designing sensors and electronics for a testing stand for a MK1. I'd rather be able to do that on the fly.

>> No.1695732

>>1695404
>8 bit avr easily does anything short of emulating other systems
Negative.
Try making an mp3 player, decoder on chip.
How about audio recorder, 24bit 96ksps. The 'duino isn't even fast enough to read in data from an external ADC and save it to an SD card.
And forget any kind of audio DSP.
Microcontrollers are huge on DSP, and the arduino doesn't have any dsp hardware.

You can build a 16-bit audio player with a single dsPIC33FJ64GP802 chip and SD card. The arduino couldn't even begin to consider doing that.

>> No.1695740

>>1692413
>>1692416

And they make no sense given the lifespans of the other parts on the board.

>> No.1695743

>>1695697

There's a whole chain of support required to maintain compatibility via the various drivers and apis for your board. Not just the CPU, but sound, networking, video, etc. All that support has to be ongoing lest some software change break support for your platform. It's a lot of work and it has to come from somewhere: the devs (if the HW is so ubiquitous that they can't afford not to support it), the hardware vendor (assuming they keep investing in their legacy platforms even as they sell new ones), or a hacker community (if there's enough people and they're motivated enough). Or, failing all that, you.

Sounds like you don't want to mess with that. Hence why sticking to commodity high volume boards with big installed bases is the way to go.

If you were going with a purist hardware project and just wanted to use a μc and your own code, then anything will do (so long as it's not going into mass production). At that point, you manage the problem by keeping the list of dependencies very short and simple.

>> No.1695744

>>1695740
>>1695743

Sorry, didn't mean to tripcode unnecessarily. I've got another thread active and want to be able to id myself in it.

>> No.1695974
File: 70 KB, 600x600, perfboard-solder-prototype-board[1].jpg [View same] [iqdb] [saucenao] [google]
1695974

>>1689490
i want to solder my arduino and 2 other components together before i put it in my rc plane. should i use one of pic related to mount everything or can i just solder wires directly to each component?

>> No.1696003

>>1695974
If that's the only option you have, you should. If you can afford waiting couple weeks, you should rather design proper PCB and order it online. It's fun to make them and you might even have local facility which could provide 3 working days estimate.

What the components are, anyway?

>> No.1696023

>>1696003
gps receiver, lora transceiver

>> No.1696037

>>1691825
No recommendations for an all-in-one, but as far as DIY is concerned I've connected 18650s in series and powered a Pi Zero with an Adafruit Powerboost. I had a Zero attached to something like ~40,000 maH and it ran idle for a couple of days.

Your best bet is to craft or buy battery pack and connect it to VIN/VCC (don't remember for Pis) if you want to be cost effective

>> No.1696040

>>1694620
Hold the reset button for a while, don't know how long, and you should have a window to throw some new code on there

have some foresight next time lol

>> No.1696043

>>1696023
You're fine with wires, but for transceiver keep it short. Make sure you have a capacitor soldered directly to transceiver's ground/power pins. Also make sure that you have stable power supply, switching DC/DC's are not viable option, look up for LDOs.

>> No.1696044

>>1695032
Odroid XU4 is a powerhouse (comparatively) for $50 if you get it directly from the manufacturer

2gb DDR3 ram, 2 x USB 3.0 ports, Octo-core Samsung CPU, pretty nice

>> No.1696071

I've got my lora transceiver (3.3v) connected directly to my nano (5v). I read on some forums that you shouldn't connect them directly but instead but 4.7k resistors between them. The documentation for the transceiver says to put a pullup resistor between the TX of the transceiver and the RX of the nano.

Do I actually need resistors if it works without them? I'm an electronics idiot

>> No.1696094

>>1696071
While on signal pins it may work, for power pins you need more than that, because voltage drop depends on load when you're using resistors.

Check your nano it might have 3.3 output which may handle your transceiver.

Also check on your transciever's data sheet, it's signal pins may be 5v tolerant.

>> No.1696139

Semi related where the fuck can I get 18650 cells affordably?

I want samsung 30q but there 4$+ a piece...

>> No.1696180

Looking into Raspberry Pi screens, and all I found were touchscreens (which I don't need, but I also don't mind) that take up a lot of the GPIO pins.
Are there cheap or fairly priced Rpi screens that use either hdmi or the display ribbon cable and either use up as little GPIO as possible or run on 5V so I can run both the pi and the screen off the same source?

>> No.1696181

>>1696139
If you need new ones and want to make sure they are good, that's going to be about the price range you have too look at unfortunately.

If you are willing to take the risk, aliexpress is cheaper, but you may (and at some point almost certainly will) get cells with low capacity.

If it's for a project for yourself and you want to go cheaper, salvaged cells from old batteries are easy to get and most of them are still in decent condition. I take them out of the battery return box at a supermarket, open them up, throw the ones that are not healthy enough away and keep the rest. You can get batteries that perform 90% like a new one for free that way.

>> No.1696191

Probably a dumb question, but when i send something over serial from one arduino to another i only get a hex value insted in the order arduino
for example i send a letter "b" and recieve the ascii code for be, the number 62
How the fuck do i convert it back to a b character?

>> No.1696197

>>1696191
>How the fuck do i convert it back to a b character?

Be more specific. It never got converted away from being a "b"; you sent 0x62 and you received 0x62. Where are you using this value that you want to see a "b"? For example, on my LCD screens, using assembly, if I show the byte i get "62", but if I show it as a char, I get "b", without me converting anything.

>> No.1696200

>>1696197
I send this on one arduino
Serial.print("b");

this on the other
while(Serial.available() > 0)
{
Serial.print(Serial.read());
}


What it prints out is just 62

>> No.1696202

>>1696200
>Serial.print(Serial.read());
Serial2.print(Serial.read());was supposed to be, the module i am using has multiple hw serials

>> No.1696208

>>1696202
some arduino expert will eventually tell you the easy way, but since I'm not that guy, you can use any number of methods in C to accomplish what you want. for example, save the thing you read and convert it before you print:

hex_value = Serial.read();

char h = (char)hex_value;

Serial2.print(h);

If this doesn't work, wait for the guru.

>> No.1696209

>>1696043
>cheap DC/DC's with bad regulation are not viable option
FTFY

>> No.1696210

>>1696180
You'll have to define "cheap or fairly priced"
I have a 7" screen that doesn't use any GPIO, uses HDMI, and only needs 5v+ which can come from a USB port. $80.
https://www.adafruit.com/product/2406

>> No.1696212
File: 653 KB, 1601x591, Screenshot_2019-10-09_09-39-14.png [View same] [iqdb] [saucenao] [google]
1696212

>>1696210
>. $80.

At that price I'd just buy an ordinary monitor for about 100 bucks and have a nice huge display. It won't run off 5v/USB, and it might be too large, but otherwise it's a simple option.

pic related is 90 and free shipping if you have prime.

>> No.1696226

>>1696210
>cheap or fairly priced
I was thinking 20-80 Bucks, depending on what I'm getting for it.
>7" screen that doesn't use any GPIO, uses HDMI, and only needs 5v+ which can come from a USB port
That seems pretty much exactly like what I was looking for, I'll have a look for cheaper alternatives, as I'd be okay with a 5 inch screen as well.

>> No.1696241

How do i take two bytes and turn them into an integer? (integer on arduino is 2 bytes)

>> No.1696247

>>1696241
u16 = u8_low | (u8_high << 8)

>> No.1696251

>>1696247
That seems to only work with positive integers, if i try to use negative one (-1) it outputs 65535 even though it am casting it into a signed integer

>> No.1696255

>>1696251
2s complement arithmetic is more complicated.
Explain your full situation so that the board can better help you.

>> No.1696259

>>1696255
I split a signed int into two bytes like this
byte stepsAsBytes[2];
stepsAsBytes[0] = Steps >> 8;
stepsAsBytes[1] = Steps;

And then later i need to turn it back into a signed int

>> No.1696262

>>1696209
Any switching DC/DCs introduce voltage spikes up to 100mV (ripple) which could absolutely fuck your shit up. LDOs on the other hand are linear regulators and they have no repple. The matter of fact, they have ripple cancelation.

>> No.1696270

>>1696259

Supposedly there are arduino libraries that have BitConverter. If you can find that method, it does what you need: Converts base data types to an array of bytes, and an array of bytes to base data types.

>> No.1696274

>>1696259
You know you can just cast it, right?
uint8_t* fuck_you j (uint8_t*)&your_var
And then upon receival, cast it back
uint16_t shit = *(uint16_t*)&bytes;

>> No.1696278

>>1696274
Terrible idea if you want your code to be portable to big-endian devices, or the endianness of your transfer differs in the protocol.

>> No.1696292

>>1696259
Figured it out, the other device where i was casting the int uses 32 bit ints while arduino uses 16bit ints so i cast it as int16_t and it works fine now

>> No.1696318

>>1696181
Thanks bud, I was afraid of that being my only options... I have a couple recent laptop batteries I can test the cells in.

>> No.1696359

>>1696278
He transfers it between two identical devices. If you're a pussy you can use htons/ntohs

>> No.1696360

>>1696359
Or shift like a decent human being.

>> No.1696362

>>1696360
>doing operations when you can just treat data differently

>> No.1696363

>>1696362
>not trusting your compiler to be able to optimize it on the platforms where the data representation matches.

>> No.1696371

I've been cold emailed by a company called hiletgo offering to send me free samples of arduino and esp8266 boards as well as the usual sensors, leds etc for testing/reviewing. Anybody heard of them?
I'm only an occasional buyer on aliexpress, they must have pulled my email from a seller.

>> No.1696375

>>1696371
>free samples
Did they do it via the aliexpress freebie system? If not, assume it's a scam. If they send it for free, that's nice, if they want money, fuck em.

>> No.1696382

>>1696375
No, it's a direct email. I'll be careful and bail if they ask for money.

>> No.1696383

>>1696382
Sounds reasonable. I'd say go for it, not like you have something to loose.
I'm not sure if you may get issues with customs where you need to pay to recieve a packet, but even if that happens you can just say no.

>> No.1696539

>>1696371
They sell a lot of shit on Amazon. I think one of my three packs of Nano boards came from them. They've worked pretty well. Have you ordered any components off of Amazon? They got my email that way.

>> No.1696548
File: 312 KB, 1224x1632, IMG_20191009_220653_compress1.jpg [View same] [iqdb] [saucenao] [google]
1696548

This gonna be hard to fit on a small board

>> No.1696551
File: 359 KB, 1224x1632, IMG_20191009_221327_compress56.jpg [View same] [iqdb] [saucenao] [google]
1696551

>>1696548
I forgot the gps

>> No.1696618

>>1696363
>trusting avr-gcc ever

>> No.1696621
File: 38 KB, 832x462, IMG_20191009_232322_565.jpg [View same] [iqdb] [saucenao] [google]
1696621

>>1696551
Dude. My project is almost identical to yours. I see you have bluepill, neo6m, USB charging controller, some DC/DC module and what's the radio? WiFi? Where do you store the data? Or you just transmit it?

>> No.1696622
File: 99 KB, 1280x1120, IMG_20191009_232718_619.jpg [View same] [iqdb] [saucenao] [google]
1696622

>>1696621
>>1696551
With the cover on

>> No.1696624
File: 79 KB, 960x1280, IMG_20191009_233051_088.jpg [View same] [iqdb] [saucenao] [google]
1696624

>>1696551
>>1696621
Here it is assembled

>> No.1696631

>>1696200
Do they both use the same baud rate?

>> No.1696638
File: 8 KB, 210x240, 1551139492906s.jpg [View same] [iqdb] [saucenao] [google]
1696638

>>1696631
62 is b, it's just represented in different manner.
That's why I hate arduino, because it's community is a bunch of clueless retards who have no idea how computers work. The code is usually incomprehensible and never optimized. They get shit done by slapping together a bunch of stack overflow answers, but they have no idea how they work?
>duugh I don't know how information works I just call Serial.read() and number show up. Better go post on instructables how to do it

>> No.1696667

>>1696539
Can't remember really but I don't think I've ever ordered components from Amazon. eBay maybe.

>> No.1696691

What are some comfiest buttons and knobs like rotary encoders etc or other manual input options chinks offer?
I hate having to fuck around with gay ass micro switches that feel like crap and like to make super comfy control panels from my projects so i want to use comfy buttons and knobs

>> No.1696695

>>1696618
avr-gcc is really fucking good, anon. If you think otherwise you've either never inspected the generated code or are using the wrong optimization options.
Use -Os -flto -ffunction-sections -fdata-sections -fuse-linker-plugin -Wl,--gc-sections and -fshort-enums, at the very least. All of these are enabled by the Arduino IDE except -fshort-enums.
Oh, and update to the new arduino ide since they switched to gcc 7. Or build a gcc 9 toolchain using crosstool-ng.

>> No.1696696

>>1696695
The only compiler i trust and use is the HolyC compiler

>> No.1696697

>>1692448
like which ones? I want to get a good logic analyzer

>> No.1696699

>>1694510
anode to 5V
ground each of the other pins to light up that segment,
if you want it to be done proper you gotta use a resistor on each of the segments, otherwise you can just run it all off 3v and it should work fine.

it's "reverse" to a common cathode

>> No.1696700

>>1696200
```
Serial.print( (char) Serial.read() );
```

>> No.1696720

>>1696621
>>1696622
>>1696624
Radio is a 1w lora transceiver. I don't store any data on that setup. Just transmit it.

>> No.1696723

>>1696638
You sound mad boy.
I am sorry that electrical engineering is not a super exclusive elite club anymore and products like arduino make it super easy for the average consumer to do anything they want themselves in just couple of hours for free, instead of paying exorbitant amounts of money to some virgin cuck with a useless elec eng degree like yourself to come up with some overengineered and overcomplicated crap solution that saves extra 1mah of power per year when running from mains

>> No.1696738

>>1695249
I am worried about speed and missing release or press key events.

>> No.1696805
File: 192 KB, 1551x503, Screenshot_2019-10-10_11-11-29.png [View same] [iqdb] [saucenao] [google]
1696805

>>1696697

something like pic-related is what I use. I suppose some of them are crap, just roll the dice and spend your 10 bucks.

>> No.1696946

>>1696226
>I'll have a look for cheaper alternatives, as I'd be okay with a 5 inch screen as well.
https://www.adafruit.com/product/2232

>>1696212
The display I linked isn't mass produced, and is also made especially for the Pi in specific.
>It won't run off 5v/USB
>might be too large
So for only $10 MORE, you get a display that isn't what the anon was asking for at all?

>> No.1696984

>>1696723
I am mad, because you're the equivalent of ungrateful Instagram slut who neither have idea of desire to know how the interned works.

>> No.1697030
File: 70 KB, 1280x720, g.jpg [View same] [iqdb] [saucenao] [google]
1697030

>>1696984
Not that anon, but I think you're on the wrong board.

This is /diy/:
>Helpful links:
>friendly suggestions

This is /g/:
>/g/ is NOT your personal tech support team

We ARE tech support, not elitist bullshit. I've been using breadboards since the 80's and programming since BASIC, yet I'll still help someone light an LED without bitching. GTFO

>> No.1697069

>>1697030
Okay okay. Calm down love

>> No.1697075

>>1694620
lmao

>> No.1697172

>>1697030
>I've been using breadboards since the 80's and programming since BASIC
And 300 confirmed kills?

>> No.1697243

>>1697172
over 300 confirmed compiles without any errors

>> No.1697288

Anyone get a teensy 4?
I bought one on a whim and have no idea what I want to use it for.
At the minute I'm using it in work to program pics on panels of PCBs sequentially

>> No.1697473

>>1696946
>https://www.adafruit.com/product/2232

I'm likely going to go with that one, but from another site where its cheaper

>> No.1697597

>>1694928
>>1694936
The TPIC6B595 from TI combines an 8 bit Shift register with output drivers capable of 150mA.

>> No.1697600

>>1697243
How many warnings?

>> No.1697718

So if my MCU has only 1 timer, how many different PWMs can I run simultaneously?
If I go with 1 PWM signal, can I use the same timer to make a time based interrupt on another pin?
I'm kind of new to this. The MCU in question would be an ATtiny13 that I have lying around.

>> No.1697719

>>1697597
I wish I knew any of this when I was a clueless retard back in the day. So many abandoned projects

>> No.1697827

>>1697473
That display is made my adafruit, so chances are you won't find it cheaper elsewhere. But you never know.

>> No.1697851

>>1697718
>So if my MCU has only 1 timer, how many different PWMs can I run simultaneously?
One.
>If I go with 1 PWM signal, can I use the same timer to make a time based interrupt on another pin?
Not sure what you mean by "time based interrupt on another pin"
You can write a timer-based ISR to do whatever, if that means your ISR code will use another pin, then sure.

>> No.1698042
File: 203 KB, 658x987, IMG_20180501_1423488.jpg [View same] [iqdb] [saucenao] [google]
1698042

>>1689490
Should I review and practice C or C++ if I want to write better arduino code?

>> No.1698060

>>1698042
c++ is just fancy c. give structures methods and call them classes.
anything extra in c++ is useless frivolity and anyone who says they use it are liars

>> No.1698088

>>1698042
The arduino programming language is a C++ framework. Its essentially C++ just with some extra keywords

>> No.1698268
File: 56 KB, 800x800, esp-12f-1[1].jpg [View same] [iqdb] [saucenao] [google]
1698268

Hey guys I own
>pic related, esp-12f

and right now I am using these resistors on the serial rx/tx to be able to communicate on 5v lines. I did some googling and my best option seems to be a bi direction logic level converter, or no?

>> No.1698276

>>1689989
The Bible specifically lists wearing tattered clothing as an ABOMINATION.
For shame, Terry.

>> No.1698321

>>1697851
Not entirely correct, depends on the frequency of the timer and required PWMs. If you run timer 10 times as fast as PWM you could have any amount of PWMs with 10% increments

>> No.1698361

>rage for 3 hours because i wasted half of the day and my stupid fucking serial shit isn't working
>checked the wiring 20 times
>redid the code 30 times
>checking the wiring for the 21st time
>okay let's do this fucking again
>vin to vin
>gnd to gnd
>rx to rx
>tx to t... WAIT A FUCKING MINUTE

GOD FUCKING DAMN IT
fucking you brain you fucking asshole

>> No.1698429
File: 966 KB, 2132x2784, 20181219_223052.jpg [View same] [iqdb] [saucenao] [google]
1698429

Is it possible to send serial data from one arduino to another using two of these modules?

I achieve the same result with to HC05 bluetooth modules but I'm wondering if it is possible to reduce the code or the wiring by using these ones instead..

>> No.1698439

>>1698361
Worst part is when your usb serial adapter is mislabeled

where Rx is labeled Tx, and Tx is labeled Rx and you're hooking it up thinking its right, but really youre wiring is Rx -> Rx, and Tx -> Tx

Took me two days to find a obscure google result someone saying label could be mislabeled in a thread from 10 years ago on a nobody forum.

>> No.1698440

>>1698429
Yeah, my wifi keylogger sends keystrokes through the serial and stores them on the esp-12f. I don't see why you can send it back.

>> No.1698446

>>1698439
yeah shit sucks because you never suspect it and assume it is a code thing, or like a missing pull up or some shit

>> No.1698449

>>1698440
Is it hard to put up a code to simply serially send data from a sensor connected to an arduino to another one via two ESP8266MOD? I've been trying to search a tutorial about but couldn't find any..

>> No.1698458

>>1698449

Can you show me a rough sketch of what you want to achieve with ESP?

>> No.1698463

>>1698439
Yeah, that's why I usually try doing it both ways before trying to fix it elsewhere...

>> No.1698470
File: 29 KB, 2720x960, BLOCK.png [View same] [iqdb] [saucenao] [google]
1698470

>>1698458
I'm trying to wireless control the position of two motors using motion. I got it to work using two HC05, but I'm trying to figure out if the ESPs require less code and less wiring to get the same result.

>> No.1698471

>>1698470
I screwed the sizing of the pic but i think it's ok to read. Of course there is a H-bridge between slave arduino and the motors.

>> No.1698473

>>1698470
Oh, you're controlling an rc car?

Is this some cheap rc car you found or are you controlling the motors directly?

>> No.1698474

>>1698473
Motors directly.

>> No.1698481

>>1698473
I controlled a rc car via rpi with my laptop, and android phone.. I did a quick google search, and it seems you can do esp socket server/client, is probably what you need for your setup.

On the RC car side, make a wifi AP (or maybe Ad-hoc if thats still a thing) and make a port listener to listen for incoming connections, and on your "remote" side, have it connect to the ip/port of the RC car. This should help you get started, it seems to do same thing and it shows how to send the info it received from the client (your "remote") on the serial lines.

>https://techtutorialsx.com/2018/06/02/esp8266-arduino-socket-server/

>> No.1698482

>>1698474
lol oops meant for this post. >>1698474

>> No.1698485

>>1698481
I'll surely take a look. Thanks a lot, dude!

>> No.1698502
File: 138 KB, 600x600, 15033-USB_Logic_Analyzer_-_25MHz_8-Channel-02.jpg [View same] [iqdb] [saucenao] [google]
1698502

>>1698446
That's why you have those cheap logical analyzers.

>> No.1698582

>>1696691
for buttons you can use cherry mx switches or clones. they are about 30 cent each, needing a 14mm square hole to mount in. alps ec-11 rotary encoders are a standard, though use buxtronix's code with them to prevent malfunction.

>> No.1698835

>>1698582
>malfunction
what?

>> No.1698903
File: 359 KB, 1080x1501, Screenshot_20191014-142631__01.jpg [View same] [iqdb] [saucenao] [google]
1698903

>>1689683
imagine unironically spending more than a dollar per any of your microcontroller based projects. Pic related is probably overpriced af too

>> No.1699238

What's the cheapest/easiest way to stream music from my beaglebone file server to my AVR (either through chromecast or directly to the AVR)?

>> No.1699373
File: 77 KB, 610x568, MEOS.jpg [View same] [iqdb] [saucenao] [google]
1699373

Anyone used motioneyeos on a raspberry pi?
I have it connected with the built in wifi but I want it to connect with a usb donge (better reception).
There's nothing in the GUI to choose the wifi source.
Can you change it through the terminal?

>> No.1699516

I wonder if there is any difference in declaring global variable static

like

static int poop
setup(){}....

vs

int poop
setup(){}....

>> No.1699517

>>1699373
>Anyone used motioneyeos on a raspberry pi?
Honestly it's garbage, too slow, laggy and the image is shit, i wanted to use it for home security system but then ended up buying proper ip cameras and hooking them up to a dedicated server

>> No.1699527

>>1699516
static makes a variable only visible in the current compilation unit (usually one file).

>> No.1699584

Lads can I order a Arduino Uno clone and use the same dev environment all the same seamlessly?

>> No.1699619

>>1699584
Sure. You just need to install the ch340 driver on your computer for chinese clones

>> No.1700058
File: 33 KB, 1276x681, Capture.png [View same] [iqdb] [saucenao] [google]
1700058

If I want to program an ESP8266 12X while mounted on a PCB with a USB to serial programmer, is this the right circuit to do so?

>> No.1700173

What's the transition like from being a C++ noob to writing code for arduino's?

I don't really have any projects in mind yet, but I'd like to have some help for next year's garden. I thought it'd be cool to have some different solar powered sensors around the property to guage how much sunlight each region gets.

What's the difficulty in programming something like that? Can someone give me a high level overview?

>> No.1700184

>>1700173
Arduino's C is quite simple to code, it's only when you want to optimize stuff that it gets complicated since you have to stray from predefined functions and touch low level stuff.
A project like that isn't too complicated, you'll spend more time designing the circuit. Just use a photoresistor and get the values every couple of minutes, save that to the memory, maybe add a display to visualize the data.

>> No.1700630

>>1689490
How easy would it be to translate code for the teensy 3.2 to the 4.0. I needed to buy one for a particular lib made for the 3.2 but if Im going to buy one I might as well get the 4.0. Considering getting both for legacy purposes.

>> No.1700632

>>1699527
How can you have a single complilation unit from two cc files? You mean nasty #include "file.c"?

>> No.1700646

>>1700632
Some projects (notably webkit) do what you said legitimately to speed up full builds, and improve optimization on compilers without link-time optimizations. Some build systems like Meson allow you to build a project like that by passing an optional flag, for the same reasons.
Other projects like to abuse the fact that you can build multiple .c files in the same compiler command (like "cc -c -o unit.o file1.c file2.c").
In general it's not a very useful distinction (and the above is generally ill-advised), but it should be kept in mind nonetheless. It's more useful to see "compilation units" as .o files, rather than .c files, since the former is what is fed to the linker.

>> No.1701098

>>1696139
pick up lots of old laptops and recycle the batteries in their battery packs

a friend does this about once every couple years to source them

>> No.1701166

>>1695032
I have a chronic sbc addiction and aliexpress packages arriving almost daily.
I have:

Orange pi zero
Orange pi pc
Orange pi zero+
Orange pi r1
Banana pi r2
Banana pi w2
Nanopi neo
Nanopi neo2
Nanopi m4
Nanopi fire
Nanopi with the integrated 10" capacitive interface

I have multiples, I pretty much settled on the Nanopi stuff
M4 if you want to do media or heavy work

The neo is pretty hard to beat for gpio stuff and they have their own version of writing pi which makes programming easier and it costs about $10

The bananapi stuff is awful.
I also hear friendly elec is bringing out a baby Nanopi with emmc support which I like as I hate sd cards.

Anyone played with node-red? I am a massive fan

>> No.1701210

>>1701166
>Orange pi zero+
Much nigga

>> No.1701365

>>1694972
I bought some comfy FX2n clones off AliExpress.
Can't go wrong, it was $9 delivered and it has RS-232 I have it feeding into a Pi with SQLite

>> No.1701367

>>1695241
Don't use whatever crappy distro comes with your clone board, Armbian has good support and they will actually tell you which features work and which don't.
If it's not supported by Armbian, don't touch it!
The Friendly Elec falvour of Ubuntu is also pretty comfy

>> No.1701383

>>1701166
Could Opi One used in a CNC or 3D SLA Printer project?

>> No.1701440

>>1696180
Most of the screens you don't need to use the pins they are just drawing 5v and doing the usb interface, most on aliexpress have a hdmi and usb port

>> No.1701442

>>1698439
I always carry a 9 pin shirt cable with the tx and rx switched so I can quickly check. The other trap for new players is that if the Linux user isn't in the dial out group they can't access the serial port, which seems quite pointless

>> No.1701445

>>1701383
I think the Nanopi M4 is a better bet more ram and native pcie for an ssd

>> No.1702312

I want to make cheap home automation meme , assuming there ll be 20+ "devices" what would be the cheapest solution? at the moment im thinking about esp over BLE with some PIshit as a hub. I dont mind doing some custom pcbs but it seems like buying some cheap mcus and ble soc is way more expensive than esp32

>> No.1703060
File: 831 KB, 716x821, Untitled.png [View same] [iqdb] [saucenao] [google]
1703060

I've made a project using a watchdog timer and everything works fine, I just set initialize the watchdog and forget about it. When sleeping, the watchdog will wake the uC up.

Now, how does the watchdog knows when not to call it's routine while awake, it's just disabled automatically? Have I forgot to disable it but the ISR does nothing so it's fine? I'm kinda confused as to how the watchdog works.

My project is a light sensing pumpkin light btw
https://pastebin.com/mVcfy7Rw

>> No.1703469

I'm working out how to build a synthesizer to particular wants - just intonation, polyphony, some effects, etc. My first concern is function generation - it doesn't seem that I can get multiple precise frequencies out of an arduino. I don't feel that throwing an assload of vactrols around is going to go well either, both for calibration and response problems. Second is the keyboard - I really don't want to build a matrix loaded with diodes for two or three dozen keys and I'm not finding multiplexers with enough channels. I'm thinking of just assigning a handful of keys each to a pin with parallel voltage dividers and working out the multi-key combination outputs.

Any advice on what to consider?

>> No.1704682

Planning to buy a W5500 module to get a nano on the network, but still need to find an 802.3af ready PoE splitter.
The big thing is trying to find a way to control the flow rate of a solenoid valve with the Arduino, and if I can run all that off 5V.

>> No.1704906

Anyone know if there's a good way to control the flow of water? I was looking at solenoid valves and using PWM or adding a DAC.

>> No.1704930

>>1703060
You have to feed the watchdog otherwise it will just keep resetting the ic

>> No.1705088

Holy shit the Raspberry Pi developers are a bunch of jackasses.
Go on the Raspberry Pi forums and ask about support for booting from USB Mass Storage on the Pi 4 and they just fly off the handle.

>> No.1705418

>>1705088
I feel the same with arduino forum, if you mention what you're doing and even if it barely sounds like it could be used illegally they will all mount their high horse, and mark you as a criminal scum of the earth.

>> No.1705453

>>1692448
you can use the salea knockoffs with the official salea software. pretty nice.

>> No.1705454

>>1701166
i have a NanoPi Neo it's solid; just ordered a bunch of ZeroPis; maybe i resell them or make a small cluster

>> No.1705473

>>1689490
I'm looking for a good YouTube channel/other resources that can guide me through learning arduino. From hello world onwards in a series of lessons would be great.

I'm surprised you don't have a copy pasta like /ohm/ to point to for clowns like me.

>> No.1705492

>>1705473
>for clowns like me.

1. google "arduino hello world" except you really should start with Blink because it comes with arduino studio and requires nothing but an arduino and USB cable.

2. Figure out what you want to do next and google it. If you don't know what you want to do and yet you think you need to mess with arduino, buy one of the beginner's kits that has about 20 or more sensors and actuators and displays and pick one and google it.

3. If you think a video is the way to learn how to write code you might want to go back to your job at McDonalds.

>> No.1705577

So I need to use an nema17 with a teensy 4.0 which is not 5v rated at all.
I have a few unos and megas layout around with the dc jack so I wanted to know if I could plug a 12v power supply into the power jack on the Uno, and Connect its VIN pin to power the motors and use the 5V pin to power the Teensy.

>> No.1705604

>>1689490
decided to add a logger to my solar server setup. Im thinking about logging temperature of my house, as well as light, and maybe humidity. Anything else worth logging? Am considering logging sound in decibels too.

Is anyone here doing something similar?

>> No.1705688

>>1705577

yes you can use the UNO as a voltage regulator.

>> No.1705734

>>1705604
Solar radiation measurement with a photodiode or LED

>> No.1705752

>>1698060
C++ also gives you an extended and optimized standard library with algorithms and tools that are essential for writing a modern program. I'd hardly call that useless frivolity.

>> No.1705903
File: 836 KB, 1280x720, 1565673440841.png [View same] [iqdb] [saucenao] [google]
1705903

>>1705473
>I'm surprised you don't have a copy pasta like /ohm/ to point to for clowns like me.

sorry bud, this is like the first general I have ever started and the second arduino thread on this board I've seen yet. Next time, if I find good links and resources, I'll be sure to put them, don't worry ;D

btw, if anybody has useful stuff please do link it!

>> No.1707195

>>1705903
Thanks anon

>> No.1707346

>>1705577
Why are you connecting a stepper through the Uno? Just connect it to the power supply directly, all it takes is a cable. The Uno is almost certainly not designed to pass through 1-2A of current on its VIN. It might work for a short while, but longer periods will probably overheat the board.

>> No.1707383

>>1707346
>The Uno is almost certainly not designed to pass through 1-2A of current on its VIN.

VIN is where the power goes IN, and that retard is just using it as a terminal block. The UNO does not process VIN between the jack and the pin.

>> No.1707388

>>1707383
I know it doesn't process VIN, but it's still not likely to be designed for several amps of current going through from the jack to the pin.

>> No.1707711

>>1705752
It's a matter of application. The less functionality of your microcontroller you're using, C becomes more appealing because of less overhead.

>> No.1707734

I don't know if this is the right place to ask as I'm using the AVR environment rather than Arduino, but they're basically the same thing. Basically I'm trying to manipulate the registers so the OC2A pin outputs a PWM signal which can then be set by reading a PCM file, but what I'm doing is not having the desired effect. I've probably set the registers wrong.

Can someone point me in the direction of a fix?

int main(){
uint16_t sample;
uint16_t i;
DDRB |= (1<<PB1);
TCCR2A |= (1<<COM2A1)|(1<<WGM21)|(1<<WGM20);
TCCR2A &= ~(1<<COM2B1|1<<COM2B0|1<<COM2A0);
TCCR2B |= (1<<CS20);
TCCR2B &= ~(1<<WGM22);
while (1){
sample=0;
for(i=0;i<=PCM_length;i++){
OCR2A = pgm_read_byte(&PCM_data[sample]);
delay_us(123);//Should give a delay of around 125us, which is the interval for 8khz
sample=sample+1;
}
}
return 0;
}

>> No.1707875

>>1707734
Never mine, this works, I'm just a fucking idiot that used PB1 instead of PB3

>> No.1708105

>>1707875
>Never mind,
Fixed.

>> No.1708693

>>1705734
thanks anon! i saw this shortly after you posted but went on a bit of a research tangent looking into it. Great rec, but ill prob use a smaller panel to calc so its more accurate

>> No.1708701

>>1690404
Yes

>> No.1708723

>>1695275
I have made rfm95 work using Adafruit feather m0 clone I have made myself. Currently researching power consumption. The fucker is tricky - some pins draw excessive current when both mcu and rfm95 go into deep speep.

If you want avr compatibility look into adafruits feather 32 lora examples - there are plenty of those.

I use arduino-lmic too. Are you using ota or abp? There are some tricks you have to do to connect to ttn via ota, especially if you pupp bleeding edge arduino-lmic from github

>> No.1708963
File: 916 KB, 1920x1080, Screenshot (1).png [View same] [iqdb] [saucenao] [google]
1708963

My girlfriend is going to start studying electronics next year and I wanted to make a small gift for her
Its a Arduino ProMini powered multimeter pen

>> No.1708983

>>1708963
I'm sure she will appreciate it. The love and work you put into it really shows your dedication for her. Good job anon :)

>> No.1709352
File: 29 KB, 992x358, Arduino.png [View same] [iqdb] [saucenao] [google]
1709352

For some reason, this circuit trips my Arduino Uno's overcurrent protection and it turns off. It doesn't mind the LED section but when the potentiometers are plugged in, it turns off. I've tested this circuit with my multimeter and everything is as it should be. The resistance between the 5 V and the 0 V for the potentiometer segment is 200 ohms and my multimeter shows that. Does anybody have any idea what's wrong with this?

>> No.1709362
File: 2.96 MB, 4032x3024, 7D7BF70F-3D9A-4085-B6A7-C1FC5711938F.jpg [View same] [iqdb] [saucenao] [google]
1709362

>>1709352
Here’s a picture of my setup. Ignore the shitty power bank. I’m using my computer or an IPhone charger as a supply.

>> No.1709366

>>1709352
are the outputs connected to anything? note that the resistance between the swiper and vcc/gnd or other swipers can be much lower than the total resistance of the potentiometer.

>> No.1709374

>>1709366
They’re connected to the Arduino’s A0-A4 pins, which are set as inputs. The inputs to the LEDs are the Arduino’s D0-7 pine, which are set as outputs.

>> No.1709418

>>1709374
I dunno then, try a different cable? do you have a way of measuring the current and the voltage going to the MCU? If it was marginal to begin with the ~25mA could push it over the edge.

>> No.1709458

>>1709352
Connect a single resistor from A0 to GND, and see if the problem is still here.
The try A1 -> A3.

Then do the same thing with a potentiometer, one at a time.

Maybe you have a burnt input in your PORTA.

>> No.1709471

>>1709418
>>1709418
The amount of current that could be going between the 5V output pin of the Arduino and the GND pin of the Arduino is 5 V / 200 ohm = 25 mA. The current out of each of the digital pins (when high) is 5 V / 1 Kohm = 5 mA. The total current that could be passing from high digital pins to ground is 5 mA x 8 + 25 mA = 65 mA. 65 mA is nowhere near the maximum output current of an Arduino Uno.

>> No.1709475

>>1709418
Shit, I misread that earlier. I’ll try that.
>>1709458
I’ll try that after.

>> No.1709481

>>1708963
Cute

>> No.1709524

>>1708963
That's THICC. Unless you're going to design your PCB this won't look that good

>> No.1709536

>raspberry pi and other microcontrollers
DROPPED

Raspberry Pi is a microprocessor OP.
I should have known when I saw "arduino" this thread was brand shills when it should just be microcontrollers general. (/μcg/ or non tryhard /ucg/ or /mcg/)
Generally with a MMU and above 32-bit is a microprocessor.

>> No.1709537

>>1705088
They still list it as possible in documentation ON ANY PI 3B (meaning all revisions of it work) as a "one time bitflip" in the firmware but mine never worked either so I figured the Pi 4 would be glitched too.

The Odroid N2 and H2 booth can boot from external USB without a SD card since they have built in NAND flash and boot selector.


I figured

>> No.1709594
File: 183 KB, 1920x1080, Screenshot (4).png [View same] [iqdb] [saucenao] [google]
1709594

>>1709524
I will still use a promini but for the circuit for the voltage dividers I will make a PCB on an Othermill

>> No.1709921
File: 2.75 MB, 4032x3024, 254BE9C6-CB0A-471A-AF8A-17F4C46E5948.jpg [View same] [iqdb] [saucenao] [google]
1709921

>>1709475
I still don’t know where I fucked up. It had to have been wiring, but the multimeter didn’t show it. I put all the potentiometers on perfboard and now it seems to work.

>> No.1710008
File: 15 KB, 1223x482, LightGraph.png [View same] [iqdb] [saucenao] [google]
1710008

could use some advice...
im using an ldr with a variable resistor to make a voltage divider, with the ouput going into an analogue pin on my micro-controller.
The problem im having is the range of light it detects. I currently have it 'tuned' to be around 15 in complete darkness (so i can better log night light from the moon and what not), but with this setting it will max out the analogue input just after dawn breaks. I can tune it so its more sensitive for the sun, but then it will read complete 0 as its setting. Ideally, id like a nice wide range with neither end capping.
Few restrictions - only have 1 analogue input on MC, so using a 2nd sensor isnt an option yet (my china order is still 1-2 months away, but i have analogue mux coming).

Any ideas? I have a feeling its a super simple fix, but cant quite put my finger on it.

Pic related is todays data so far. Not sure what caused the spike just before 1am, but almost certain it wasnt a voltage spike

>> No.1710201

>>1710008
I had a good think about this today. The issue is the LDR is getting completely saturated in the early morning sun, and adjusting the pot doesnt fix this but actually makes it worse.
If anyone is wanting to do something similar, calibrate it so you are reading around 10 on the analogue input in complete darkness. This will give you accurate low light detection, and will plateau shortly after sunrise (depending on where you live and the season).

One solution to the saturation of the LDR issue is to place a filter over it (something like a cheap pair of sunnies, or semi-transparent plastic would work). This would give it more accurate full sun data, but really bad low light\night data.

>> No.1710281

>>1709536
the raspberry pi can be used as a microcontroller and it's commonly associated with arduino projects too, that's why I included it

>> No.1710345

>>1710281
>it's commonly associated with arduino projects too,

Only because they're both small and cheap. Otherwise they have almost zero in common and are not in any way interchangeable for nearly any task. If you need a microcontroller, use one, If you need a small but full-blown computer, consider the pi.

>> No.1710453

>>1710345
why are you so salty? you can make just about any project with the pi that you can make with an arduino. If someone came in here asking how to flash an LED using their lpt port on an old dos machine in basic, are you going to flip your shit too?

>> No.1710582

>>1710345
Are you aware you can go full bare retard^H^H^H^H^H^H metal with it?

https://github.com/bztsrc/raspi3-tutorial

>> No.1711039
File: 838 KB, 2446x2355, IMG_20191103_100253.jpg [View same] [iqdb] [saucenao] [google]
1711039

These little oleds are neat and bright, got big things planned for them

>> No.1711044
File: 1.48 MB, 240x428, VID_20191103_123054_3_428x240 (1).webm [View same] [iqdb] [saucenao] [google]
1711044

>>1711039

>> No.1711074

>>1711044
Is the top half yellow or the thing is three-color.

I've got a bunch of them, but dunno what to do with them.

>> No.1711129

>>1711074
Yeah the top 15 pixels are yellow

>> No.1711389

what's the easiest way to get multiple screens with usb capablity displyed around the house? my best guess to far is tablets plugged into outlets

>> No.1711430
File: 1.94 MB, 2704x4056, IMG_20191003_1709207~2.jpg [View same] [iqdb] [saucenao] [google]
1711430

>>1711039
what have you planned for them? Cant you only use 2 of them simultaneously over i2c?
>>1711044
Used mine as a lidar-screen as well

>> No.1711483
File: 3.84 MB, 3024x4032, IMG_20191101_193010.jpg [View same] [iqdb] [saucenao] [google]
1711483

>>1711430
You can switch a resistor on the back to have two separate i2c addresses, but I'm gonna use a multiplexor so I can just run all my screens off that. I'm putting them in a gas mask to use as a HUD. They'll be mounted facing forward so they reflect off the lens.
That's awesome btw, what does your lidar sensor look like?

>> No.1711490
File: 3.46 MB, 3040x4056, IMG_20191025_2136017~2.jpg [View same] [iqdb] [saucenao] [google]
1711490

>>1711483
>multiplexor
Have to look into that, never heard of it
>what does it look like
i put together 2 versions, on is just the ToF-sensor taped to a stepper-motor that spins back and forth while measuring every 0.7degrees or so, the pic related i put together from some random Lego set i picked up while shopping for groceries, the sensor is on a sled on the right.
>gas mask hud
That's a nice idea - what kind of sensor do you plan on using? Is it for navigating through smoke or darkness?

>> No.1711498
File: 118 KB, 640x480, tcasmall.jpg [View same] [iqdb] [saucenao] [google]
1711498

>>1711490
Multiplexers are neat they let you use multiple sensors with the same I2c address as well, the Arduino just switches which one it's reading from. I'm running 4 screens, 2 128*64 mounted below and 2 64*32 mounted above, off of a one. For sensors so far I have GPS, 3-axis acceleration/magnetometer for heading, temp/humidity/pressure (altitude)/ voc gas sensor, and idk what else to add

That's a really cool setup, nice job on building that. What will you use it for and what kind of range do you get?

>> No.1711531

>>1711129
Are you sure it's 15 and not 16?

>> No.1711543

>>1711483
This is really neat. Why gas mask though

>> No.1711549
File: 1.41 MB, 2268x3024, IMG_20191101_210108-2268x3024.jpg [View same] [iqdb] [saucenao] [google]
1711549

>>1711531
I believe so, I'm not home atm but I'm pretty sure it's 15 yellow and 49 blue

>>1711543
It has a great visor in it already

>> No.1711586
File: 201 KB, 695x625, IMG_20191107_193055__01.jpg [View same] [iqdb] [saucenao] [google]
1711586

So these OLEDs... I've been thinking of creating something really small, to the point I can't afford the PCB of this.

If I desolder this, would I be able to run it myself?

>> No.1711593

>>1711586
You can grind off any edges without components and the mounting holes, but there's an ic between the screen and pcb and you won't be able to separate them

>> No.1711601
File: 130 KB, 618x906, IMG_20191107_200447__01.jpg [View same] [iqdb] [saucenao] [google]
1711601

>>1711593
Whatvare you taking about

>> No.1711606

>>1711601
Huh, I thought there was more to it, nevermind

>> No.1711690
File: 140 KB, 960x584, target.jpg [View same] [iqdb] [saucenao] [google]
1711690

A friend of mine wants me to help him make some smart targets for him, like they light up and you shoot them and some interface somewhere keeps score. Coverage needs to be a few hundred feet, no internet, everything battery powered.

I'm thinking stick an Arduino MKR1000, a shock sensor and LEDs on a magnetic box I can just stick on the back of plate targets, like pic related.
Have them phone home to a Raspberry Pi that broadcasts Wifi and write a little node webapp as a control interface (I'm a node dev).

I have a friend that's suggesting I use esp8266 chips instead, and another that says I should use Zigbee instead of wifi, neither of which I know anything about.

Thoughts on shock sensor vs accelerometer?
MKR1000 vs ESP8266?
Wifi vs Zigbee for this application?
How hard is mesh networking for something like this?

>> No.1711696

>>1711690
I think I'd use radio instead of wifi. All you need to transmit is the ID of the triggered device, wifi, and especially Zigbee would be far more expensive, and would eat more power. Radio has/can have better range also.

>> No.1711700

>>1711696
How easy is radio to work with?
I don't want to spend more than a couple weekends on this project.
Not trying to sell it or anything.

>> No.1711705

>>1711700
There are borderline plug-and-play devices for Arduino, very extensively documented. These are the absolute cheapest
https://www.youtube.com/watch?v=b5C9SPVlU4U
but there are also Serial-over-radio modules that give two-way communication and whatnot, using those is pretty much the same as sending data over serial to the computer.

>> No.1711725

Anyone work with motorola mcore microcontrollers??

>> No.1711925

Can someone explain to me what the fuck the real world difference is between these chips?

https://www.adafruit.com/product/2821
https://www.seeedstudio.com/NodeMCU-v2-Lua-based-ESP8266-development-kit.html
https://www.sparkfun.com/products/14394
https://www.sparkfun.com/products/13231

>> No.1712102

ahhhhhh FUCK i got chinked hard

i bought 20 attiny85 chips from ali and now after 4 months i wanted to actually use one and found out that even though it says attiny85 on them they are actually attiny 12, which sucks fucking dick,
luckily they cost only about $1.5 a pop so i am only out like $30 bucks.
The money i don't care about but what pisses me off is that i can no longer give a bad rating to that scummy chink and now i have to wait another month for replacement chips to arrive

The only bright side is that the chips he sent at least aren't complete trash, they are still attinys but have only 64B eeproom and 1024KB flash memory, but are still somewhat usable

>> No.1712330

>>1712102
You meant 1024 bytes?

>> No.1712574

>>1712330
yes, 1 kibibyte

>> No.1712590

>>1711925
#1 is number 2 but resold at a higher price also has connector for lipo battery
#4 is number 2 but you need to connect an antenna to it
#3 is arduino + some wifi chip i don't know. completely different setup.

the esp itself is programmable to do web based tasks and shit you don't NEED a controller depending on the project.

>> No.1712636
File: 2.30 MB, 4032x3024, IMG_20191109_090041.jpg [View same] [iqdb] [saucenao] [google]
1712636

Got my multiplexer up and running, pretty neat that I can run all my screens off a single serial output. But I can only declare one screen size, so I have it set to 128*32(small screen size) and when it writes to the 128*64 screen it skips every line. Is there any way to change oled resolution after the initial declaration? I tried setting x and y as variables and declaring it off those, but if I change them later in the program it doesn't work. GPS is up and running, within 1 meter accuracy too. The magnetometer/accelerometer though is spitting out horrible results, may be an issue with multiplexer interference

>> No.1712718

>>1712636
what library are you using.
create two different instances of the control object and assign one to each screen, set up mux before calling either one or modify the library to immutably set the mux for its own calls.

>> No.1712731

>>1712718
I'm using the adafruit library, I'm not really sure how to do what your saying. The example code I used defines a single display initially:

#define SCREEN_WIDTH 128
#define SCREEN_HEIGHT 64

Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET);

What would I change in there if I were to add a second instance?

>> No.1712789

>>1698042
Practice C only to become a C.S. god

>> No.1712910

>>1712789
ok for example:

#define S1_W 128
#define S1_H 64
#define S2_W 128
#define S2_H 32

Adafruit_SSD1306 display_1(S1_W, S1_H...
Adafruit_SSD1306 display_2(S2_W, S2_H...

//set mux to display 1
display_1.do_something()
//set mux to display 2
display_2.do_something()

two separate instances.

>> No.1712931

>>1712731
Adafruit_SSD1306 display1(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET);
Adafruit_SSD1306 display2(SCREEN2_WIDTH, SCREEN2_HEIGHT, &Wire, OLED_RESET);

>> No.1713080

>>1712590
>the esp itself is programmable to do web based tasks and shit you don't NEED a controller depending on the project.

I just want to publish a message to an MQTT server and flash an LED when a button is pushed, and subscribe to an MQTT topic that flashes the LED when a message is received.

I make a bare esp do that without wasting a bunch of my time?

>> No.1713082

>>1713080
>>1712590
Also, do the ones with the JST connectors have any additional charging circuitry or is it just more convenient than soldering the battery on?

>> No.1713108

>>1713082
>soldering the battery on
If you're prototyping that's the worse thing you could do. Modularity is king, even with finished products due to the ease of serviceability you gain.

>> No.1713340

>>1713082
retarded tripfaggot

>> No.1713361

>>1689490
where can i find some reading stuff about small actuators? RC servos seem too big; i'm looking for something small, 1D, short travel (3mm should be enough) and low energy consumption

>> No.1713549

anyone have recommendations for a infrared camera that is micro controller compatible

>> No.1713605
File: 1.60 MB, 1920x1080, Screenshot (5).png [View same] [iqdb] [saucenao] [google]
1713605

>>1713361
Push Solenoid

>> No.1713713

>>1713605
yeah this should work, thanks

>> No.1714458

>>1712910
>>1712931

Thank you, I tried this but it doesn't seem to work. The first instance will initialize but the second always fails. I tried this both before and after multiplexer setup and neither works.

Also I believe I'm running into other issues with the multiplexer. Currently it has 4 screens with the same I2C address on it, and switching between them works. When I have a sensor, say a temp/humidity sensor, wired to the same same I2C inputs on the Arduino and I run a multiplexer info program, the sensor's address is showing on all 4 used channels of the multiplexer. Would it be better to wire the sensors to the multiplexer itself? Also when I start adding more sensors (gps, SD, accelerometer) at a time the screens start failing to initialize, I'm guessing this is either running low on memory (~80% used) or power issues. Either way I'm upgrading to a Mega to try and fix that

>> No.1715680

I want to make a syncthing server to sync my files over wifi. What SBC should I use? It doesn't need to be running all the time.

>> No.1715696

>>1715680
Wifi direct

>> No.1715736

Absolute newfag here, the only thing i've done was following a guide to make a volume control knob with digispark knockoff.

I want to try some more stuff, should i shell out for Uno or gets some ESP32-based Uno knockoff?

>> No.1715758

>>1715736
If you want to support the Arduino foundation, get the original.
If you just care about what you get for your money get a Chinese knockoff. They are the same (since the hardware is Open source) but much cheaper. You can get a nano for 2$, and it will be absolutely enough for a beginner. Uno clones are okay as well, but you get a much bigger board that most projects don't need.
I got a 5 pack of flashed Arduino nano clones for 10$ when I started. 4 of these are in projects now, the fifth I killed while learning.

>> No.1715761

>>1715758
So far i intent to get one uno-clone and few mini-knockoffs (dont really know what i should be looking for on these though.)

>> No.1716789

>>1694932
connected to positive, arduino pin high=off / pin low = on

>> No.1716817

>>1714458
Honestly, I would recommend you switch to STM32. That way you can have actual debugger so you can figure out what's wrong

>> No.1716841

>>1698268
> these resistors
uhh, which?

What is the other thing you are connecting to? Arduino? raspberry pi?

bi-directional logic shifting is a great thing to do, but you probably only need it to go from 5V to 3.3V.

Usually you can read 3.3V at a 5V input.
Sending 5V to a 3.3V input isn't great, but these days people make the 3.3V inputs "5V tolerant".

You can also just do voltage division to go from 5V to 3.3V if you are to be retarded. There's nothing wrong with being retarded, it's just retarded.

>> No.1716862

Anybody tried the arduino diy box Tonuino?

>> No.1716884

Hey guys anyone knows if IDC connector pitch on usbasp board and the likes is 2mm or 2.54mm? Gonna put the header onto my new board to program it with and don't know which to use.

>> No.1717601

>>1716862
No, but from looking at it, unless you are planning on building it with your children as a learning experience, why not build it yourself without the kit and instructions? It seems pretty straight forward and you would learn a lot from it.
>>1715761
Sorry for the late reply, I'm in a hospital atm. By mini-knockoffs, you mean arduino nano knockoffs? If so, good choice. They are my arduino of choice for most projects. I got mine via aliexpress because their prices are very nice. Look into the description, sometimes they say "Bootloader included" or "flashed" or "pre flashed". These are the good ones. If they do not say that, look into the user reviews, if there are low scoring ones and what they write. Almost any seller without bootloaders will have a bunch of angry people now knowing why their stuff doesn't work. Not the sellers fault, but an easy way to find out.

The TL;DR is a bootloader or flash allows you to use the arduino IDE and connect via usb to pc to program.

>> No.1717605

>>1716884
You can literally just go on the website of the project (https://www.fischl.de/usbasp/)), into the parts list and enter the parts number into https://www.reichelt.de/ - remember to set the language to english up top. You'll get all the data and info you could ever need.

>> No.1717607

>>1716884
>>1717605
Just in case, the "content spacing" is the same as pitch, so he used a pitch of 2.54 mm

>> No.1717610

since ESP32 can't run as USB HID device, can it at least run as bluetooth HID device?

>> No.1717622

>>1717607
>>1717605
Yup thanks, already found it

>> No.1717709

Thread is slowly dying,
New thread: >>1717706
New thread: >>1717706
New thread: >>1717706

>> No.1717845

What do we think about the stm32?
It's pretty cheap and much faster than the standard atmega like the uno and mini packages

Does it work well with the arduino ide and does it run sketches reliably?

What i like about the atmegea is that even though it is weak and old it is reliable as fuck and when i use it to build something which i say seal inside of my wall i don't have to be worried about having to cut out a hole to repair the shit a week later

>> No.1717848

>>1717845
You don't need arduino there why would you put on underwear after you pants?

>> No.1719318

>>1708963
nice, would have done it too. but only to show these faggots they better don't touch her

>oh femanon, nice fucking pen right there
>yeah thanks my chad bf did it