[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

Arduino Thread

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 293
Thread images: 61

File: arduino.png (426KB, 551x405px) Image search: [Google]
arduino.png
426KB, 551x405px
Old thread is dead.
ITT:
>projects
>questions
>advice
>>
File: IMG_20170509_150848.jpg (667KB, 1383x1037px) Image search: [Google]
IMG_20170509_150848.jpg
667KB, 1383x1037px
>>1174931
i appreciate that

To get this started: some current status pic of my ball-and-plate platform I mentioned in the last thread
>>
File: IMG_20170509_144532.jpg (728KB, 1383x1037px) Image search: [Google]
IMG_20170509_144532.jpg
728KB, 1383x1037px
>>
File: IMG_20170509_144456.jpg (852KB, 1383x1037px) Image search: [Google]
IMG_20170509_144456.jpg
852KB, 1383x1037px
>>
anyone ever do anything involving both an arduino and labview?
>>
>>1174823
> Old thread is dead.
What old thread? We never have arduino generals, because we have /ohm/, and lets face it, arduino is lego, and so overly supported on the internet that a dedicated thread here is redundant. At least make it a mega thread so its less about some overblown brand name and more about the actual architecture.

> implying dweenofags even know the name of the chipset driving their lego set.
>>
File: uncaring-doctor.png (279KB, 615x511px) Image search: [Google]
uncaring-doctor.png
279KB, 615x511px
>>1175171
>hi im a nitpicking faggot

he says arduino, but you know what he fucking means dickhead
>>
>>1175160
what is a ball and plate platform and what did it do?
>>
>>1175267
Basically a platform that can balance a ball or move it on specific trajectories by tilting the top plate. The ball position is usually determined by using a camera + software or by using a touch sensor (as seen in the pictures).

All in all it's a showcase project for control engineering that looks cool but has no real application.
>>
File: nixieClock.jpg (216KB, 1396x849px) Image search: [Google]
nixieClock.jpg
216KB, 1396x849px
>>1175171

As a "dweenofag" I take high offense to that. If the board works for your application why reinvent the wheel every time?

Pic related is where it was better to use just the Atmel 328 than use an Arduino. Otherwise I would have just used the premade prototype board.
>>
File: 1494447597301.jpg (332KB, 1396x849px) Image search: [Google]
1494447597301.jpg
332KB, 1396x849px
>>1175362
>all those unnecessarily close traces
ngggg
>>
>>1175162
first run: https://youtu.be/SEFt4bv-56w
>>
>>1176101
hey thats fucking neat im gonna make one
>>
any ideas what i should do with mine,
got one as a gift, dont know what to do with it
>>
Im interested in getting started with this, but I dont know where to start. Should I start learning some coding first, or is it easier for someone with zero experience to get one of the beginner kits and jump right in?
>>
>>1174823
Arduinos are a scam.
stand alone avrs are about $2 and a usbasp programmer is $7.
>>
>>1176404
Not everything needs to be cheaper than its parts.
If the original is too expensive, you can always buy Chinese copies for $3 or so.
>>
>>1176397
Knowing some C language would make it a lot easier, but if you can get as far as getting a LED to blink and understand how that works, you could probably learn the coding as you go. Just don't expect too much at first.
Some basic electronics like ohms law would be helpful also.
>>
File: 1456735024251.jpg (89KB, 600x600px) Image search: [Google]
1456735024251.jpg
89KB, 600x600px
>>1176397
I just got a starter set a while back. The programming is very simple and the book will walk you through everything. Same with setting up the circuits.

I finished the tutorial. Anyone know any simple, low budget projects I could work on now? I'm thinking about the MeArm kit.
>>
>>1176101
That's pretty cool.
You goung to try to make it do patterns like rolling in a circle?
>>
>>1176692
Work in progress:
https://youtu.be/3-h8JDZ6Oy8
Another interesting video that shows how a PID-controller can (quite slowly) eliminate constant steady-state errors over time:
https://youtu.be/n-ezBTAm4t8
>>
>>1176481
You don't even need to know C specifically. Just about any object-oriented programming language will do. I only know basic Java from high school computer science, and I was able to get into Arduino pretty quickly just by reading some of the example sourcecode that comes with the IDE.
>>
>>1175171
Please die in a fire. The world will be a better place.
>>
>>1176899
Java copied C's syntax.
>>
>>1175165
Why in gods name would you use LabView?

Use Python
>>
Going to make >>1176455 with an attiny2313.
>>
Can I wire magnetic head straight to arduino and be able to read binary when I swipe? I have added lm386n to up the voltage since I heard it uses mV

I read datasheet and said I can use a 10uF capacitor to up the gain from 20 (default) to 200. But it doesn't mention I can't use higher uF to get to 200 gain. If not I will go to microcenter and pick some up.
>>
I need some advice.

I currently have two xbee pro 900s and two arduinos and an adafrui ultimate GPS v3. I want to have one act as the router and the other a coordinator. The router will have a GPS attached (I'd like to be able to add other senors as well) The GPS information will be set to the coordinator to store the information on an SD card that I can pull off at a later time.

The coordinator will stay back at my car/station while the router will be in my backpack.

My biggest concern is stacking all of the components. I have a little experience with arduino, but in my mind the router should stack: arduino board -> xbee shield/xbee -> (other sensors if I plan to add them at a later date)

The coordinator should stack: arduino board -> datalogger -> xbee shield/xbee

These will of course have batteries attached and cloverleaf antennas, but I'm not really worried about them right now.

Would someone be able to provide links to each component that will work well together? I'm just nervous about them not stacking correctly or is there a better way to go about this? Will the xbees not be able to communicate because of an obtrusion from the mountain?

Why I am making this: I will be hiking around some rural mountains and want to obtain some data, but my location needs to be sent back to my car/station where others will be. As for now I just want to start with a GPS and then possibly add some other sensors such as temp/voice.
>>
>>1176101
Did you follow a guide to do this? It looks really fun to make.
>>
>>1176715
sweet.
good work
>>
>>1177725
There are several guides available if you want to build one:
1) http://www.instructables.com/id/3DOF-Ball-on-Plate-Using-Closed-Loop-Stepper-Motor/
2) http://www.instructables.com/id/Ball-and-Plate-Arduino-PID-Control/
3) http://www.instructables.com/id/Balancing-Plate-Game-Ramy-Mounir-MAKE-Course/

Obviously my design is loosely inspired by the guy's work in the first link. Despite that all design and coding is selfmade. Main difference is the bigger plate (12 inch touchsensor) and higher range of motion. Also my platform is the first one i've seen so far that actually uses more than 2 DOF.
>>
File: DSCN2079.jpg (437KB, 1600x1200px) Image search: [Google]
DSCN2079.jpg
437KB, 1600x1200px
Not much to look at, but in all my years as an electronic hobbiest, I've never made an actual accurate clock til now.

Also my first use of interrupts for button inputs.(instead of strait polling)

I read somewhere that you shouldn't use interrupts on non-debounced buttons, but this seems to work well.
The ISR polls for a high or low for 10 consecutive checks, 1/2 mS apart.
>>
>>1178813
Eww, that shit is dirty.
>>
File: analog mux.png (17KB, 1357x528px) Image search: [Google]
analog mux.png
17KB, 1357x528px
I need something like pic related.

I'm thinking about using a 4053 as the analog mux, and the 5V pin of the arduino as the selector.
http://assets.nexperia.com/documents/data-sheet/74HC_HCT4053.pdf

The problem is that I don't know what happens with the 5V pin of the arduino when it is off. If the pin is floating, then I think the mux won't work.
Any suggestions?
>>
After being an Arduino fan for ages, I got a book on starting Arduino, despite not having an Arduino itself.


Where can I get one cheap on the web? Am a canuckfag (Toronto) if it matters, and I prefer a physical store of anyone knows
>>
>>1178852
well read the fuckign manual perhaps?
if you aren't sure about internal pullups or pullups on the board you are using then just add one, a 10kohm resistor between your pin and 0v will draw and extra half milliamp when the pin is high and tie it low when off.

but to answer your question more directly setting a pin as an output will typically tie it hard to logic high or logic low, the only time it will 'float' is if you set it up as an input pin.
>>
>>1178857
By off I mean the whole arduino turned off, without power supply, so the pins won't be set as outputs or inputs.
But I will use the 10kohm resistor between the selector pin and gnd, as you said.
Thanks.
>>
>>1178855
https://solarbotics.com
>>
>>1178855
if you want one cheap you dont have to actually buy an arduino, just get the parts you need to transfer it to a breadboard and follow this
https://www.arduino.cc/en/Tutorial/ArduinoToBreadboard
>>
>>1178855
Uno for $7
>https://www.fasttech.com/category/1008/development-boards
Read reviews before purchasing.

