[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / r / s / t / u / v / vg / vr / w / wg] [i / ic] [r9k / s4s / vip / qa] [cm / hm / lgbt / y] [3 / aco / adv / an / asp / bant / biz / cgl / ck / co / diy / fa / fit / gd / hc / his / int / jp / lit / mlp / mu / n / news / out / po / pol / qst / sci / soc / sp / tg / toy / trv / tv / vp / wsg / wsr / x] [Settings] [Search] [Mobile] [Home]
Board
Settings Mobile Home
/diy/ - Do It Yourself

Name
Options
Comment
Verification
4chan Pass users can bypass this verification. [Learn More] [Login]
File
  • Please read the Rules and FAQ before posting.
  • There are 71 posters in this thread.

05/04/17New trial board added: /bant/ - International/Random
10/04/16New board for 4chan Pass users: /vip/ - Very Important Posts
06/20/16New 4chan Banner Contest with a chance to win a 4chan Pass! See the contest page for details.
[Hide] [Show All]



Arduino general

This thread is for Arduinos and all devices in the arduino eco system (esp32, blue pill etc) Raspberry pi is also allowed.

What is arduino?
https://www.arduino.cc/
>>
>>1651573
Im a noob with arduino, what are the best resources to learn?

I've found some mechatronics websites but I'm mostly interested in using small solar cells as my main power source.
>>
>>1651643
Like with everything today just google tutorials on both youtube and internet
>>
>>1651850
Any ideas for something more interactive? I keep trying to learn, but I cant learn for shit without hands on stuff
>>
>>1651892
just take up a project you want to do and google and ask if you don't understand something
but lets be real you have no idea what to do with that thing
>>
File: maxresdefault.jpg (230 KB, 1280x720)
230 KB
230 KB JPG
why is lolduino so shit in the audio applications? i just made a simple sawtoothwave generator and it sounds supershit, like the wave sounds strangled and jittery. any way to make it better?
>>
So I'm looking at trying to build a recorder for flow and pressure.

Uno rev 3

