[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
Arduino
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /g/ - Technology

Thread replies: 66
Thread images: 6
Sup /g/,

Any Arduinofags here? What do you do with it besides mess around with it?

I'm wanting to get a knockoff Arduino starter kit. Mainly for learning assembly, and embedded C programming.

I'm leaning towards getting the Mega because it has 256k vs 16k of flash storage. What sensor modules are neat to play with?

I want to make a play pretend hardware accelerator for huffman encoding compression.
>>
File: wind_in_face2.jpg (15 KB, 260x260) Image search: [Google]
wind_in_face2.jpg
15 KB, 260x260
>>55385042
I think you're too smart for this board. Most of us just learned Python from tutorials on the web and think we're hot shit for knowing a few bash commands.
>>
>>55385042
Arduino uses arduino code, this is not what you're looking for.

Get a TI Launchpad if you want to learn assembly and embedded C.

However, if you're not comfortable at all using microcontrollers than yeah you can start with an arduino until you're comfortable enough to use a TI launchpad
>>
>>55386672
Wait, really? Why did they make Arduino with its own instructions set? That sounds like a really bad idea.
>>
>>55386680
>brand lock-in is a really bad idea for a business
Teaching people how to work on generic hardware is how you get them to buy generic hardware.
>>
>>55386642
That's literally what a programmer is
>>
>>55386698
Nobody is going to buy Arduinos for anything but educational purposes and farfetched experiments.
>>
>>55386716
Agree, arduinos are for shits and giggles. I wouldn't use it outside my personal hobbies.
>>
>>55386732
Yeah but they'd be more useful for shits and giggles if people could apply their existing knowledge of embedded development on AMD/ARM/x86 computers for embedded development on Arduino.

I'm just disappointed.
>>
>>55386680
>>55386672

No, Arduino has it's own IDE and libraries that can be used instead of standard embedded C/Assembly. Basically the "custom" stuff is the USB bootloader on the controller.

You can just as easily use Eclipse or Atmel Studio using an Arduino if you wanted assuming you configure your settings correctly. This gives you full control of whatever microcontroller is on the Arduino you purchased (save wherever the bootloader is on the controller, don't wanna blow that away...)

Usually 8/16/32 bit microcontrollers from various manufacturers have different assembly instruction sets (ARM/Atmel/Microchip..etc) and different C/C++ compilers but more or less follow the same format.

There's a ton of development hardware out there, buy whatever fits your fancy and you can attach the most peripherals to and get to dicking around. :)
>>
>>55386786
i c

I wish I knew shit about embedded develpment. It sounds fun but I figure it's also extremely tedious and probably best done by a special kind of autist.
>>
>>55386786
I'm so glad back in my high school my robotics teacher wasn't an idiot and actually taught us to set up development boards from scratch using atmega16s. He even taught everyone how to make board using Altium and we coded in CodevisionAVR.

Nowadays every high school teacher buys a ton of arduinos and thinks they've set up the hottest hackerspace in town
>>
>>55386811

It's no more tedious than normal programming. Honestly the hardest part about embedded development/design is reading through the microcontroller's datasheet and setting up peripheral registers so they do what you want them to do. A lot of the rest of the difficulty comes from knowing how to interface with other hardware (communication protocols, timing...etc) and what things are safe to do and what things are not safe to do.

Another thing to be mindful of is that there is very little hand holding in an embedded environment. If you're using assembly there is absolutely no hand holding, and if you're using C chances are just as likely that your compiler will screw you over as much as help you.

Getting past that though, it's a great way put yourself past software engineers who specialize in Java or the like. Most of the time they have had their hand held for so long by compilers and frameworks they don't know what they're doing.

Good luck!
>>
>>55386880

I think there are two different purposes. One is to teach kids about programming (logic...etc) and one is to teach kids about electronics.

Honestly I don't think kids are very interested in electronics, but are interested in programming due to the money (or promise of money). Too bad these people are going to be entering a very competitive job market and would probably lead just as good of a life by going into a trade.

In the end it'll be very difficult in the coming 10-20 years to find electrical/electronics engineers in the United States since there are very few people majoring in it. Also, the guys who are filling up the industry are reaching retirement age here soon which is going to cause a shortage. I'd say it's a good field to get into now.
>>
>>55386957
Exactly. That's what I thought when I switched from CS to EE early on in my studies. I feel like my high school class really opened my eyes into the industry and I'm glad my teacher didn't push the whole "just code" narrative. He actually taught us a lot about electronics and how the whole embedded development process comes together.

Nowadays I do CS internship at JPL, but I envy the ones working on the FPGAs. They have cooler tasks
>>
>>55385042
If you want to learn embedded C programming and assembly, you're barking up the wrong tree.

I use mine mainly for ham radio related shit. Temperature controls, antenna analysis and such. Nothing too fancy or exciting, but it's a fun hobby.
>>
>>55385042

Goddamn, all my NEETpennies are going to Chinese reject microcontrollers
>>
>>55386957
Really? I thought everyone out there were studying that shit.
>>
>>55386985

FPGAs are pretty interesting in their own regard but unfortunately are too expensive to be used in a lot of real world applications today (save a few like drones, refrigerators..etc). Most things using microcontrollers are using something that costs between $1 and $4 per unit in bulk.

Personally I think FPGAs would be much more widely used if the cost were a bit cheaper. I think that'll be at least 10 years out however.

>>55386991

Read the other posts in the thread. An Arduino is just as good as any other development board for learning C/Assembly. In fact it is probably one of the better ones due to the variety of "shields" that are around. Just don't use the Ardunio IDE/Libraries and you'll be fine.
>>
>>55387044

It's less common in the US than it is abroad. India for example has a lot of people studying Electrical Engineering. Unfortunately the culture in their country promotes cheating on exams which leads to them producing the most retarded engineers imaginable. Yay for H1B visas.

Honestly the last few places I've worked (midwest US) have struggled to find anyone to apply for entry level Electrical Engineering positions in various industries. A lot of them are forced to go through recruiting agencies since they can't go searching for people themselves all day. You don't even want to know how much money there is in contracting companies that staff engineers...

That being said, Software Engineering, Computer Science, and Computer Engineering all are gaining in popularity. Unfortunately the general education tracks for these fields do not have the skills necessary to properly design embedded systems from the ground up.
>>
>>55387085
I could comprehend. Here, Mechatronics is far more popular than Electronics. Last semester, my college had to lower test's standards for EE just because no one wanted it. I'm studying Electromechanical, but almost everything for Control uses Electronics now.
>>
What reading/tutorials/boards (IE arduino/RPi) would /g/ recommend for someone wanting to start getting into EE? Basic projects to for fun?

Seems like /g/ is a huge programming board, and that's cool and all (not a problem) but I think EE gets woefully overlooked here.
>>
>>55387563

Two of my three favorite ECE professors, Dr. Brian Evans and Dr. Jon Valvano post a _LOT_ of their class material to YouTube and their university websites.

Dr. Valvano http://users.ece.utexas.edu/~valvano/

Dr. Evans
http://users.ece.utexas.edu/~bevans/

Dr. Valvano's site is a nightmare to navigate, so I'll just give you the important link. This link has nigh-on the entirety of the course material for EE319k, Introduction to Microcontrollers.
http://users.ece.utexas.edu/~valvano/Volume1/

Also keep an eye here:
https://www.edx.org/course/embedded-systems-shape-world-utaustinx-ut-6-03x

Every year Valvano runs an online version of EE319k for free from edx, it's already over for this year though.
>>
So wait, there was some unclear information ITT:

Arduino: can you write embedded C/assembly on it by default or is it better to go for the TI Launchpad?
>>
Basic uses of arduinos are input-output devices.
IE; sensors and motors.
Like you could have a hydration sensor in some soil and have the arduino move a motor to let water out from a hose.
As a simple example, but it could have much more complex responses to sensor input- like only hydrate if the temperature is high enough, if it's the right time of day, if the pH is within a certain range or whatever
>>
>>55388649
but what about the TI Launchpad?

would i be able to do basic math involving factors of smallish prime numbers, or traversing binary trees on either board? i know it's not exactly the intended purpose, but you know, it's what i wanna do.
>>
>>55388590
>>55387688 (me)

I will always argue for the superiority of TI's dev platform, if only because of Energia, but here's the information I have.

Arduino is really mismanaged as a brand, in my opinion, because it comprises four, in my opinion completely different products. The Hardware, the bootloader, the IDE, and the libraries. Your question relates to the libraries.

Make no mistake, the "Arduino Language" is in reality just a set of C++ (yes, C++) libraries adapted for whatever microcontroller you're trying to program at the time.

You can indeed write real C++ into the Arduino IDE and have it compile and flash onto Arduino hardware. Here's even a video of one Kevin Darrah (Look into his channel, he's awesome, even if he's a bit of an Arduinosperg) doing exactly that. https://www.youtube.com/watch?v=B4bsPDFBJhA

However, the libraries can cause problems once you start digging deeper. I don't expect you to understand this, but for example, if you realize you need to use both hardware timers, then fuck you, one of them is being used to make sure millis() works.
>>
>>55388724 (me)
>>55388590
Now, referring to "the" TI Launchpad, that's also a bit of a misnomer. There is no "the" when it comes to the TI Launchpad brand. Though I will admit that two of the Launchpads really stand out as standard bearers for the brand: The MSP430G2 and the TM4C123GXL.

http://www.ti.com/ww/en/launchpad/launchpads-connected-ek-tm4c123gxl.html
http://www.ti.com/ww/en/launchpad/launchpads-msp430-msp-exp430g2.html

I'm very partial to the MSP430 personally. The reason I argue for their superiority is many and varied, but the core of the argument is:

1) Energia exists, which is a fork of the Arduino IDE and libraries, which makes using a Launchpad nearly indistinguishable from using an Arduino. It's a bit of an ugly red color compared to Arduino's cool blue, but you can get used to that.

2) Real ICSP hardware exists on board, meaning once you want to move away from the Arduino way of doing things into real embedded development, you don't need to buy new hardware, you just go download Code Composer instead of Energia.
>>
>>55388771
ah i gotcha. well, i just spent like 5 hours updating my aliexpress cart with arduino stuff ,but it looks like i'm gonna be spending another 5 switching it out for Launchpad stuff.