Also Ebay.
>http://www.ebay.com/sch/i.html?_nkw=arduino
>>
>>1178862
>By off I mean the whole arduino turned off, without power supply, so the pins won't be set as outputs or inputs.
a most unfortunate misunderstanding. i apologise for my abrasive attitude, i hope we can put this behind us and move on.
>>
File: image.jpg (2MB, 4032x3024px) Image search: [Google]
image.jpg
2MB, 4032x3024px
Seems like a somewhat appropriate place to ask (if not anyone know where I might go instead), I got my hands on this old action replay for game boy advance and naturally it doesn't respond at all when inserted into any of three consoles which all work fine for everything else lying in my drawer. Any ideas where to begin or what to look for, really have no knowledge of this sort of thing, any help appreciated
>>
>>1175165
yes. i wanted to kill myself. labview is a complete piece of shit. switched to an NI controller (literally 100x more expensive), but at least it worked without a million and one hacks.

seriously, fuck labview. traditional programming is better in every way.
>>
File: light board.jpg (288KB, 1600x1200px) Image search: [Google]
light board.jpg
288KB, 1600x1200px
Old project to bump

This is from a McDonalds order taking machine (from the '80's I think).
Coded for basic text (sucks but mostly readable) and graphics like lines and circles. Can't get a good action shot because of multiplexing (breadboard circuit designed around what I had on hand).
>>
>>1178946
Ask vr. I think that Nintendo might have locked them out of more recent consoles? Like for a classic game boy brick, it'd work; but for a mini or color it wouldnt

I don't remember though. I think i remember something about it. Like a lot of games that came out after the original release on nes stopped working, even if they were games with existing cheats, they changed the shit specifically to stop the game genie. They could have done similar shenanigans for your thing
>>
Is it possible to control an RC car by taking over the trainer port on my radio transmitter? How should I send the data?
>>
I'm trying to read pwm with an arduino. I've been able to get it to record the pulses, time them, and output the duration to serial for monitoring. But something is weird, because I get two values. If I'm sending a pulse with the value 1300, the arduino reports 1295 and 1304, one after the other. What might I be doing wrong? For the record, I get the same issue when I measure the pulses with pulseIn().
>>
>>1179425
Data should be encoded in a way that the car expects it to be encoded and on a frequency/channel that it is set to receive on
>>
>>1179874
That's my question. How should it be encoded?
>>
>>1179345
I fucked up my Pkmn Crystal with a Gameshark on GBC, they work.

I put a GS Ball in the balls pocket. Eventually I got THIS GAME PAK IS DESIGNED FOR USE WITH THE GAMEBOY COLOR ONLY.
>>
>>1179888
The way the car expects.
Can't you read?
>>
>>1179865
What clock speed?
Is 1300 in uS?

5/1300 = 0.4% error
Not that bad

According to this,
>https://arduino.stackexchange.com/questions/318/how-precise-is-the-timing-of-pulsein
The loop [pulsein()] has been determined to be 20 clock cycles long

If the clock is running at 16MHz you're going to have a max resolution of (1/16Mhz) *21 = 1.3uS
From pulsein():
>return clockCyclesToMicroseconds(width * 21 + 16);
//width = number of loops
//21 = clock cycles for one loop
//16 = clock cycles it takes to get to the loop

it also says
>There will be some error introduced by the interrupt handlers.

Look down on that page at the results someone got testing pulsein() with a 14uS pulse
>18,18,18,12,18,18,18,18,18,18,18,18,18,18,18,18,18,24,19...
If it's a regular signal, you could record several measurements and then average them together or check for the same result a certian number of times in a row.

I use a MSP430 and for more accuracy I'd look into using the timer and capture/compair configured to call an ISR on both edges. Not sure exactly how this translates to arduino but on that same page by the same poster,
>The most accurate method for capturing the timing of a PIN is use the INPUT CAPTURE FEATURE.

I don't know arduino so I hope this is relevent.
>>
>>1179933
That's 1300 in uS, yes. It's not a big error, but it's enough to throw me off. I'm running a motor, and because of this issue it constantly swaps between two states. I guess I'll just have it output the average of the last four values and average them out.

I'll look into how to use the INPUT capture, thank you. I think my interrupt method is the same you're doing with the ISR on both edges. Basically I have an interrupt listener waiting for the HIGH state, and that starts the timer and sets an interrupt listener for the LOW state. Then the low state interrupt stops the timer and saves the value. In the background my loop() function feeds the pwm value into my motor functions.
>>
>>1179888
Well unfortunately I don't have my crystal ball with me, post the make/model of the reciever and i would be happy to google a datasheet for you.
Alternatively someone who has even the slightest clue about RC cars could post some standard,I assume they all use the same one for compatibility..
My understanding is limited but i thought the only thing you can modify on RC stuff was swapping the crystal to change frequencies
>>
>>1179939
Whatcha making?
>>
>>1179939
AVR has actual hardware for that, similar to MSP430. You can avoid the error caused by the varying interrupt latency by using it.
>>
File: Ball_and_Plate_top.jpg (557KB, 1152x864px) Image search: [Google]
Ball_and_Plate_top.jpg
557KB, 1152x864px
Added a joystick for position control:
https://youtu.be/zaJpuwIdvSQ
>>
>>1180127
I'm just trying to control a robotic arm with an RC aircraft controller.
>>
>>1179259
pretty cool.
interfacing with old tech can be very rewarding.
>>
>>1175362
What PSU are you using to ramp up the voltage and power those nixies? Just mains voltage?
Also, what driver chips are you using? I assume they are high voltage transistor arrays?
>>
>>1175165
labview is a piece of shit software
>>
>>1176101
really cool anon
>>
>>1176101
What happens if you bring that on a bus?
Would it still work or does it need to be in a still point of reference?
>>
>>1181270
is this how you bully your robot?
he is making some cute sounds though
>>
So I have a cheapshit from China mega 2560 that isn't viewable when connected via usb. An led flashes regularly when it's powered, and from what I could find in the Internet it might be working but I have to redo/reflash the bootloader. Any idea how I would go about doing that? I'm in over my head.
>>
File: 20160807_122537.jpg (3MB, 4128x2322px) Image search: [Google]
20160807_122537.jpg
3MB, 4128x2322px
>>1182875
The PSU is it's own separate package. I need to get oscilloscope before I even attempt to make my own power supplies.

Using pic related to drive them.
>>
>>1183910

You need another Arduino or a separate AVRISP and burn the bootloader on it.
>>
>>1183917
>russian text
What the fuck?
>>
>>1184104
Because they were made by the Soviets. Some of the best Nixie drivers in existance, because the Russians were a few centuries behind in LCD and LED development they used Nixies a lot longer than we did.
http://www.tubehobby.com/show_det.php?det=34
>>
>>1184105
>Some of the best Nixie drivers in existance
Certainly they're easier to get than the 74141s, but do they have any technical advantages over them?
>>
>>1184141
>4141
>gets 4141

Checked. Not really. You can use them interchangeably.
>>
>>1184141
They're about equal. 74141 is also good drivers.
>>
is there any way to create programs for aduino using cmake nowadays? I've found some things on google, but no one worked
>>
>>1184291
if anyone is wondering, I've found this: http://docs.platformio.org/en/latest/ide/clion.html
>>
>>1183924
I tried with an Uno but no dice. Pretty sure the usb comm chip on the mega is toast. Oh well, I guess that's what I get buying cheapshit clones.
>>
>>1183910
are you powering it with the power plug?
my uno doesn't work if I use only the usb.
>>
>>1184322
i've read about something like that in the book exploring raspberry pi however it's not cmake: http://ed.am/dev/make/arduino-mk
>>
>>1184333
Not sure but on some arduinos you need to hold down reset when flashing. Before you throw it out give that a chance.
>>
>>1179345
NES has a lockout chip, gameboy does not. So no.