Only need one analog input and a frequency input. Can I use the digital inputs to read HZ?
>>
>>1652074
>Can I use the digital inputs to read HZ?
Probably. It depends on the max frequency you expect to detect, what the signal looks like, and the fastest timer you have running in the system.
>>
>>1651978
Do you have a scope to see the wave form at least?
>>
>>1652100
Just basing it off of experience with mag meters I'd say anywhere from 0-1000hz, not sure what little turbine flowmeters output in freq.
>>
>>1652119
Here's where it gets ugly, what's the signal look like?
>>
>>1652119
If the output is clean you can just count the number of times you cross the midpoint of the waveform.
>>
>>1651573
Is there a way to make sure an Arduino doesn't loose contact with a ROS system? Something like automatically resetting it on startup or if it loses synch.
I tried using Rosserial and it would periodically stop working. Then, I wrote my own driver to read using the 'serial' package in Python. It seems to be working ok once it gets going (hasn't disconnected in 30 minutes) but sometimes, for an unknown reason, nothing seems to get read by the Python node. I know the loop () was running because I make the LED blink everytime it goes round.

I'm thinking about the arduino equivalent of resetting the registers on a MEMS device everytime you turn it on. I have yet to have an MPU-9250 MEMS fail on me the same way an Arduino does.
>>
>>1651978
Duinos are too slow to generate decent audio. They would even struggle pushing data to an external DAC.
Remebmer, arduinos are entry level. If you need more power, look elsewhere.
>>
>>1652117
yeah will do in the afternoon
>>
>>1652117
also its not that the waveform is ugly. the waveform is sort of fine but it jitters, it isnt stable, which is weird, i expect a digital waveform to be pretty stable no matter what.
>>
>>1651573
>OP
so this is the average age of the arduino kids?
>>
Do you remember when people didn't need a SoC more powerful than the fucking moon lander to turn a bulb on and off?

I do.
Thanks arduino.
>>
I have that generic blue arduino relay with 3 pins, you know which one, and i turn it on and off with ESP32, but i need to guarantee that the relay won't get triggered by some shit like random noise or the ESP32 rebooting (causing the relay pin to be set as input for a tiny moment) should i add a pull up resistor or something to the relay pin?
>>
>>1652244
Couldn't you use the watchdog timer to reset the arduino when a serial command is issued by the computer when it doesn't receive any data? Is there an error in your code, like not handling micros overflow (which happens after around 70 minutes)?
>>
File: circuit-20190724-0539.png (13 KB, 556x324)
13 KB
13 KB PNG
>>1651978
stop being lazy and make pic related. with the resistor values and cap values its like a high pitched whistle if you add a speaker to replace a wire off one of the bjts emitter. regardless of what the simulation says its like 120hrz

and if you increase the cao values to 1uf and the low resistors to 3k its like thumping. its steady thumping but slower and this is more like 30 hrz and anything in between you can get and if you only use 1 bjt as the driver by connecting on the collector and make the cap values asymmetrical you can change the spokes to sawtooth or even get near square wave since 1 cap determines up swing and the other determines how long it will be there it can be gradual or steep. just fuck with that crappy simulator nobody likes its the one oscillator i made in it and in reality that works the same way. falstad or something
>>
>>1652782
Oh god you are an idiot.
>>
>>1651953
Why be a discouraging dick? He's asking for interactive resources to learn. There's no need to make a dig at him for not knowing, when he is actively seeking knowledge.
>>
>>1652790
You know very well it's true. That guy has no fucking idea what do to with the Arduino that's why he's asking such stupid question and can't find any tutorial that holds his interest.
>>
i have an stm32 f401re, I got it for free but I don't know how to use it. it seems more complicated than an arduino. I have two expansion modules (bt and accelometer). this is my first time with electronics but I don't know where to start
>>
>>1652819
again
>hurr durr I want to do electronics but I have no idea what to do
Pick a project you want (we know there's none) and start there.
>>
>>1652825
>Pick a project you want (we know there's none) and start there.

Some day I might try to copy this pointless but cool project, that uses 2 arduinos, 4 microphones, and 4 stepper motors to bounce a ball

https://electrondust.com/2018/07/22/stepper-juggler/
>>
>>1652819
You could write the Arduino bootloader onto the STM32 and use the Arduino IDE and libraries, I guess. Later get a cheap programmer, install PlatformIO for VS Code, get CubeMX to generate the initialisation code, then start poring through that 1000+ page reference manal to see what it can do without the Arduino framework getting in the way.
>>
>>1651573
Completely new to electronics here.

Would you suggest an Arduino or a Raspberry Pi for a beginner who wants to learn to code and build electronics?
>>
>>1651573
That kids Thumbs are Brilliant had to say ..
>>
>>1655207
Neither, RasPi isn't electronics at all it's programming and the Arduino is barely any better.

Buy a bucket of components and build something.
>>
I want to trigger LEDs with software in windows. Im wanting to make an automatic LIVE/ON AIR light.

I use OBS software and an Elgato Stream Deck (programmable macro keyboard) to stream to twitch. You can write scripts for both of these.

I have not much coding or Arduino experience but does this sound right

>write script triggered by going live (either in OBS, or triggered from pushing elgatos OBS go live button)
>script would trigger Arduino to push out 5v to LED

You are live, the light is on

>script triggered from pressing the stop streaming button
>trigger Arduino to turn LED off

Does that seem reasonable, and would one of those little baby sized Arduinos work?
Im not sure how to go about doing it.

I have a MEGA2560 laying around but think those mini sized ones look cool.
>>
If you set an aanalog pin to some voltage arduino creates that voltage by pwming it, so what ios the purpose of some of the digital pins also being amrked with the pwm symbol?
>>
>>1655722
Look at the datasheet for the actual microcontroller and it will become obvious, PWM outputs share the same pins as digital outputs, nothing more.
>>
awww shit
i accidentally brushed a 15v jack on the bottom of my arduino and now it's fried
and thats why i order them in bulk from chinks
thank god for cheap chinks
>>
Every thread has "that one guy", this thread not excluded. smdh.
>>
>>1655936
Which is exactly what pedophile means.
>>
>>1651953
you're being kind of a debby downer right now.


booooo on you
>>
>>1655207
arduino, raspi is way too expensive for all the fuck ups you will do
with arduinos you can just order 10 and start fucking them up
not to mention that for the shit you will do like turning on and off lights arduino was purpose intended, raspi is absically a linux server
>>
>>1655917
what one guy?
>>
>>1651892
interactive? you can't go more itneractive than youtube and text tutorials
If you want more itneractive than that you have to join your local electronics club and hang with the nosebleeds
>>
>>1651892
Have you tried legos?
>>
>>1656055
>>1655917
>triggered because it's the truth
>>1656145
who says the truth
>>
i feel like i got scammed
arduino """analog""" output is just pwm at 0.5-1khz
can i just toggle digital pins on and off to get moar frequency
also what software should i use to flash a chink nano with assembly via the mini usb
>>
>>1657550
>i feel like i got scammed
You mean you can't read.
>can i just toggle digital pins on and off to get moar frequency
yes, that's a dumb question
there's also a PWM fuction
>also what software should i use to flash a chink nano with assembly via the mini usb
I'm sure it's on google
>>
>>1655608
You would need to somehow send from OBS for example '1' or '0' via Serial port to Arduino which would turn on/off the led
>>
>>1655917
a pedo
>>
>>1651573
is it possible to control a RPi's GPIO pins in languages other than python? The manual only included instructions for python and I can't seem to find any answers on RPi forums
>>
>>1657955
https://lmgtfy.com/?q=raspberry+pi+gpio+c%2B%2B
https://lmgtfy.com/?q=raspberry+pi+gpio+java
etc
>>
>>1658011
you don't think I already did this? dumbass
>>
How do I setup an arduino uno so that it calls an interrupt every 125μSeconds?
>>
I wanna make a Pip-Boy. Not wrist mounted, but something like this from the earlier Fallout games. I already have a working geiger counter, but I wanted to add a GPS, FM radio, access to PC via USB or something, a SMALL nuclear battery (photoresistors and tritium just for the memes) The radio doesn't have to interface with the program and interface exactly, I just want to have an on/off switch controlled via a program and not a physical switch. Obviously I'm gonna redesign it to be more practical but this pic looks cool and is a basis of what I want.
>>
>>1658298
>I wanna make
what is stopping you from actually making it?
>>
>>1658307
Not knowing whether or not this is a plausible idea for an Arduino based system. I also am a little clueless on how to work a ton of Arduino stuff and don't know any good books. I have Practical Electronics for Inventors but that doesn't apply much to Arduino, and I also only know very basic coding from a small book. I also don't know how I would lay out all of the electronics and fit them. Are there any books that could show me any practical solutions to these problems? I wanna make one really bad and components are cheap enough to where this would just be a $150 project at the very most. I think I still just need to read the book I have a bit more. I don't know.
>>
>>1658315
>>1658307
I also don't know if I could fit all of that into one thing with just an Arduino and I don't want to use one of those Arduino Megas. Couldn't I just use whatever AtMega chip the Arduino has and prototype on a breadboard until I can get it compact enough to make a real circuit board? I'd just need a layout of what pins do what since the chip pretty much directly interfaces with the io pins
>>
>>1658286

the clock is 16 mhz so you need to count 125 e-6 * 16e6 = 2000 counts. so use timer 1 or timer 2 and CTC mode with a prescale of 8 and compare match of 2000 / 8 = 250, and enable the interrupt for that. timer 0 is used for millis() and delay() so don't use it.
>>
>>1658013
then why are you asking dumbass
>>
>>1658316
Yes you can do it with an Arduino.
Why not use RPi and make it into a game console so you get some use out of it?
>>
>>1658352
Because I'm autistic and I unironically want to LARP with one of these on hikes and stuff and do it as authentically as possible. The RPi game system idea is a little overdone and too easy
>>
>>1656183
Found that one guy
>>
>>1658359
> as authentically as possible
I doubt a duino powers the pip in the fallout world. A too would be closer to "authentic" because a pip is more microprocessor based with complex processing and not a small microcontroller.
>>
>>1658889
*an rpi would be closer
>>
I have a nodeMCU version of the ESP8266 and I've read that the firmware is programmed in the lua language. Mine works fine in the Arduino IDE where my code is C++, but even a simple sketch takes a lot of space: "Sketch uses 269992 bytes (25%) of program storage space. Maximum is 1044464 bytes."

So, is it re-writing all of the firmware, and it's all in C++ using the ESP8266WiFi library, or does it write the lua part as well, or what? When I select another board rather than nodeMCU, like "generic esp8266" it flashes ok but the code does not run.

Not that it matters since everything works fine, I'm just curious as to what exactly goes on.
>>
>>1658315
Use raspberry pi instead
>>
Which arduino-like microcontoller has the best ADC? I want to read a voltage between 0 and 10 mV. Do I need an op amp anyway? Shouldn't I just use an external ADC?
>>
>>1659757
>Do I need an op amp anyway?
yes
>>
>>1651892
Just buy some basic stuff like a broadboard, buttons, LEDs, sensors, and motors. As your learning programming just apply that logic to what you have so you can visually see what's going on. Like if your learning loops figure out how to visualize it with a led. Can't get much more hands on that that.
>>
>>1657550
arduino only has analog inputs son, the variable voltage outputs are called PWM which is a square wave, nobody ever claimed arduino has analog outputs
>>
>>1660876
he's talking about the frequency you retard, how retarded are you that you can't understand simple sentences
>>
So apparently, the ATmega32u4 has an amplifier with a gain up to 200x for its ADC. How do I set this gain on an Arduino Micro?
>>
>>1651978
max sample rate output for arduino is loosely correlated and limited by the clock, or mips, the processor is capable of. try the same function on an arduino that has a better processor. like on a Yun for example. also try coding the wave output yourself. any intermediary api might be too much overhead. arduino mega should be able to handle most human audible tones, uno probably too.
>>
>>1660876
The arduino library itself named the function analogwrite, which is a misnomer that obviously confuses newbies.
This shouldn't come as a surprise since the arduino library authors are idiots.
>>
>>1654160
If you van gear it up theres an autist in another thread that needs this platform for his bootleg dryer / apartment fire starter
>>
>>1660989
you should be able to change the registers directly, look at the ATmega32u4 datasheet

>>1661015
are you also too retarded to understand the problem was frequency
>>
>>1651978
Use the Mozzi library. you can have a demo up and running in 10 minutes if your not a pleb.
>>
>>1661055
>frequency
that has nothing to do with analog you retard, it's pwm, analog doesn't have a frequency
>>
>>1661456
read that first post again you fucking autist
>>
>>1661055
>are you also too retarded to understand the problem was frequency
Are you the poster who said you felt scammed? You really are fucking retarded.
>>
>>1661456
>analog doesn't have a frequency
Stop posting, seriously. You are flat out wrong.
>>
>>1661101
>Doesn't use a DAC
>16k sample rate
>8 bit audio, 14 with reduced SR
>Tons of processor overhead

Its like you hate life. Just get a DSP for playing with audio. Arduino hardware is terrible.
>>
File: month-by-month.jpg (251 KB, 800x1726)
251 KB
251 KB JPG
so what are you guys working on?
>>
>>1661599
I'm trying to see how many ghz of processing power it takes to make a single red LED blink on and off again.
>>
>>1661599
What IDE are you using?
>>
File: IMG_20190528_191159~2.jpg (2.2 MB, 3844x2830)
2.2 MB
2.2 MB JPG
>>1661599
24 bit audio recorder, on the left. Currently saves to an SD card.
Right side is the player, up to 32 bits.
Going to combine them eventually and code in DSP routines to modify the raw audio.
Using a beefy dsPIC from their 33EP line for it all.
>>
>>1661612
How fast? Rule of thumb you need 90,000 kiloflops per second of interval time
>>
>>1661599
Nice progress
>>
What are FPGAs for? What kind of applications are better for using them than MCUs?
>>
I'm scratching my head about the ESP8266. I see talk of NodeMCU and Arduino. Arduino I understand is an atmega chip and a boot loader for flashing programs. NodeMCU seems to be a whole lot more. Will tools I use to compile and flash Arduino work with the ESP8266?

FWIW, I use Arduino-Makefile on Linux, so that means avr-gcc and avrdude.
>>
>>1661658

from https://github.com/esp8266/Arduino


Install the current upstream Arduino IDE at the 1.8.7 level or later. The current version is on the Arduino website.
Start Arduino and open the Preferences window.
Enter https://arduino.esp8266.com/stable/package_esp8266com_index.json into the Additional Board Manager URLs field. You can add multiple URLs, eparating them with commas.
Open Boards Manager from Tools > Board menu and install esp8266 platform (and don't forget to select your ESP8266 board from Tools > Board menu after installation)
>>
>>1661656
Well, if you want custom stuff, good luck, building your own ASIC. To me it's the bridge between CPU and ASIC. Something I can develop and debug myself like software that runs on a CPU, but with many benefits from ASICs.

>>1661660
You can use the Arduino IDE for NodeMCU.
>>
>>1661658

here's the board list which will include nodeMCU after you do all that other stuff here >>1661660
>>
>>1661664

well fuck, let's try that again
>>
>>1661619
visual studio code for development, then I switch to arduino IDE for flashing the controller cause I can't get it to work with internal clock-based setup.

>>1661644
thx
>>
>>1661623
that's a huge board.
>>
>>1661689

My experience is that once you get beyond a certain level of complexity, that sort of board sucks because with that many jumpers, one will wiggle loose every now and then and you have to waste time finding which one sucks.
>>
>>1661689
>>1661708
Not if you take care of the board and actually wire things up properly. I've had this board for a good 10 years. I don't use those pre cut jumper wires for Arduino type boards, I cut and strip solid core wire to fit exact. At worst I'll have a component like a tall capacitor pop out if something get set on it.
It was expensive, but has been worth every cent
>>
>>1661686
Any reason you're using visual studio over MplabX?
What programmer are you using?
>>
>electronic brainlet
>want to build a lap timer for mini4wd cars
>spend 6 months hacking around, build some bridge-like structure with laser leds and phototransistors hidden in a small hole under the track, write nice little software that reads data using Firmata
>not bad if I say so myself
>lap times aren't registered if a car goes faster than 8 m/sec
>curse the gods for a week trying out everything
>swap the sensors from analog to digital pins
>suddenly 100x the number of readings
At least I learned something
>>
>>1654160
looks useless and fun. can you explain what those are or what purpose they serve
>>
>>1661727
Guy I know took a VT220, soldered wires to a few keys, solder wires to some switches. When a car goes over the switch, Q, W, E, or R (depending on track) are sent over the serial link. On the computer side, he has the serial TTY autologin and run a program he run. Program displays laps, stats, times and stuff. He built this back in the day. I helped him get it to work on modern hardware (aka USB to serial adapters) with modern Linux.

Of course it would be so much easier with an Arduino for input and a standard video monitor but whevevs.
>>
>>1661724
Haven't heard about MplabX before, will try it out. Vscode isn't particularily suited for embeded development, I chose it becase it was my goto IDE for medium-sized webshit and scripting projects. It can do everything that arduino ide does, plus it supports multi-file projects, live linting and code completion. The main downside is that it's an electron app, so it requires a lot of disk space and eats a lot of ram and cpu just idling in the background.

>What programmer are you using?
I use an arduino board as ISP, just followed https://www.arduino.cc/en/Tutorial/ArduinoToBreadboard.

Now you may say I'm a pleb because I'm still compiling and running <arduino.h> on the microcontroller, and have no clue on how to use avrdude from commandline, but I'm amazed by how much I managed to learn so far.
>>
>>1661818
>no clue on how to use avrdude from commandline
no one fucking uses avrdude from the command line. It's either baked into a Makefile or run from the IDE.
>>
>>1661852
>no one fucking uses avrdude from the command line

it might be a bad idea for him, but lots of people like myself use it that way all the time for assembly code.
>>
>>1661871
so you type out the command by hand each time? and you claim to be a programmer?
>>
>>1661875

no you stupid motherfucking idiot, who's talking about typing the goddamn thing? when he said "using it from the command line" he meant that he didn't know the way to setup the arguments.

once you know how to set it up, you braindead imbecile, you put it in a script. what is it about the arduino universe that attracts dim-wits like you the way shit draws flies.
>>
>>1661729
Those look like the motor drivers.
Bipolar stepper motors I believe.
>>
>>1661818
>Haven't heard about MplabX before, will try it out.
I'm not 100% sure it will work well for you, but its worth a shot. Microchip (PICs) bought Atmel (AVR) years ago, and MPLABX is Microchips IDE. They've been building in AVR compatibility over the last few revisions. You can program in assembly and modify every register you want for the AVRs.

I've only used it with PICs and it's great, but more geared towards advanced users, no libraries.

There is also Mikroelectronica and their AVR IDE. But it costs money and only works with their debuggers. Good stuff though.
>>
>>1661897
I like you. You sound like my inner voice.
I hope you have an awesome day.
>>
Out of my way you fucking brainlets *slaps a PIC on the table*
>>
>>1661897
What part of "baked into a Makefile" was hard for you to understand?
>>
>>1661945
Explain to me how PIC is better then AVR, beyond your personal preference.
>>
>>1662225
far more agile
>>
>>1662271
>agile
meaningless buzzword is meaningless
>>
>>1662225
Not that anon, but I like the remapping ability of the peripherals.
It has a list of numerous pins that you can assign functions to.
You SPI pins, for example aren't limited to specific pins. You can select which pins use SDI, SDO, SCK, ect..
They also have very tuneable on-chip oscillators that can be tuned on the fly for dynamic speeds.
Their mid line dsPICs have DSP engines for complex digital signal analysis.
>>
>>1662347
>It has a list of numerous pins that you can assign functions to.
>They also have very tuneable on-chip oscillators that can be tuned on the fly for dynamic speeds.
This could be useful.

>Their mid line dsPICs have DSP engines for complex digital signal analysis.
One wonders how this would be more useful then a nanopi or equiv.
>>
>>1661852
I use it for setting fuses
>>
I’m trying to make a backyard bioreactor for my craft beer setup but I’m having trouble getting reliable temperature control
>>
File: received_471340313716704.jpg (699 KB, 3024x4032)
699 KB
699 KB JPG
I have wired up an Arduino Nano to a Gameboy clone called GB Boy Colour. If I run the Nano from a power bank or wall adapter, it presses the buttons the way I want. However, if I try to power the GB Boy with the 3.3v output of the Nano, the system acts like it is not getting any power and just gives me a white screen. The same thing happens if I try to power the Nano with a 9v battery. The GB Boy resets over and over when it is using its own batteries and a 9v on the Nano.

Am I missing something here? All I want is to run the Nano and GB Boy from the same power supply and it is driving me insane. Does anyone have any potential diagnoses?
>>
hi guys, my goal is to make my pc able to be turned on from remote, talking about over the internet stuff. I was thinking about connecting the mobo to an arduino and building a REST api in order to do it.

But arduino is not powerful enough for HTTPS since I want to make it secure, so I have to resort to some other board. I'm excluding raspberry pi and similar boards bc I want it to sustain power outages, and to get it back working as soon as electricity is back.

Any suggesions?
>>
>>1663312
ESP32 can do HTTPS
>>
>>1663326
Nice, I have an esp8266 and I saw it can do HTTPS too. Though, do you happen to know ethernet based boards that can do the same? I would love to get rid of any problems wifi can involve
>>
>>1663182
The Nano's 3.3v output doesn't have a huge amount of current output, I've read 250mA, far less then a GB Colour would need.

As to running a Nano off a 9v battery, that should Just Work. Have you tried running the Nano alone, without the GBColour and stuff attached?
>>
>>1663392
Hey, thanks for the reply. Yeah, I figured out that the resets I kept getting with the game were an error in my code, not an error with the Nano after I tried another power supply and it kept happening. I didn't realize that there was no delay between one button being pressed and another being released. Because of this, the GB Boy thought multiple buttons were pressed simultaneously.

Any ideas on a portable power supply that I can buy/build that can give the the two parts their current needs, the Nano its 5v, and also giving the GB Boy its 3v?
>>
>>1663502
Remove the regulator on the Nano and run it at 3V
>>
>>1663502
A 9v battery for the Nano and zenner diode or LD1117-3.3 should be all you need. Do you know how much current the GB draws?
>>
>>1663502
If you need a circuit

www.electronics-tutorials DOT ws/diode/diode_7.html
>>
>>1663522
Shit, I didn't even think to look for a 3.3v regulator like that. I've only ever used the 7805, I think it is, so I never even thought that they made others. Thanks, Anon. That helps a ton, actually.
>>
File: IMG_20190630_223808~2.jpg (28 KB, 354x353)
28 KB
28 KB JPG
What has been your most satisfying moment lately with Arduino and its family?

>>1663182

>Come up with stupid idea to make Arduino mash random buttons on Gameboy as poor man's portable TwitchPlays games
>Solder wires and make simple random sketch
>Works okay except for resets
>Realize the delay between a button being released and pressed is too long
>Gameboy thinks buttons being held simultaneously
>Fix issue
>Works well, but game pauses way too often to be useful even for random presses
>Tinker with "BlinkWithoutDelay" sketch and make my own that still mashes the other buttons, but presses Start every 7 seconds
>Compiles on first try
>Works great
>Dipshit Arduino names self in Pokemon Yellow, manages to wander Pallet Town and even saves the game
>Anons help with power supply ideas
>mfw shit is working out
>hellyes.jpg

This shit is a blast. I wish I had dicked around with Arduino when I was younger. Will I always enjoy it, or am I gonna get jaded soon and find diagnostics and repair to be awful instead of fun?
>>
Are all breadboards pretty crappy and loose or there are better ones? I bough a couple on ebay and they are horrible. Loose like a sleeve of wizard. Either that or wire connectors are too thin.
>>
>>1663668
Shitty chink ones are garbage. I have a couple large breadboards made by 3M that I bought from Mouser. They've done very well for the past 10-ish years.
>>
File: 3M BB.jpg (177 KB, 640x640)
177 KB
177 KB JPG
>>1664198
Forgot photo. One this size set me back a good $75
>>
>>1663326
But at what cost? You have to hardcode the ssl cert in manually it's tiresome as fuck
>>
File: IMG_20190813_103743__01.jpg (1.83 MB, 2304x2618)
1.83 MB
1.83 MB JPG
Posted first on /ohm/ like a retard, but here I have a manually controlled 120V AC winch that I'm trying to control via Arduino over WiFi. I popped open the controller and this is what I found:

When:
Red+Green && White+Black = winch pulls
Red+White && Green+Black = winch unwinds

I figure I need some type of relay switch, but I have no idea what kind I need. Any ideas, anons?
>>
>>1665059
Red and black are constant, so you only need to switch green and white (plus an on/off relay if you need that). 2 of those cheapo blue relays should do the green/white switching.
>>
File: IMG_20190813_114637__01.jpg (1.62 MB, 2304x2348)
1.62 MB
1.62 MB JPG
>>1665061
Turns out I have two lying around, hell yeah. Should switches go into NC or NO ports? I'm sure constants go in COM but I really don't want to end up in a /diy/ fails thread
>>
>>1665076
Constants go around the relays. The output to the motor goes to COM or whatever the middle port is, then G and W go into both relays' NO and NC. The relays have to be operated(or wired) inverse to each other.
>>
>>1665077
So this shouldn't start a housefire? If that's right then I think I understand these things now, thanks dubs of help
>>
File: shit.png (81 KB, 1000x1000)
81 KB
81 KB PNG
>>1665083
No, that's total or at least partial housefire. See pic related, but this is assuming your description of the motor is correct, I don't actually know for sure what type of motor it is.
>>
>>1665083
>>1665089
Actually, what exactly do you mean by the "Red+Green && White+Black", are you connecting them together on the other end of the cable?
>>
File: IMG_20190813_130455__01.jpg (1.89 MB, 2304x3568)
1.89 MB
1.89 MB JPG
>>1665092
So when you press the right button (pull), it bridges connections between the red & green wires AND the white & black wires. Inside the controller there are only those 4 wires, and when no buttons are pressed, the motor is locked and no wires are bridged
>>
>>1665099
Okay, in that case >>1665083 is right, but there's no "off" state there. You'd need a third relay on either the black or red lines, before these two relays, that will be switching on/off.
>>
>>1665089
And that top box is supposed to be the power source?

>>1665099
The AC motor is powered thru a 120v power outlet, so the red/black wires in the controller aren't your typical ground/output wires.

Excuse my shitty pic, color lines indicate where the wires come from
>>
>>1665108
Ignore >>1665089, it was made with a different type of motor in mind.
The proper way of wiring on/off with AC would be disconnecting both wires, so 4 relays in total, but assuming the winch is properly insulated you'd probably be fine cutting just one with 3 relays.
Can't say I know what's going on in that control box, but going by what you said >>1665083 should work.
>>
>>1665113
Sounds rad, appreciate the help. I'm actually going to try to control 2 winches inversely and simultaneously, so I'll go ahead and order an 8-relay, a 2-relay for turning those on/off, and a WiFi module for the Arduino sending commands to all of them. I plan on having this run for at least a year, are there any resistors or protective components I should add to be safe?
>>
>>1665123
Put quick-blow fuses in line with the mains connection, rated a bit over the peak amp draw of the motors.
>>
>>1664943
asking anon here; It's not even that hard, I'll generate a self signed and trust it on every machine of mine
>>
I have basic-to-intermediate analog electronics knowledge, haven't ever really worked with arduinos before though

I want to make a gay boy riced out motorcycle helmet using RGB LEDs and control it using the arduino. So this means using buttons and potentiometers with it.
I also want to have a little 16x2 lcd display for status information.

Obviously a little nano/uno doesn't have enough IO for this. So, how do you typically expand the available IO on an arduino to accommodate everything you need to add?
>>
>>1665701

three pins can drive any number of output pins using 74HC595s. another three pins can add any number of input pins using 74HC165s.
>>
>>1665712
So it's going to be down to shift registers then?
>>
>>1665714

mega2560 costs a bit more but has an assload of pins and timers and uarts, etc.
>>
So I've been looking into using shift registers for adding IO to an arduino. From what I can gather, there's no way to write to an arbitrary pin, you're locked to stepping through which pin is currently latched?
Is it possible to define some sort of counter to keep track of the last latched pin, and then just iterate through all the pins until you reach a specified one so you can kind of get random access?
>>
>>1666169
>. From what I can gather, there's no way to write to an arbitrary pin,

I might not have understood your question, but this is what I do: assume I have 3 registers daisy chained so there are 24 bits controlled. If I want to just change bit number 13, I do that in my bytes that I'm going to send out, then I send them then I latch them. So, I always have to send all 24 out, but in this case only one changes state.

Other than being slow, it's the same as random access would be no matter how it's configured, in that you can change 1 or all or any random number of the 24 bits each time you send the latch command. some chips call the pin RCLK and some call it ST_CP, but it's the pin that moves the data from the shift registers to the output registers. If you leave that pin alone, you can shift any number of bits and they only appear on the output pins when you toggle RCLK (ST_CP).
>>
>>1665701
Use attiny85 and pixel LED strips, they only need 3 or 4 wires and you can turn on off or set any color to any led of the strip separately
it will be so smol and low energy you will even be able to include the battery in the helmet and have no wires coming from it
>>
>>1666551

Uno doesn't have enough GPIO.

Use attiny85.

Yep.
>>
>>1665714
or I/O expanders (and/or an ADC if you need extra analogue input channels) via I2C or SPI.
>>
>>1666169
Some I/O expanders let you do that, or at least send a bit pattern instead of clocking in each bit like you do on a shift register.



Delete Post: [File Only] Style:
[Disable Mobile View / Use Desktop Site]

[Enable Mobile View / Use Mobile Site]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.