another thing i noticed is the Launchpad MSP430 has the same specs as the arduino mega, but in a smaller form factor, and besides, you're actually programming the microcontroller, which can be removed and placed in another embedded circuit, instead of just leaving it on the development board like arduino seems to want you to do
>>
>>55388666
>>55388771 (me)

>would i be able to do basic math involving factors of smallish prime numbers, or traversing binary trees on either board? i know it's not exactly the intended purpose, but you know, it's what i wanna do.

The TM4C is using a hardware architecture that does in fact include hardware to do floating point math, not that you couldn't do it on other microcontrollers, but eh, that's a discussion for another time. So you can do minor digital signal processing on the TM4C.

Keep in mind that "resource constrained" is the name of the game in embedded. The TM4C123G Launchpad, for example:

80MHz
256KB Flash
32KB RAM
2-KB EEPROM

You don't even get a single megabyte of storage space. Now, you COULD go the route of buying an external storage chip like an EEPROM, or even use an SD Card. In fact that's actually a pretty workable solution.

Keep in mind the specs I listed were for the TM4C, the ATMega 328p (Arduino Uno) likely has even less if I could be arsed to look those specs up.
>>
>>55388844
>>55388848 (me)
DO NOT BUY TI HARDWARE FROM ALIEXPRESS
>>
>>55388771
>an ugly red color compared to Arduino's cool blue
the first computer i assembled had a motherboard that was a badass red, so a e s t h e t i c s aren't much of an issue for me lol
>>
>>55388848
>does in fact include hardware to do floating point math
awesome, float is good enough for my purposes, i realize i'm not going to design commercial-grade encryption on this thing.