>>1179889
Pokemon Crystal *is* a gameboy color only game...
>>
>>1177551
lm386 is a (shitty) power amplifier for audio. Use a real opamp!
>>
>>1176495
>the book
What book? Mine never came with one.
>>
>>1184104
only place that you can get everything nixie. Soviets used them much longer than the states did which is why you can still get parts. Lucky for us that they used them, otherwise we'd be screwed.
>>
>>1184364
I tried it with the reset button held but get the same timeout error indicating that the bootloader failed to load as the mega is unresponsive. Thanks anyway though.
>>
>>1184333
You can order replacement chips on the cheap, I had one fail and I just ordered a couple replacements.
You should still be able to use the tx-rx through a separate usb serial adapter for the same functionality if it's the chip that failed.
>>
>>1183871
It does'nt matter if there's disturbance from the ground. So yes, this would work on a driving vehicle as long as the acceleration is not too high.
>>
>>1184717
Yeah for the time and effort required for me to try and replace smd chips I might as well just buy a new mega. I'm not really that well equipped, and they're like $12. It's not urgent anyway.
>>
>>1184336
I get the same symptoms if it's powered off the barrel or usb: the 'on' led lights up and the 'aref' led blinks but it isn't recognized at all over usb and I can't seem to reflash the boot loader. I think it's just shot.
>>
>>1174823
fucked the only temperature sensor that came in my arduino kit by wiring it in reverse doing the love o meter project. the book said the left pin of the flat side but i interpreted it the wrong way. i don't know why they'd only include one in the kit. idk what to do now. i'm kind of aimless, just drifting
>>
>>1184831
actually just realized my code was doing float x = y / 1024; instead of / 1024.0 so it was truncated down to 0 so it might not be completely fucked. but it got super hot. wml
>>
>>1184643
There's a starter kit that comes with a book with 14 little projects (i.e. love-o-meter project)
>>
File: schematic1.png (3KB, 382x302px) Image search: [Google]
schematic1.png
3KB, 382x302px
can someone explain to me why this needs the 10k ohm resistor followed by the ground connection? its purpose is to detect luminosity with the photoresistor
>>
File: Voodoo Labs GS.jpg (94KB, 750x539px) Image search: [Google]
Voodoo Labs GS.jpg
94KB, 750x539px
First time posting here, so please be gentle. I'm looking for an Arduino model to create something like pic related, a guitar switcher pedal. I'm thinking the Mega w/ ADK, since it has the most Analog IOs and it is advertised as working well with Android, of course.

What I want to do is plug in a bunch of pedals in loops that can then be selected with footswitches. Over time, I plan to add amp switchers, an LCD screen, and an Android app to program the switches via phone. Thanks!
>>
>>1184867
the wire coming out from the top what the fuck is it get rid of it?
5v into the LDR, LDR to 10Ko, 10k to GND.
LDR and 10K form whats known as a potential divider.
without the 10K if the LDR resistance went down to 0 the total resistance would be 0, the current would then be INFINITE! that would be bad fucking news.

the voltage at the point between the two resistors is proportional to the resistances, if the LDR has a huge resistance (>>> 10K) then there will be a very low voltage at the mid point, e.g. if its 40K there will be 1V at the mid point.
with a very low resistance there will be a high voltage between the two, e.g. 2.5K ( i think, check my maths lol!) the voltage will be 4v at the mid point.

any resistance you put on the midpoint will alter this so you put something with a very very high input impedance (trust me) like an opamp or some shit, or just a transistor is fine too but don't expect to use it as a power supply. a reference to a power supply perhaps!

you need to work out several things like
) what resistance range your LDR goes through in its operating environment.
) what voltage you want out
) what current you want through the system, depends on power source and wire size etc.

based on your drawing if the top line is supposed to be 0-2v then your wire between source and that junction must have a huge resistance, check out kirchoffs laws.

have fun!
>>
>>1184867
It's to limit the current through the photoresistor to 0.5 mA.
>>
>>1184893
i didn't come up with this circuit, it's part of an arduino design in the book. LDR is another term for photoresistor?
>>1184894
so electrons are flowing from the power source to ground, through those resistors, but are also going to the arduino input, so it can detect the current? i think i need to read up on some books on this stuff..
>>
>>1184867
I don't think that's drawn right.

Speculation:
The I/O appears to be connected to V+, it should go to the point where the 10K connects to the photoresistor.

The 10K & photoR form a voltage divider, and the Voltage at the I/O pin is the voltage across the 10K.
The formula for a voltage divider is V = R/Rt * Vapplied

If the PhotoR is 5K, the voltage is (2/3 * 5V), or HIGH.
if the photoR is 20K, the voltage is (1/3 * 5V) or LOW.

Another (less likely) Speculation:
It isn't connected to V+ and the internal pullup resistor is being used as part of the voltage divider, in which case the 10K puts it in the right range for light to vary the voltage between HIGH and LOW.
>>
File: schematic2.png (3KB, 640x400px) Image search: [Google]
schematic2.png
3KB, 640x400px
>>1184898
i just double checked and you're right it was messed up, this is the right version. so what's going on again?
>>
>>1184896
>so electrons are flowing from the power source to ground
No, but it doesn't matter.

https://en.wikipedia.org/wiki/Electric_current#Conventions
>>
>>1184905
i'm more confused than i've ever been in my life
>>
>>1184902
This part:
>The 10K & photoR form a voltage divider, and the Voltage at the I/O pin is the voltage across the 10K.
>The formula for a voltage divider is V = R/Rt * Vapplied

If the PhotoR is 5K, the voltage is (10K/15K) * 5V = (2/3 * 5V), or HIGH.
if the photoR is 20K, the voltage is (10K/30K) * 5V = (1/3 * 5V) or LOW.
>>
File: Ohm's Law.jpg (50KB, 495x476px) Image search: [Google]
Ohm's Law.jpg
50KB, 495x476px
>>1184896
>so it can detect the current
Current is detected by the effect it has on the 10K resistor. The effect is that a voltage is "dropped" across it.

You need Ohms law.
Voltage (V)= electrical pressure (similar to water pressure)
Current (I)= actual electron flow
Resistance (R)= opposition to electron flow.

How these 3 things are related is defined by ohms law.
V = I*R
which can be rearranged to:
I = V/R
or
R = V/I
>>
Never used Rapsberry. Is it worth it over Arduino? Can I program shit in Java for multithreading?
>>
>>1175309

Im kinda curious. Are you using some sort of PID controllers for the effect or just simple Fuzzy control?
>>
>>1184921
They're two different things. raspiss is very much like a PC, just with a different kind of CPU. Arduino is for running a single small program while not having to deal with a whole operating system. I'm pretty sure you can do Java whatever on a Pi.
>>
>>1184921
You are comparing apples to strawberry sorbet.

Raspberry is a computer with a few GPIO.
Arduino is a microcontroler with ADC, DAC, PWM, so on.

Raspberry has an OS that it loads from uSD (or other)
Arduino runs only the code you wrote, loaded from EEPROM

Raspberry needs 80-220 mA to run (depending on the model)
Arduino needs less then 20 mA to run

So basically you are asking "can I use my car instead of my bicycle?" Yes, of course. But not on the bike path, and you won't get any cardio by driving a car.
>>
>>1184928
>>1184927

Oh thats great. Its just that on Arduino you are limited to the loop so if you are using multiple sensors you can usually only get feedback in a cyclical fashion. If Pi is like a fucking mini computer then you are not limited to the C/C++ of Arduino and therefore you should be able to run multiple parallel routines.
>>
>>1184940
>therefore you should be able to run multiple parallel routines.
Yes.

But the Pi only has one core, so those routines aren't really running in parallel. The OS is switching between the 2 execution contexts for you. This means you can't predict the time between line A of your code being executed and line B. Real time is impossible on Linux, unless you are using rtlinux.
>>
>>1184945
OK, googling around I see that some Pi models have multiple cores. Context switching won't be as expensive BUT will still be unpredictable.
>>
>>1184945
Pi 3 has four cores?
>>
>>1184962
It will be pretty much the same as on the PC you're using now.
>>
>>1184940
>feedback in a cyclical fashion
lrn2 interrupts
>limited to C
wow you are fucking retarded C is as close to bare metal as you can get while avoiding asm
>multiple parallel routines
well you are technically not wrong i suppose, pi 3 has quad core cpu so you can certainly write parallel code if you desire but have a close look into the mutexes for IO before you go wanking your cock off too hard about multithreading with any kind of sensor.

raspi has ready to run operating environments with gcc packages, if you know enough linux you should be able to bootstrap yourself up to install any kind of shitty web3.0 framework abortion you would like. or java i guess if thats your bag.
>>
>>1184969
>wow you are fucking retarded C is as close to bare metal as you can get while avoiding asm
His problem is that C is to close to the metal. He wants Java.
>>
>>1184974
i don't understand how that means it's limited lol
>>
>>1184924
Two PID controllers, one for each direction (x/y).
>>
>>1184978

Two or more parallel controllers vs the same controllers acting sequentially you faggot.
>>
>>1175165

Labview is good for system models. It should be good if you implement the controller on Arduino and somehow connect it to your Labview model. Although this is only true when you work with large installation systems since you cant just test it directly. For homemade shit its not that useful.

Also most fags here are from /g/ (CS). They are not from ECE. They dont know what fucking Matlab is, let alone Labview.
>>
I have my brother an Arduino and two rolls of hockey tape and he still hasn't made anything cool :(
>>
>>1185509
>can't parallel in c
seems to me you are the faggot
>>
File: i-LVJ5vbX-L.jpg (96KB, 799x450px) Image search: [Google]
i-LVJ5vbX-L.jpg
96KB, 799x450px
>>1185517
>Labview
you mean LabVIEW

got back from NIWeek last week. Pretty cool.