i heard the arduino can also do floating point too, but that doubles are out

80MHz
256KB Flash
32KB RAM
2-KB EEPROM

>You don't even get a single megabyte of storage space.
i mean, this is kind of the draw for me haha
>>
>>55388868
To explain where I'm coming from.

TI is, weirdly, the one company that for whatever reason when the Chinese release clone or surplus hardware on aliexpress/ebay/banggood/wherever the fuck, price goes UP rather than DOWN.

As for why this is, most people assume this is because TI sells Launchpad hardware at a loss, to get you into using their silicon.

When buying Launchpad hardware, look on Mouser, Digikey, or Farnell.

>>55388844
>the Launchpad MSP430 has the same specs as the arduino mega, but in a smaller form factor
...that sounds like bullshit, but hey, let me verify...

ATMega2560
Flash 256k bytes (program storage)
SRAM 8k bytes
EEPROM 4k bytes

MSP430G2553
16kB Flash (Program Storage)
512B RAM (Yes, five hundred twelve bytes, not kilobytes)
No EEPROM

So yeah, that's wholly untrue. I hate the Arduino, but I'm not here to spout mistruths.
>>
As someone with a bunch of Arduino-compatible sensors, can I buy a Launchpad MSP430 and hook them up to it?
>>
>>55388957
can you post a picture of your launchpad setup?
>>
File: IMG_20150402_015450.jpg (2 MB, 3264x1836) Image search: [Google]
IMG_20150402_015450.jpg
2 MB, 3264x1836
>>55388988
This is where it gets a little complicated.

The short answer is "yes, but there may possibly be warts"

The long answer inovlves understanding the difference between 5V and 3.3V logic and power.

I'm willing to bet some 99% of your sensor hardware will be compatible with both 5V and 3.3V power and logic. Silicon vendors are getting much better about that.

The other 1% can still be done, but must be converted. You can ALWAYS _find_ a way to connect one piece of silicon to another, but it's the question of whether you want to or not.

Luckily Adafruit puts out a product that makes 5V to 3.3V conversion quite easy, even if it's marked up like fuck.

https://www.adafruit.com/products/757

>>55389002
I recently moved, and I'm still working on improving my home lab, but when I want to pretend I'm in a battlestation thread I dig out my devboards and put them on display like pic related.
>>
>>55388988
Probably yes, use Energia (arduino IDE clone) if you want to use standard libraries, CodeComposer for ASM/C stuff.

>MSP430
Get MSP432, 32-bit and has hardware FPU.
>>
File: IMG_20160606_154829.jpg (476 KB, 2048x1536) Image search: [Google]
IMG_20160606_154829.jpg
476 KB, 2048x1536
>>55389057
This is what my desk looks like in reality most of the time up close, though taken last week.
>>
File: 1467085719700.png (16 KB, 327x192) Image search: [Google]
1467085719700.png
16 KB, 327x192
>>55386775
>disappointed
>dick head mentality engage

Help use fix shit or get out of the way.
>>
I need useful/challenging project ideas, what do.
>>
File: IMG_20160606_174834.jpg (427 KB, 2048x1536) Image search: [Google]
IMG_20160606_174834.jpg
427 KB, 2048x1536
>>55389092
...and from a distance

I only got my current job in May after being severely underemployed for like a year, and had to emergency move to Illinois from Texas into an unfurnished apartment. Finances are starting to stable out, so turning my meagre picnic table setup into a proper home lab and battlestation starts this month.
>>
>>55389057
>I'm willing to bet some 99% of your sensor hardware will be compatible with both 5V and 3.3V power and logic.
you'd be right about that, most stuff will operate at those voltages, according to the specs.

is it just a matter of setting them (somehow) to work at that voltage or is it plug and play, and it basically operates on the voltage supplied to it?
>>
>>55389218
If your sensor datasheets state that they are compatible with 3.3V logic, then it's plug and play GO FOR IT.
>>
>>55389236
fuck yeah, bro

I'm never buying SMD again though
>>
>>55389264
>I'm never buying SMD again though

You say that now, but if you keep it up, in a year's time you'll be google searching all the projects where people hacked and converted some $20 toaster oven from goodwill into a reflow station, going, "...I could do that!"
>>
>>55389126
so is your new job in the embedded sector?
>>
>>55389545
Unfortunately no, job market is fucking awful. Everything is getting either outsourced to pajeets or the old greybeards aren't retiring. I'm in tech support for security services company. I am making pretty good money though, considering I used to come from a family living off welfare. So I can't complain that much.

Make no mistake, I am maintaining my skillset and working on projects to fill my resume to get out.

Don't get into this stuff under the idea you'll make bigbucks down the road magically and with no effort.

I put it this way. I have this weird tendency of people coming to me for career advice, especially artists for some fucking reason, and I've settled on a single piece of advice, "Never go into something for the money. In fact, do the opposite. Find a field that you would be willing to fucking starve and go homeless in order to do."

So people say that when I'm some grunt working in managed security services, I get told "Guess you got the wrong education!" No, no I didn't, because this is what I want to do 100%, and I am indeed willing to starve for it.
>>
>>55389607
>So people say that when I'm some grunt working in managed security services, I get told "Guess you got the wrong education!" No, no I didn't, because this is what I want to do 100%, and I am indeed willing to starve for it.

i feel the same way bro. i guess people like us who come from the rougher upbringings figure out what we wanna do earlier.
>>
>>55389664
The unfortunate part really about all this is that my #1 priority when looking for employment has always been security. I'm looking to make sure my employment lasts longer than six months. That's ultimately I think the big thing that won't get fulfilled. I hate startup culture, but I think the best thing eventually will be to go freelance once I get my home lab set up.