I've dicked around with Arduino/LV before, kinda neat some of the stuff you can do with it... but as far as data acq. goes, it kinda sucks. Cheap, sure, but so is a 600x.

Also, there's a /diy/scord .gg/wkXE7x
>>
>>1185621
I have used labview a little and I don't get why it is so special. regular programming seems faster and easier.
>>
What is the best motor driver for DC?
>>
>>1187461
Really depends on what you're after.
LV is nice for measure-analyze-present stuff. Once you dive deeper into the structure of it, you can create some pretty powerful and efficient code.

For anything embedded, where every bit and byte needs to be optimized, use C instead.
>>
>>1187812
The one that fits your application.
>>
Anyone have any recommendations for some easy projects a kid might find fun and also teach fundamental concepts of electrical engineering? My 7 year old little sister (18 year difference, good job mom and dad) is showing interest in electronics and I'm trying to keep her interested and gives her a head start on learning.

I'm trying to keep things where she can visually piece together what's going on. So far we put together an automated irrigation system for a couple potted plants, just some moisture sensors and solenoid valves. The goal of that was teach conductivity, different voltage ratings on components and how to run them together and basic conditional statements.

We also made an H bridge and a servo that responds to a flex sensor or a pot.

Basically, anything with a tactile input with a intuitive result.

>>1175165
I have, kind of. I had to make a cathodic protection measurement system (measures voltage potential at various places through the water column) for a subsea pipeline. They insisted that I used Labview (because they already bought the license). I used the arduino to spoof RS485 telemetry data from a 3rd party during testing. I wanted to kill myself. Fuck labview, write your own GPIB drivers if you have to and just use python.
>>
>>1187461
>>1187918
In my opinion "graphical programming" is always an unwieldy, unmaintainable mess. No need to bother if you can do real programming.
>>
>>1175162

Can you tell me more about the math behind the x/y table ? how do you output a given x/y angle with 3 servo ?
>>
Just got into this autism about a month ago, right now have an arduino uno, a teensy 3.2 w/ octoshield, a fadecandy and an es2866. Anybody got any good ideas on what to do with them? I have a matrix running glediator on the teensy and thats pretty nifty. Trying https://github.com/scottlawsonbc/audio-reactive-led-strip next.
>>
>>1188392
Build an infinite mirror using the sound sensitive leds. Shit looks dope.
>>
File: ImmediateNewBergerpicard.webm (3MB, 1080x1920px) Image search: [Google]
ImmediateNewBergerpicard.webm
3MB, 1080x1920px
A silly & overcomplicated project, but it's going to be fun regardless. Putting some WS2812 LEDs & an Arduino Pro Mini in the back of my PocketCHIP, then triggering different colours/patterns by connecting a few GPIO pins on the CHIP to some digital pins on the Arduino. I know I could just use APA102, but where would be the fun in that?
>>
Im trying to make my own basic steering wheel with a UNO, but i dont know what encoder should i use, for starters i want it for American truck sim, later on when i aquire more experience ill try to add FFB
>>
I'm looking for a project for my bachelor thesis using arduino. I was thinking about some bluetooth controlled device or something. Does anyone have any recommendations/ideas ?
>>
>>1189205
In case you didn't know, you can replace the USB-to-serial firmware on the 16u2 on an UNO with a USB HID firmware so that it appears to the computer as a regular USB mouse/joystick/wheel/etc.