I promised the person who helped me get my current job I'd stay here at least a year, and if I'm not in the company's engineering department by then, I'd start putting my resume out. Then, after six more months, if I haven't found anything, I'm leaving to start doing freelance engineering design.
>>
>>55389057
if you're still around, how do you feel that 432 compares to the 430? 32bit floating point is enticing
>>
There is a makefile out there to program C to arduinos without use of the IDE. Just graduated with a BS in Computer/Electrical Engineering. For our senior projects, CE's were not allowed to use arduinos at all unless you had something else doing other work as well. For example, I made a guitar pedal that produces various effects using DSP and is controlled via Bluetooth. I used an STM32F4 for the DSP and an arduinos to route the signal through the project and deal with the Bluetooth. I was told not to accept anything less than 67k USD upon getting a job. Money is there, difficulty is there, but the enjoyment is too.
>>
>>55385042
im using one to make a muscle stimulator

and maybe something to send electric shocks to my dick
>>
>>55391423
The MSP432 has me concerned.

The board I'm sure is fine, but I look up part names just to get the chip, and NONE of the distributors have access to the chip.

If I want to make a product to sell using an MSP432, aka want to design my own board, I actually physically cannot.

The MSP432 Launchpad has been available for...what two years now? Why can I still not buy the actual silicon?
>>
ITT: people who know how to speak computer code, but dont know jackshit about arduino.

Arduinos are wonderful for I/O systems, but are very slow. The mega is an 8 bit, 16MHz processor. if you want something faster than that, the Teensy 3.2, while not officially arduino, has a 32 bit, 76MHz processor and is codable on the Arduino IDE.

The Arduino IDE is based of of highly abstracted C. Its in the same class as MATLAB or scratch; its coding for non-programmers.

If you want to learn more real programming, the Raspberry Pi 3, which is 35 bucks (or 5 if you get the Zero). it blows literal cocks for I/O and sensors, but its got a 1.2 GHz processor, and runs linux.

Above that is the Beaglebone Black, which has a huge amount of I/O, that rivals the Arduino mega, runs linux, and is 60 bucks, 1 GHz.

They all have their own specific purposes, but if you actually want to learn hardcore electronics and embedded systems, I would skip over arduino.
>>
>>55394449
>Beaglebone Black
>$60

This is where I jump in and mention the BeagleBone Green. A machine properly made for servers.

Removes the HDMI in favor of some weird "Grove" connectors from Seeed, but that's not the part that matters. What matters is that it's also like $15 cheaper coming down to $45.

There's also a BBGv2, which adds Bluetooth and Wifi directly to the board, for I THINK the same price.

>Arduino is Highly Abstracted C
>its coding for non-programmers
1) Because I am that asshole who will argue semantics, it's highly abstracted C++, actually.
2) At my university, where there is a rivalry between CS and ECE, one of my friends recently said, "It's the embedded platform for CS majors."
>>
>>55394449
Can agree with this guy on arduinos being slow. The amount of overhead with its god awful. If you don't mind writing the digital write/read functions yourself and/or the analog ones, you can speed up that functionality by at times over 50%.

Also good to note that while the ADCs are just okay, your DAC is not a true DAC, but pwm. It is also not strong enough to do much DSP at all. For control systems, they're pretty nice. Their usefulness completely depends on your task for them.

For pis, the I/O isn't terrible if you don't mind writing your own kernel modules to do that functionality. They work great for mini web servers, monitoring temperature and stuff using i2c temp sensors, and stuff like that. I wouldn't control a motor with it due to the overhead of an OS.

Love,
>>55391876
>>
>>55386957
masturbating furiously to this post, bsee clutched in other hand
>>
>>55395611
>your DAC is not a true DAC, but pwm

Ehhhhhh just slap a capacitor on there and increase the resolution of your duty cycle it'll be fiiiiiiiiiiiiine.
>>
>>55395789
Anon, I think you just figured out the secret to making JBiebs sound less shitty.
>>
>>55396410
Rolling pin, capacitor, it all smoothes shit out the same way.
>>
>>55395611
the ATMega2560 has hardware support for "fast AES and DES" though
>>
>>55386672
Arduino uses C. it just has proprietary libraries. Kill yourself.
>>
>>55398789
Not that anon, but its C with classes.
>>
>>55385042
I've used it just for playing around, though I once made a super ghetto set up to open a door for me automatically. Have also been thinking about building a midi controller
>>
I had an arduino class recently and fuck I hated the thing.
Thread replies: 66
Thread images: 6

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

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.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.