http://www.fourwalledcubicle.com/LUFA.php
>>
>>1189208
I get that part of making the UNO HID, what i dont know is what encoder to use to get the full range of motion of an actual steering wheel
>>
>>1189215
A normal car steering wheel has something like 450 degrees to either direction before hitting stop. An F1 car only has 180. Lorries do anything between 360 degrees and 1100. So, you know, it varies based on what type of steering wheel you want. Get a rotary encoder that has as many degrees total as you want (so for the F1 car, that's 360, or the normal car around 900), or get one with a different number of degrees and use gearing to get the total amount you want. Either way you'll want to build a mechanical stop yourself to make sure it's sturdy enough. What I'd do is have the wheel on a medium gear, a 360 degree encoder on a large gear, and fill in some teeth on the large gear to make a stop.
>>
Is there a way to electronically switch between two i2c buses? I have a radio in which the stock controller communicates with the tuner by i2c, but when i connect the arduino i want the arduino to take over and control the tuner, but i would need to disconnect the lines from the stock controller. Any simple way to do this? I would want to preserve operation of the stock controller as well, being able to choose between arduino and stock.
>>
>>1176101
would be great for sailing, great job
>>
>>1189243
Thanks mate.
>>1189206
What course?
>>1188321
Can you be more precise about it? What exactly don't you understand?
>>
>>1189367
(english isn't my first language so sorry for any mistakes)
I'm the thesis guy, I'm on a "process control" field. I'm starting to get into arduinos. I dont know if it would be a good idea to create a some sort of a robot / car. Possibly controlled by an app in a phone, looking for some ideas, guides, recommendations, etc.
>>
File: GPS_Pinout.png (331KB, 622x782px) Image search: [Google]
GPS_Pinout.png
331KB, 622x782px
Sorry if this doesn't belong here but I'm sure people in this thread know the answer and I didn't want to start a new thread for such a beginners question.

I want to solder a GPS module with the pinout shown in the attached pic to an rs232 socket. Question 1: Do I have to solder all Pins marked "Ground" (#3,8,12,19) to ground/ connect them to each other or is one connection (leaving the other pins unconnected) enough?

There are some pins that should be left "floating" if they are not being used (they trigger when being pulled to ground level). Does that mean I have to connect them to Vcc with something like a 10k resistor or can I leave the pin empty?

Thanks in advance.

Link to related component: https://cdn-shop.adafruit.com/datasheets/GlobalTop-FGPMMOPA6H-Datasheet-V0A.pdf
>>
File: woadude.jpg (212KB, 1280x960px) Image search: [Google]
woadude.jpg
212KB, 1280x960px
Fuck what am I even doing?

my arduino is browning out when trying to power this nema 17 stepper motor. i am fucking retarded plz send help.

I'm using usb to power it... but i bought a 12v 1amp wall plug for it..

Will that even work?
>>
>>1189404
>Do I have to solder all Pins marked "Ground" (#3,8,12,19) to ground/ connect them to each other or is one connection (leaving the other pins unconnected) enough?
Pull them all to ground.

>There are some pins that should be left "floating" if they are not being used (they trigger when being pulled to ground level). Does that mean I have to connect them to Vcc with something like a 10k resistor or can I leave the pin empty?
Pull them all high (Vcc) I don't know if the resistor is necessary. Spec sheet should say.

Only pins that say NC should be left floating. Anything else has to be pulled to ground or high, because a floating pin could randomly go close enough to high or to ground to trigger any logic associated with the pin.

This also applies to things like TTL or OP amp chips that have multiple gates/amps inside - all unused inputs should be pulled to ground so that the gate/amp isn't (potentially) flapping around.
>>
>>1189411
>my arduino is browning out when trying to power this nema 17 stepper motor.
Show us the circuit being used to control the stepper motor.
>>
>>1189411
What motor driver do you use? You mean you power the Nema with the 12v 1 amp power source, right? c ause steering the stepper directly with the arduino won't work (obviously)
>>
>>1189415
Thanks for the help.

SO but if the datasheet specifically says: " If not used, keep floating" (e.g. for an Output pin that pulses while the GPS doesn't have a 3D-fix) tehy do mean to leave it unconnected. or did I misunderstand you (English isn't my native tongue)
>>
>>1189421
>SO but if the datasheet specifically says: " If not used, keep floating"
Leave it unconnected (floating). Unused inputs need to be tied to 0v or 5v. Unused outputs should (generally) be left floating.
>>
>>1189423
Thanks again!
>>
When I set both engine pins on a L298N to HIGH and supply pwm to short out the engine leads to turn the hard brake on, does the bridge also short out the 12V to the ground?
Ie, will it consume power?
>>
>>1176101
Where did you get a small enough arduino that fits in the ball? Im guessing it has wireless power transfer?
>>
>>1189367
I don't understand how do you control a 2d motion with 3 servo.

If there was only two i would understand, one for the X axis and the other for the Y.

Here, if you want to move the table on the X axis only, the 3 servo must work together, what function do you use for that ?
>>
>>1189233
Get a mux or analog switch
>>
>>1190415
I'm pretty sure the ball is just a ball.
From one of his links:
>The ball location is obtained using a 4-wire resistive touch screen on which the ball rolls
So the table moves to position the ball, and it knows where the ball is by measuring the pressure on the table.
>>
>>1190969
Damn mate that's some first class autismo you got there, he was obviously joking
>>1190930
Yep you're right. I'm currently on a hike, i can send you a drawing for explanation or the part of the code when I'm back at home tonight.
>>
>>1190930
Pretty basic trigonometry. Each joint can rotate a certain amount of degrees and there is a set distance between each. What you do is write a function where the arm base is located at (0,0), and you then check if coordinate (x,y) is close enough to reach, basically, if sq(x^2+y^2) < (the sum length of your arm). You then use another function to determine how the base should rotate, and how much each (latitudinal) servo should be rotated to place the claw in those coordinates. It can be as simple as rotating all joint servos (total length)/((x,y) distance/90) and then rotating your base servo to the same angle as the direction of the target coordinate is.
>>
>>1191011
>>1191270
cant understand a single word, what do you call the arm base ? sorry literal math retard here
i think drawing would help !
>>
>>1174823
i don't really have any other ideas, so i want to just put some buttons and lights on my arduino to be able to run some scripts on my computer as basically hotkeys. i want to have a program running on my laptop and listening to the serial data from the arduino, is there an easy way to do this?
>>
File: $_58.jpg (27KB, 640x640px) Image search: [Google]
$_58.jpg
27KB, 640x640px
I have a project that is now powered by 3 of these suckers (pic related) one is 5v, one is 9v and one is 12v

I am a total novice, but surely there is a way to consolidate power supplies right? How can I learn to do this? I've tried googling but I don't seem to be finding a tutorial for this sort of situation and am not sure how to start
>>
>>1191287
https://www.slideshare.net/prasanthkmr/industrial-robotics-12296766 Here's a presentation that might help you understand the basics of a robot. Basically, what you want to do is split your task into smaller tasks. So instead of jumping straight to a program that does everything, you split it into functions, where one grabs the coordinates you need to move to, another calculates how the joints need to be aligned to reach it, and a third tells the joints to set themselves to those positions. Basically, you want it to be an assembly line, where instead of having one blacksmith who is an expert on every step along the way, you have a dozen workers each doing a small step.

Figuring out how to grab something with your arm might be difficult at first, but it's easier if you can turn the position of the item into a Cartesian coordinate. You just set your robot "base" (the joint that swings the arm around latitudinally) to the coordinate (0,0). So if your item to grab is at coordinate (3,9), you can use Pythagoras and sine/cosine/tangent (since the position of the arm and the object is a right angle triangle on a Cartesian grid) to calculate what angle your arm needs to be pointed in, and how far it needs to extend. Then you just feed the angle to the servo that rotates the whole arm, and the length to another function. This other function needs to calculate how much each servo needs to angle its joint for the arm to reach far enough. Those values can then be fed to the joint servos.
Ta-dah, now you have a program that you simply feed coordinates into, and your arm will automatically move to those positions.
>>
>>1191338

i have a bunch of 5V and 12V transformers coz that's the standard for old external hard disks. you can add a 9V regulator like the LM7809 to derive 9V from 12V.
>>
File: Nigger, cuck and illegal spik.jpg (81KB, 1200x800px) Image search: [Google]
Nigger, cuck and illegal spik.jpg
81KB, 1200x800px
>>1191338
Just use your highest voltage one and make voltage deviders out of pence lead to get the voltage for the other devices. .
>>
>>1191424
>Just use your highest voltage one and make voltage deviders

ignore this! it's retarded advice by someone who just learned about voltage dividers in high-school. problem is that dividers are unable to source any more than a few micro-amps before the calculated voltage drops precipitously because of loading.
>>
>>1191435
qft
>>1191338
whats the power drain of each application?
you can either use a voltage regulator (Lm78xx or equal) or some drop down module.
>>
File: DSC03472.jpg (204KB, 600x900px) Image search: [Google]
DSC03472.jpg
204KB, 600x900px
Just got an Adafruit Feather HUZZAH (ESP8266) plus an OLED shield, learning about MQTT & already got it displaying messages from subscribing to a topic I made using adafruit.io as the MQTT broker. I forgot how crisp OLEDs look in person!
>>
File: FKQQAAXHSRZJRXM.MEDIUM.jpg (52KB, 620x465px) Image search: [Google]
FKQQAAXHSRZJRXM.MEDIUM.jpg
52KB, 620x465px
I bought an arduino uno along with another kit from B&N a few months and didn't know what to do with them until I found out about piratebox. But it says I can only used with raspberry pi not arduino.

are there any alternatives to piratebox that use arduino instead?
>>
>>1191813
>look mommy i just connected two lego bricks together
>>
File: 20150918_154129.jpg (1MB, 2048x1536px) Image search: [Google]
20150918_154129.jpg
1MB, 2048x1536px
>>1191813
>>
>>1191818
Still probably more than you achieved this weekend, eh?
>>
>>1181270
I came
>>
>>1191822
he didn't finish the job tho
>>
>>1191816
>are there any alternatives to piratebox that use arduino instead?

a RasPi is a proper computer with a file system, several high-level languages for creating apps, a TCP/IP stack, Wifi, Ethernet, etc. an arduino is a glorified calculator. so, no.
>>
>>1174823
old news bruh get a raspberry
>>
>>1176404
Ditch the IDE and the Arduino library and you just have a dirt cheap dev board (the chink clones) for ATmega328P. Why the hate on dev boards? It's not like Arduino is the first one.
>>
File: explosion_v01.png (401KB, 2240x1368px) Image search: [Google]
explosion_v01.png
401KB, 2240x1368px
Someone mentioned circular trajectories:
https://youtu.be/YWOPlnb_8uI

Can anybody exlain how to upload youtube clips at higher resolution than 720p?
>>
I have a question about voltages. I have a 12V LED power strip which I plan to control with a wemos D1, which is supposedly rated for 12V. Is it safe to just split the power supply into two plugs and drive it off the same power supply? I would rather have just one cable hanging off my abomination.
>>
>>1192708
>LED power strip

I meant an RGB LED strip
>>
>>1192708

assuming the power supply has enough juice for both, and assuming you dont make any mistakes on the driver transistors which might inject 12V back into the CPU board, then a shared supply will work fine. however if you have a lot of lights you wanna multiplex, then the shared ground might present a challenge.
>>
Whats a good way to outdoor proof an arduino project? Caulk holes for wires?
>>
>>1192045
Different tools for different tasks.
>>
File: Newmar waterproof fitting.jpg (7KB, 400x183px) Image search: [Google]
Newmar waterproof fitting.jpg
7KB, 400x183px
>>1192768

you can find these online or at a local electrical supply store. they tighten a rubber ring around the wire to make it water-resistant.
>>
I recently bought an arduino and I need to get a soldering iron. What's the best iron to get? Can I just grab an iron at an ace hardware or is there a certain one that's solid and reputable?
>>
File: weller wp35.png (262KB, 800x408px) Image search: [Google]
weller wp35.png
262KB, 800x408px
>>1193023

never buy a soldering iron at a hardware store. you need to find a proper electronics store, or online. you can get 'em as cheap as $6 but if you want something that's fool-proof then you need a Weller, either a WP-25 or WP-35. the latter is 35W so it's better for heavier wiring duties, whereas the 25W is for PCBs. and you need 2 tips, a conical like the ST6 and a flat like the ST1. when you buy it, it will usually come with an ST1 or similar.
>>
File: adafruit trinket 5v.jpg (267KB, 970x728px) Image search: [Google]
adafruit trinket 5v.jpg
267KB, 970x728px
I have a project in mind that involves making a controller with four arcade buttons that output certain keyboard characters. I've never tried doing this sort of thing before, will this board be good enough for what I want to do or will I need a different one?
>>
File: 1480347069962.jpg (120KB, 487x834px) Image search: [Google]
1480347069962.jpg
120KB, 487x834px
>>1193537
like this
>>
>>1193537
>>1193570
A quick google says yes, it should be able to function as a keyboard/gamepad/HID.
I've done the same project and used an arduino micro for it, which can act as the same things. I'd consider the micro over that board simply because there's ridiculous amounts of support for amateur arduino work.
If you go with the micro I'd recommend this library (https://github.com/MHeironimus/ArduinoJoystickLibrary/tree/version-2.0), it lets it act as one or multiple gamepads at once, with customiseable button counts, etc.
>>
I'm planning on doing a project where I use an arduino to control a shutter that sits over the end of a fibre optic cable. Potentially controlled usibg a servo. Anyone done anything like this before? Looking for advice on what shutters would work well and/or any general advice for this application
>>
>>1184867
HILTON?
>>
File: ip-req.webm (1MB, 1280x720px) Image search: [Google]
ip-req.webm
1MB, 1280x720px
>>1174823
I connected mine to the internet quite some time ago
>>
File: IMG_1866.jpg (1MB, 3000x4000px) Image search: [Google]
IMG_1866.jpg
1MB, 3000x4000px
>>1193273
My first soldering iron was a some cheap weller. It only cost 15€ iirc. Was really nice to learn soldering, but 15W were not really comfy, so I upgraded to some cheap china 150€ digital solder station with 100W. Works fine until now.
I guess pretty much any cheap soldering iron will do it, if one wants to get into it.
>>
Hey I have an issue.

I'm getting sync issues with my chinese clone arduino uno AtMega328p when I'm using avrdude.
avrdude: Version 6.0.1, compiled on Oct 26 2013 at 00:26:01
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2009 Joerg Wunsch

System wide configuration file is "/etc/avrdude.conf"
User configuration file is "/home/faggot/.avrduderc"
User configuration file does not exist or is not a regular file, skipping

Using Port : /dev/ttyUSB0
Using Programmer : arduino
Overriding Baud Rate : 19200
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x80
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x98
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x80
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x1e
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x18
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x1e
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x98
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x1e
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x98

avrdude done. Thank you.


However, here's the weird thing, this works perfectly fine with the Arduino IDE and I cannot figure out the disconnect. I'm connecting my arduino with a USB cable to my laptop running ubuntu and there is nothing else on my breaboard, so I can't fucking figure out the issue.

Any advice?
>>
>>1194119
What is your baud rate set to for the IDE and the Arduino? Maybe try burning the bootloader again.
>>
File: 1497189327091.png (48KB, 336x280px) Image search: [Google]
1497189327091.png
48KB, 336x280px
What language do you use to program these?
>>
>>1194587
I use the Arduino IDE which use a variant of C++
>>
>>1194587
For the MSP430, I use C and an IDE based on eclipse (CCS). C++ can be used also.
>>
>>1191818
We all have to start somewhere.
>>1192045
See
>>1192776
>>
>>1174823
I want to get a little servo motor to push the button on my kettle. Gonna hook it up to a TI MSP430 or Arduino Uno, and a power source with a little mini breadboard, and cover it in plastic. Total NigRig.

What do I need to buy? Will any old cheap servo motor work?

I think a stepper motor will draw too much power.
>>
>>1194587
right now I'm using c++ with platformio and clion. pretty sweet.
>>
>>1191818
The whole world is lego.
>>
>>1194892
>>1194736
>>1194646
Do you have to use C++?
What are the options?
>>
>>1195002
You might want to check this out:
https://playground.arduino.cc/Main/DevelopmentTools

https://de.mathworks.com/help/supportpkg/arduino/examples/getting-started-with-arduino-hardware.html
>>
>>1177720
Xbee is unsuitable for your application. It will not have the required range. Outdoors it is probably limited to about 100m. CDMA could work, but there may not be good cell reception in the mountains.
>>
File: 1442523469012.gif (365KB, 400x328px) Image search: [Google]
1442523469012.gif
365KB, 400x328px
This may be a dumb question, but how do I address the analog only pins on a nano (A6 and A7)?

Basically, I've got a nano connected to 16 relays and some input switches. Later, I found this pdf explaining all the pin numbers and functuons, and it lists A6 and A7 ad analog only. Well, I need them to turn on to activate two relays, so I do an analogWrite of 255 to the pin, but the relay won't turn on. Am I just missing some simple step or nomenclature?
>>
>>1177720
What data are you looking for?
>>
>>1195002
There are visual programming languages, haven't tried them myself, when you learn c++ you tend to disregard visual programming

>>1195161
use shift registers
>>
>>1195161
also, I hope youre using amplifiers for those relays, if youre using an relay board it probably has built in amps
>>
>>1195161
>analogWrite of 255
This is for the PWM pins.
This might be the thing you're looking for:
PinMode(A6, OUTPUT);
DigitalWrite(A6, HIGH);
>>
>>1195238
Also, if you want to read analog signals later on you need to set pinmode back to INPUT
>>
How legal and safe is it to have a laser array setup so my friend and I can transfer files over long distances (2km) ?
>>
>>1195161
>>1195238
>>1195241
Checked the datasheet.
>PWM: 3, 5, 6, 9, 10, and 11. Provide 8-bit PWM output with the analogWrite() function.

>The Nano has 8 analog inputs, each of which provide 10 bits of resolution (i.e. 1024 different values). [...] Analog pins 6 and 7 cannot be used as digital pins. Additionally, some pins have specialized functionality.

So you won't be able to use A6/A7 as outputs to switch your relays.
>>
File: 1491233539278.gif (732KB, 207x207px) Image search: [Google]
1491233539278.gif
732KB, 207x207px
>>1195180
I actually designed my own board for pretty cheap. The arduino triggers an optoisolator that triggers a relay with 12v. Total of 16 relays. I just created the footprint for the nano in express pcb and ordered my 3 boards for $100.

>>1195238
As pointed out by >>1195260, this usually works but doesn't work for these two pins in particular.

>>1195260
Exactly. Problem is, I already had the boards populated before I figured this out. As a result, I had to sacrifice two of my analog inputs, turn them in to outputs, and run wires from plugs that were supposed to be for switches to connect them to the optoisolators. The deadline for this project is Monday, so I forced it to work for now, and I'll be more careful about how I select and assign pins in the future.

Thanks for the help everyone! I forced my way around it but did learn a lesson.
>>
>>1184940
> Its just that on Arduino you are limited to the loop so if you are using multiple sensors you can usually only get feedback in a cyclical fashion.
thats what interrupts are for
>>
File: IMG_20170619_113821.jpg (1MB, 3264x1840px) Image search: [Google]
IMG_20170619_113821.jpg
1MB, 3264x1840px
Have some stuff collecting dust and I finally want to use it.
Thinking about making a plug and play arcade emulator with a raspberry pi and an arduino for the controls.
Total beginner at this so I'll need to look up quite a lot of info before I get started on it.
>>
>>1174823
https://www.youtube.com/watch?v=J7iN1FEYsz8
>>
I want to use cheap chinaman arduino nano as a replacement for destroyed coffee machine control board. Is it's crystal precise enough to drive real time clock for months?
>>
>>1196264
>crystal
The one in your pic uses a ceramic resonator. Typical (initial) accuracy for ceramic resonators is 0.5%, meaning +/-7 minutes per day. They also age and have relatively high temperature coefficient.
>>
>>1196268
will one of these perform better?
>>
>>1196056
I think you may be able to do it better without the Arduino, using the pins on the raspiss?
>>
>>1196271

Not him but no it won't. Get an RTC module to go along with it for like $7 more.
>>
>>1196279
>>1196271
Just get an esp288 and use npt time.

You internet coffee machine now ^_^
>>
>>1196421
NTP is one of the few sensible reasons to connect household appliances to the internet.
>>
>>1174823
homemade battery that can power an arudino? thoughts?
>>
File: lemon-experiment.jpg (21KB, 572x347px) Image search: [Google]
lemon-experiment.jpg
21KB, 572x347px
>homemade battery that can power an arudino?

sure if you have enough lemons.
>>
>>1194119
Change your cable or your ftdi.
>>
>>1196264
No get an RTC as well if you give a fuck about the time.
>>
is there any way for me to be able to get mach 3 to run on an arduino or would I have to get a raspberry pi or do some retarded combination of both?
>>
>>1197446
Or you can go to your home depot to buy some sulfuric acid and lead. Just rust the lead, then submerge two plates of it in the acid. You now have a single cell of battery of the same type used in a car or forklift, all you need to do is charge it.
>>
Has anyone figured out how to control the arduino through a console application on your computer? I don't need to control mine, but I do need to just have some boolean values go back and forth through the serial port.
>>
Okay, so my plan was to flash Linux on my old ass tablet with allwinner A13 and connect to it via uart, since I broke USB. And I don't have uart converter, and I'm lazy af I used my uno r3 for it
Aaaand it won't encode good. I tried perhaps every fucking baud and nothing seems to work, only weird chars on output
Any advice?
>>
File: snes_pi.gif (3MB, 240x320px) Image search: [Google]
snes_pi.gif
3MB, 240x320px
>>1197815
I did a few things like this. Basically making a TASBot. (I know the video is a Pi but I've done with with the Arduino and ESP8266 as well.)

Just get yourself a decent MQTT client/server setup. I like to run mosquitto on a pi as a hub between my uC's and my laptop. I just use the PubSubClient for MQTT as it's worked well for me on the ESP's.
>>
>>1197815
Serial ports are normally writeable as ordinary files (e.g. /dev/ttyUSB0) only with some extra ioctls for setting the baud rate or whatever and some extra limitations. you can write to them just like "echo whatever > /dev/ttyUSB0" or from an application using the normal open and write operations.

This is assuming you're not running a shit OS of course.
>>
>>1197972
oh, so me running Windows has actually fucked me that bad?
Because I'm feeling that right now
I guess I can get a shit tier laptop and load Linux on it just to do this one thing.
>>
>>1197985
if you want to keep windows you could just do a linux livecd or boot from usb or something. Otherwise it's sort of unfortunate but linux is a lot easier to prototype on.
>>
>>1197985
>start
>powershell
[System.IO.Ports.SerialPort]::getportnames()
$port= new-Object System.IO.Ports.SerialPort COM#,Baudrate,None,8,one
$port.open()
$port.WriteLine("some string")
$port.ReadLine()
$port.Close()
>>
File: 1495124754734.jpg (60KB, 525x551px) Image search: [Google]
1495124754734.jpg
60KB, 525x551px
>>1197988
[code]$ echo "grave mongling" > /dev/ttyUSB0[/code]
>>
File: laughing.jpg (55KB, 600x602px) Image search: [Google]
laughing.jpg
55KB, 600x602px
>>1197991
>He doesn't set his baud rate or parity bits
>He doesn't use powershell functions
type com1:
type input > com1:
>>
>>1198007
>powershell
(You)
>>
>>1197988
I have absolutely no idea what that code is. Could that be used on Visual Studio? Because everything I've tried before cannot be used as it isn't recognized or something
>>
>>1198018
You can type that directly into powershell.

It would be something very similar in visual studio, but I couldn't tell you what module that code goes in.
>>
>>1197985

geez, you dont need no stinkin' linux just to talk thru the RS-232. you can run a number or terminal programs to interact with any RS-232 device in real time. you press a key and it sends that key to the 'duino. any text the 'duino sends is displayed on the screen. just like that movie War Games.

Hyperterminal used to come with windows XP, and you can import the files hypertrm.dll and hypertrm.exe from there into Windows 7 and run it. lots of other exist, look at https://en.wikipedia.org/wiki/List_of_terminal_emulators#Microsoft_Windows
>>
File: IMG_20170622_171845.jpg (146KB, 1281x720px) Image search: [Google]
IMG_20170622_171845.jpg
146KB, 1281x720px
The more I play with ESP8266 the neater it gets. Wish I'd moved on from Arduino earlier.
>>
>>1198131
How many interrupt pins can the ESP8266 handle? Can it output pwm?
>>
>>1198142
AFAIK any of pins 0-15 can be used for interrupt or PWM (if you're not using them for SCK/MOSI/MISO etc.). You only get 1x analog input though, at least on the breakouts I'm using.
>>
>>1198142
>>1198159
You can interrupt on any pin but only one works when u deep sleep. You can also Pwm on about 4 or 5 pins on the esp-12e.

Trick to this module is to use yield() wisely.
>>
What's a good babby's 1st arduino project and place for learning resources?

Probably a dumb question, but there's so much stuff out there that I just want to know what a good starting point is.
>>
>>1198420

arduino.cc is the bestest site for what you want.
>>
>>1198427
Wow, I should have probably checked the official site and official documents. I feel silly now. Thanks.
>>
In my program I have a series of eleven interrupts, each tied to a different sensor. One is located on the robot itself, and the other ten transmit over radio. They happen in order, and in a cycle, and when the last one happens it also changes a bool to true. When the bool is true, my loop executes an update function, which copies the values and then sets the flag back to false.

This works great 99% of the time, but the problem I have is that if I enter radio shadow (or any other interruption, I suppose), the ten radio interrupts don't get triggered for a few cycles. This means that the flag doesn't get set to true, and the robot freezes. This isn't normally a problem, but if the last sensor reading made the robot think, say, "drive forward and turn left", it will bog down.
The obvious solution is to move my update function to the first interrupt, but if I do that the first cycle of the robot will crash it as it doesn't actually have any values to work with. I don't suppose anyone here would happen to have a better solution? All I really need is some way to have my loop() only update the sensor values after each cycle, where a cycle is either all eleven interrupts, or just the first one.
>>
>>1199835
The basic rule of thumb with radios is that they are unreliable. If you want your robot to be reliable, you build the software under the assumption that any or all radios might have problems.
One way would be to update the robot state (drive direction etc.) periodically and when doing so, checking what sensor readings are current (so that you basically have one "ready" flag per sensor).
At the very minimum, you should have a watchdog preventing your robot from doing dumb shit when the radios aren't working.
>>
>>1199835
Maybe use 2 flags. One for the first interupt, one for the last.
If the first flag is set, wait a certian amount of time, then check for the other flag.

if (flag_onboard){

....wait(x);
....if (flag_radio) { //radio valid
........//do stuff
....}
....else{ //no radio
........//maybe use old values,wait, or do nothing
....}

flag_onboard=0; flag_radio=0;
}

Or, you could use a counter instead of bool. First interupt sets it to one, other interupts increment it.

if (counter >= 1){
....wait(x);
....if (counter < 11){
........//handle invalid radio
....}
....else{ //radio valid
........//do stuff
....}
}
>>
>>1199862

Why wouldn't he use 11 bits, one for each sensor. Clear the bit when you read new data, set the bit when new data is received.

The whole "cycle" thing depending on 10 radio transmissions is a mistake to me, unless every radio packet sends all 10 sensor states.

On the other hand, having to make decisions based on 11 unreliable sensors could be programming hell. Like that other guy said, start with failsafe code that doesn't screw up when no data is valid, and makes better decisions when more data is available.

Just out of curiosity, what are the 10 radio sensors telling you, OP?
>>
>>1199835
You shouldn't be doing loads of shit inside the interrupt. That's interrupting 101 you do what you need and you get the fuck out. The interrupt should copy data and set a flag.
Outside of the interrupt you check the flag, read the data, respond as appropriate. In a loop, forever. Nothing to do? Go to sleep until interrupt wakes you anyway
>>
File: 1012788.large.jpg (14KB, 431x260px) Image search: [Google]
1012788.large.jpg
14KB, 431x260px
I'm in the very early panning stages (i.e. something I want to do, but may never finish) of a machine that can make a perfect cup of tea. The idea is to have a large variety of loose leaf teas, have the machine measure out a custom blend of several types of tea, heat the water, put tea in the water, wait, and then strain it. Through repetitive experimentation (repetitive part is why an automated machine makes this project ideal) I'll be able to find the PERFECT cup of tea.

I've got an idea of how to handle all the tasks this machine will carry out except one is bugging me. How to accurately measure the quantity of tea being used? See, some tea is very fine powder, while other tea is like chopped parsly, and other tea is long and wirey, while other tea are large balls or pearls. I can't think of 1 automated volume measuring apprentice that'll work for all constancies of leaf. I could measure by weight, but I think that's overkill. Seeking any ideas.
>>
>>1199889
and I'll be using a 3d printed arduino driven robot arm for most of everything except maybe the measuring part.
>>
>>1199889
How consistent is tea leaf/dust? Because there would be little point doing repetitive experimentation if variability in the inputs render the results unreproducible.
>>
>>1199894
Large tea manufacturers are pretty consistent. There's changes from year to year due to weather and such which affect the quality of tea. Some sellers will hire tea tasters who add other tea to alter it and make it more consistent with last year's batch.

Of course even if it's inconsistent on a year by year basis, I buy 1 pound bags which can make hundreds of cups per bag.
>>
>>1199889
Like a perfect steak.

It's subjective.
>>
>>1199850
The radio I'm using is a remote control system for RC sailplanes. It supposedly has a range of 2km, and the range I'm using it over is a quarter of that at most, so 99.9% of the time the radio should be fairly reliable. This is that 0.1% of the time, and the lack of sensor input means that the robot, in my current program, just repeats the same thing it did before.
>>1199862
Thanks, I did a variation of this. I added an increment counter to the first interrupt. The last interrupt clears it, but if that doesn't happen and the first interrupt repeats, my loop starts an alternative cycle and goes into "wait mode". It works well enough.
>>1199879
I have a position system on two channels, which lets me give manual input if I need to get the robot out of a stuck. The other nine channels are sensor data from an Arduino transmitted over the radio I mentioned above. It's a remote control plane radio, so if it has a connection it outputs pwm on different pins in a cycle, and if it doesn't have a connection the receiver gives a "standby" signal where only the "throttle" pin transmits, a neutral pulse.
>>1199883
I know, that's what I'm doing. Each pin has two interrupts, one to start a timer and the second to copy the value of the timer into a volatile int. The last pin additionally sets a "bool pinsUpdated" to true, which my loop() looks for. When it reads that, it copies the volatile ints into safe ones, and starts doing logic. With my new system, loop() first looks for the "radioErrorIncrement" counter to be above 1, and if that happens it skips the normal logic and stops the robot.
>>
>>1175380
Sperg.
>>
>>1197952
Don't really understand why everyone dies mqtt.

Seems crazy to me. Besides ease of use coupled with terrible security what are the benifits?
>>
>>1181270
Very nice
>>
>>1200994
It's super lightweight, in terms of both the required codebase and the message overhead. MQTT messages can have as little as a 2 byte header, while UDP is 8 bytes.
>>
>>1175380
Wish I knew what I was looking at.
>>
>>1201463
silkscreen says nixie so i'd imagine its a nixie tube clock controller
>>
Does one use ASM to program one of these?
>>
>>1201568
C++
>>
>>1201568
you can use pure asm if you use AVR studio
arduino has all its libraries build on C/C++ though
>>
I kinda made a power bench and just strapped my arduino, relays and bread board to the side of it. I'll post some pics.
>>
File: IMG_20170629_191908_HDR.jpg (2MB, 3456x4608px) Image search: [Google]
IMG_20170629_191908_HDR.jpg
2MB, 3456x4608px
>>1201595
>>
File: IMG_20170629_191851_HDR.jpg (2MB, 4608x3456px) Image search: [Google]
IMG_20170629_191851_HDR.jpg
2MB, 4608x3456px
>>1201596
>>
>>1201596
>>1201597
>>1201595
can you make an instructable or give a walk through of how you did this?
>>
File: carl_pls.jpg (153KB, 445x565px) Image search: [Google]
carl_pls.jpg
153KB, 445x565px
>>1201713
Not mine but same idea really, then just attached electronics to side of it.: http://www.instructables.com/id/A-Simple-Bench-Variable-Power-Supply/

Only after I built it did I find out there are little board on ebay for like 7$ that just plug into the power supply and give you 12v, 3v and 5v.
>>
>>1201786

You and he did a nice job, but he should not call his variable. I suppose he is referring to the multiple voltages.

A variable power supply has a knob that you can turn. In his case, if the 5 volt line were variable you could turn it to 1.75 volts if you needed that.

Nice work though.
>>
File: 1493341327803.png (2MB, 1353x772px) Image search: [Google]
1493341327803.png
2MB, 1353x772px
>>1201788
Thanks m80.

I do have a question I wanted to ask /diy/. I got a ton of RC cars I wanna turn into a robot swarm. I already have the ROS software and one of the robots controlled using an arduino/Rasb-pi over serial port. But I need to figure out the cheapest way to get an arduino I can talk to wireless.

What would you guys recommend?
>>
>>1201790
>But I need to figure out the cheapest way to get an arduino I can talk to wireless.

It isn't cheap or easy, but an Android tablet can use bluetooth to communicate with an AVR. I have one set up like that on my desk at the moment. If you are interested, the code I started with is one of the android developers samples called bluetoothchat.

You can buy dirt cheap bluetooth modules for about $6; I'm using the Sparkfun one that was about $25 or so. The cheapest androids that have bluetooth were about $100 when I got mine.

Another approach is Xbee which I also have in my system. I'm using the high-power version which is about $40 and you need two of them. They make cheaper ones for shorter distances; they claim mine can communicate over several miles. My system is about 1/2 mile through dense trees and gets a bit weak when it's raining but works pretty well overall.

What I'm doing is monitoring the water level in a community well. My avr measures the depth, sends it to me via Xbee, my local AVR sends it to the tablet which then sends it to the internet as seen in pic related.
>>
>>1201790
>But I need to figure out the cheapest way to get an arduino I can talk to wireless.

Use an ESP8266 instead of an Arduino.
>>
>>1201790
>>1201821
For once it isn't just a shitty meme shill. ESP8266 on an adhoc network should work pretty well. Get a cheap android tablet to do the actual control work.
>>
lurking anon here, great thread, tons of useful information.
thanks.
>>
>>1201995
>ESP8266 on an adhoc network should work pretty well. Get a cheap android tablet to do the actual control work.

Dumb question sir: in this scenario, the ESP8266 and the tablet simply send wifi packets to a wifi router using local IP addresses, correct?

If so, this sounds awesome.
>>
>>1202257
Ad hoc means that there is no router. The ESP8266 send packets direct to the tablet, with the tablet functioning as the 'router'.
>>
File: unnamed (2).jpg (1MB, 3024x4032px) Image search: [Google]
unnamed (2).jpg
1MB, 3024x4032px
look goyim
>>
>>1202280

excellent. how do you handle addressing since he will be using multiple ESP8266 for his swarm, and even with just one, how would the tablet know the packet was for it?

sorry if this is a retarded question; I'm not knowledgeable about TCP/IP communications.
>>
>>1202307
In that case, you'd want a router
>>
>>1202307
>>1202312
As long as the tablet can act as an access point (most can these days), it will serve each of the ESP8266 with an IP address via DHCP. No need for a separate router, the tablet does all of that.
>>
File: 20151011_163235.jpg (1MB, 2048x1536px) Image search: [Google]
20151011_163235.jpg
1MB, 2048x1536px
>>1202304
>>1191822
>>
>>1202355
>As long as the tablet can act as an access point (most can these days), it will serve each of the ESP8266 with an IP address via DHCP. No need for a separate router, the tablet does all of that.

Thanks for the info. Amazing what you can do with a tablet compared to what they cost.
>>
File: boomPOWER.jpg (605KB, 1000x1000px) Image search: [Google]
boomPOWER.jpg
605KB, 1000x1000px
>>1202362
That's cool, are nixie's hard to get into? I was thinking about doing a Lixie clock.
https://hackaday.io/project/18633-lixie-an-led-alternative-to-the-nixie-tube

>>1201995
Thanks friendo, I think you just cut my project costs in half.
>>
File: 18vh1a.gif (2MB, 360x202px) Image search: [Google]
18vh1a.gif
2MB, 360x202px
>>1202871

Nixies take between 160-200V for excitation, but typically there are pre packaged power supplies that will convert 12V DC to a variable output between 150-220V DC. There are tons of designs for simple step up power supplies that you can make yourself, this was going to be my option but without an oscilloscope I didn't want to risk it. Also, you want to know some electrical engineering because it's easy to burn out a binary decimal convertor, or even your arduino if you don't use proper convention and wiring.

If you like the look of the old incandescent style lighting but want to stay in the 5V range check out numitrons. Slightly more expensive at about $3 a tube, but easy to work with. Pic related, numitrons with a nixie.
>>
File: 1473586390053.jpg (64KB, 500x400px) Image search: [Google]
1473586390053.jpg
64KB, 500x400px
>>1174823
>tfw total noob but really into learning
What are some projects with Arduino?
>>
>>1204792
Bluetooth enabled dragon dildo
>>
>>1195159
The Xbee Pro claims to be able to send data up to 15 miles? I'm just sending wav files and text files, why is the xbee not suited for it?

>>1195171
The data I'm currently have is a wav file from a microphone and GPS data from an adafruit ultimate GPS. The microphone circuit creates a wav file in hour long intervals, my GPS stores a text file with the longitude and latitude.

I'm currently stuck on how to use my Xbees to send data though @_@.
>>
>>1205452
>The Xbee Pro claims to be able to send data up to 15 miles?

I think that's under wildly optimum conditions with awesome antennas. I use Xbee Pros in a real-world environment and they easily connect over 1/4 mile through dense foliage even in heavy rain. I have Yagis from Pasadena that were about 20 or 30 dollars each; about a foot and a half long.

Since you cannot see one from the other, I had to guess a bit with the aiming, and once they worked I didn't fine tune any further. The Xbee has a cool feature where you can ask it what was the signal strength for the last packet.

Pic related is my Yagi from here http://www.wlanparts.com/antennas-900mh/900-mhz-yagi-antenna-10dbi/
>>
>>1177720
>Will the xbees not be able to communicate because of an obtrusion from the mountain?

Ok, I hadn't read this post yet. Xbee requires line-of-sight pretty much. When I try to go through a slight mound the signal suffers.

Since you will not want to be aiming an antenna all the time you might try this omnidirectional which also works well for me. I said "Pasadena" in my other post but they might not be using that name now.

The omni that works well for me is not on their site now, but it's about two feet long and could be mounted to stick out of the top of your backpack.

Mine was only about $30 or less; the ones they show on that website are larger and more expensive. Here's one for $101 that's 1.6 meters long. Fuck.
http://www.l-com.com/multimedia/datasheets/DS_HG908U-PRO.PDF

Why do you need anything back at the car? Save all the data locally to a huge external eeprom (I2C) or an sd-card. Or some of the newer AVRs have pretty huge internal EEPROMs.
>>
Currently reading up on a load of RFID stuff, I have a third year project in which I have to make an RFID reader.

Going to be using an Arduino YUN as base, need Linux so I can have some wi-fi uploading capabilities for the stored data.

Anyone have experience with this kind of thing/can recommend any good resources? I currently just have a ton of e-resources downloaded from my uni library account.
>>
File: 1492283177847.jpg (50KB, 748x541px) Image search: [Google]
1492283177847.jpg
50KB, 748x541px
>>1205484
The spacing on those elements looks all wonky to me. Is there a reason why the driven element is so close to the first parasitic and so far from the reflector?
>>
is there a way to turn the arduino off even if the usb is connected to it?
I want to have an arduino permanently connected to a computer through the usb cable, but I want to use an external switch to turn it on/off.
Thread posts: 293
Thread images: 61


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
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.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.