|
ol qwerty bastard posted:maybe i'll include an arduino and some blinking LEDs no, you need one arduino per fan, and an ethernet shield for each so that they can communicat with another arduino that blinks the LED
|
# ? Jul 3, 2014 19:04 |
|
|
# ? Apr 27, 2024 17:12 |
|
it'll automatically tweet the internal temperature of the car every 4 minutes too
|
# ? Jul 3, 2014 19:07 |
|
no you need a cell phone shield so you can dial up the other Arduino like it's an alarm system from 1977
|
# ? Jul 3, 2014 19:07 |
|
Bloody posted:arduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduinoarduino
|
# ? Jul 3, 2014 19:18 |
|
Sweevo posted:decade counter? that's it now i can use this 555 for something
|
# ? Jul 3, 2014 19:53 |
|
my arduino has allowed me to get into this stuff without having to do too much theory first. some would say that is lovely and I don't belong doing it. maybe that is correct but I LNOW that I have not only made blinking LEDs but also leds that fade in and out, and none of this triangle wave poo poo for amateurs but on a sine wave. it is cool fun ps what's te most efficient way to do that. I was using trig from a counter to get value. I mean it works fine but like a triangle wave is sunstaontlly more efficient to calculate, is there a quicker way to calc a sine wave?
|
# ? Jul 3, 2014 20:53 |
|
lookup table is pretty efficient i think
|
# ? Jul 3, 2014 20:59 |
|
shouldn't a fading led be done with pwm anyway? that's where an arduino would really shine, since building a continuously varying pwm circuit from discrete components would be annoying as rear end
|
# ? Jul 3, 2014 21:02 |
|
ol qwerty bastard posted:shouldn't a fading led be done with pwm anyway? yeah it was but the duty cycle was based off a sine wave Corla Plankun posted:lookup table is pretty efficient i think oh yeah... ill need to LOOKUP how to make one
|
# ? Jul 3, 2014 21:15 |
|
matlab -> sin(0:2*pi/256) -> copy-paste to array -> iterate through array w/ char
|
# ? Jul 3, 2014 21:49 |
|
if u want sin() the function then make a 360-element lut
|
# ? Jul 3, 2014 21:49 |
|
if ur doin a controls thing and you wanna approximate sin and cos for small changes in angle just approximate them as 0 and 1
|
# ? Jul 3, 2014 21:50 |
|
okay, ordered decade counter and components to build my own external timer circuit instead of doing it in the arduino. too many wires aaaag https://www.youtube.com/watch?v=0FOw4f1_AeU i'm cheating and padding the string with 4 spaces
|
# ? Jul 3, 2014 21:58 |
|
echinopsis posted:yeah it was you should be able to walk along parabolas and get plenty close for visual effect brightness = 50% slope = 10 loop: brightness > 50%? slope-- : slope++ brightness += slope wait might want to reset parameters at the 50% crossing to keep errors from accumulating but that's the idea
|
# ? Jul 3, 2014 22:53 |
|
posted about it before but anyone wanting to do things more complicated than blinking LEDs or w/e should look in to these http://www.cypress.com/?rID=78840&source=psoc a bit pricier than an arduino but leagues more functional. build in adc (12 and 20 bit), current and voltage dacs, op amps, counters, usb support, spi, i2c, serial, etc. components are added with an easy to use schematic format where you drag and drop them on to it. then you can code the functionality in C++, using their free IDE. the libraries for things like spi etc are included in the ide so you dont need to mess with them. you can pick up a full pinout one here for $75 http://freesoc.myshopify.com/products/freesoc-development-kit there's tons of examples in the ide, and each component has a pdf of the datasheet for that component with information on how it functions, as well as the API for it. you can download the ide (psoc creator 3.0) without purchasing a board to check out its capabilities.
|
# ? Jul 3, 2014 23:21 |
|
echinopsis posted:yeah it was its not like a complicated programming thing or anything, you just manually copy-paste the values into a vector and then use the vector instead of using a function
|
# ? Jul 3, 2014 23:22 |
|
wow u guys talk about this like its grade school poo poo I gotta do me some learning
|
# ? Jul 3, 2014 23:26 |
|
yeah my thing is that every new thing I code I have to go learn how to code it not just apply the concept to coding which I already understand. I know what a lookup table means but implementing one means learning [again] how to use an array shits simple in python but C makes you jump through hoops for everything still it's a good challenge. peace maybe I could use the Internet and wolfram alpha to get values?
|
# ? Jul 3, 2014 23:31 |
|
Stealth Like posted:posted about it before but anyone wanting to do things more complicated than blinking LEDs or w/e should look in to these http://www.cypress.com/?rID=78840&source=psoc cypress pee socks
|
# ? Jul 3, 2014 23:32 |
|
echinopsis posted:yeah my thing is that every new thing I code I have to go learn how to code it not just apply the concept to coding which I already understand. I know what a lookup table means but implementing one means learning [again] how to use an array unsigned char sin_lut[] = { 128,131,134,137,140,143,146,149,152,155,158,162,165,167,170,173,176,179,182,185,188, 190,193,196,198,201,203,206,208,211,213,215,218,220,222,224,226,228,230,232,234,235, 237,238,240,241,243,244,245,246,248,249,250,250,251,252,253,253,254,254,254,255,255, 255,255,255,255,255,254,254,254,253,253,252,251,250,250,249,248,246,245,244,243,241, 240,238,237,235,234,232,230,228,226,224,222,220,218,215,213,211,208,206,203,201,198, 196,193,190,188,185,182,179,176,173,170,167,165,162,158,155,152,149,146,143,140,137, 134,131,128,124,121,118,115,112,109,106,103,100,97,93,90,88,85,82,79,76,73,70,67,65, 62,59,57,54,52,49,47,44,42,40,37,35,33,31,29,27,25,23,21,20,18,17,15,14,12,11,10,9,7, 6,5,5,4,3,2,2,1,1,1,0,0,0,0,0,0,0,1,1,1,2,2,3,4,5,5,6,7,9,10,11,12,14,15,17,18,20,21, 23,25,27,29,31,33,35,37,40,42,44,47,49,52,54,57,59,62,65,67,70,73,76,79,82,85,88,90, 93,97,100,103,106,109,112,115,118,121,124}; here u go, this is my preferred flavor of sin lookup table. it's a full cycle of a wave centered at 127, 256 elements long so u can fart out a sine wave like: char i = 0; while(true) { dac_or_whatever = sin_lut[i++]; }
|
# ? Jul 3, 2014 23:39 |
|
I like my Arduino because atmel studio is a custom version of visual studio and visual studio is the best IDE ever made
|
# ? Jul 3, 2014 23:48 |
|
same except why i love every atmel product
|
# ? Jul 3, 2014 23:50 |
|
bloody that looks great. and easy. would u use a % so u didn't worry about out of bounda? also awful not letting me quote sorry. Thabks
|
# ? Jul 3, 2014 23:57 |
|
Stealth Like posted:posted about it before but anyone wanting to do things more complicated than blinking LEDs or w/e should look in to these http://www.cypress.com/?rID=78840&source=psoc paging Otto Skorzeny to this thread do not use cypress psocs echinopsis posted:bloody that looks great. and easy. would u use a % so u didn't worry about out of bounda? also awful not letting me quote sorry. Thabks nope if i is an unsigned char (uint8_t) it will automatically overflow back to zero after 255
|
# ? Jul 3, 2014 23:57 |
|
Arcsech posted:nope if i is an unsigned char (uint8_t) it will automatically overflow back to zero after 255 this is the beauty, this way if you're pumping it into a dac or w/e all your samples come out evenly spaced with no effort n poo poo
|
# ? Jul 3, 2014 23:59 |
|
the arduino (c) trig libraries literally do just load a LUT i think, with all the program space requirements and access times that impliesBloody posted:if u want sin() the function then make a 360-element lut yeah Captain Cool posted:don't do trig on a microprocessor, it's horribly expensive (ms of time if you're lucky and kb of library code) in my experience doing trig isn't "milliseconds" of time, but i was curious to know just how much longer it takes, so i tested it a is float, the others are ints, ran on a 16mhz atmega328 (i.e. an arduino) code:
size: 4012b (note, some of this is the floating point lib) code:
size: 2712b lollin' pretty nice output too, that's definitely close enough to a sine for led fading yeah i did once write myself a little graphing app to look at serial data and i gave it yospos colors. wanna fight about it Sagebrush fucked around with this message at 00:16 on Jul 4, 2014 |
# ? Jul 4, 2014 00:06 |
|
Bloody posted:here u go, this is my preferred flavor of sin lookup table. we have a winner! code:
size: 2616b and it's a true sine wave too
|
# ? Jul 4, 2014 00:15 |
|
Sagebrush posted:we have a winner! how much slower is it if you stuff that array in PROGMEM?
|
# ? Jul 4, 2014 00:18 |
|
Stealth Like posted:posted about it before but anyone wanting to do things more complicated than blinking LEDs or w/e should look in to these http://www.cypress.com/?rID=78840&source=psoc every atmega and attiny has 1-16 adc channels (10 bit yes), counters, spi, i2c and serial. a lot of the megas have usb support. dacs and op-amps are a little harder to find. the avr series is good for a hell of a lot more than just blinking leds and that's kind of the point. i've seen live fourier transforms being done on an 8mhz atmega while running pwm on several channels and keeping up various little side tasks (reading buttons, etc). psocs and arms and stuff are great but a single $3 mega can do a hell of a lot more than people give them credit for echinopsis posted:shits simple in python but C makes you jump through hoops for everything this is why python is a garbage first language to learn. bad habits. C is how computers REALLY work. (yes i imagine someone was saying this ca. 1980 about assembly)
|
# ? Jul 4, 2014 00:22 |
|
Sagebrush posted:the arduino (c) trig libraries literally do just load a LUT i think, with all the program space requirements and access times that implies quote:in my experience doing trig isn't "milliseconds" of time, also one of the first programs I worked on at this company had some half-second delays while spewing out data. I looked at the code and found all of that delay was in "pow(2,x)". this was a DOS program that ran on a desktop CPU
|
# ? Jul 4, 2014 00:29 |
|
i have a b&k 60mhz oscilloscope I paid 10 dollars for the college was selling how do I draw a dick on it with my Arduino
|
# ? Jul 4, 2014 00:31 |
|
Uncomfortable Gaze posted:how much slower is it if you stuff that array in PROGMEM? ooh good point. i knew there was something that bugged me about that method. yeah it wins for speed but that single table eats up 1/8 of the chip's total ram. ouch after sticking the array in progmem: code:
size: 2808b forums poster "uncomfortable gaze" is the new winner because the code is the same speed (within timer accuracy) but using 200B of program space is better than using 2Kbit of RAM! e: 2Kbit. drat that's a fat rear end table Sagebrush fucked around with this message at 00:52 on Jul 4, 2014 |
# ? Jul 4, 2014 00:34 |
|
sweet. i keep running into memory limits on a project, progmem would be nice but this is all buffered serial data so i can't use it. 2k is not much to work with :/
|
# ? Jul 4, 2014 00:49 |
|
well supposedly we're going to have multimillion bit memory devices by 1989
|
# ? Jul 4, 2014 00:52 |
|
how do u utilise progmem. it's way beyond me just curious
|
# ? Jul 4, 2014 00:59 |
|
cistps: put in the 12v feed for the network closet in the hallway NAS, router, AP, switch all run straight off of 12v.
|
# ? Jul 4, 2014 01:08 |
|
what would you do for power filtering, if anything, for DC devices all hooked up to a bus (on a bus)
|
# ? Jul 4, 2014 01:11 |
|
u include the library:code:
code:
and then you need the special access method to get them back out code:
it is like using an array, but not.
|
# ? Jul 4, 2014 01:12 |
|
there are progmem versions of the C string functions as well which you would need to use if you put them in progmem
|
# ? Jul 4, 2014 01:15 |
|
|
# ? Apr 27, 2024 17:12 |
|
EMILY BLUNTS posted:what would you do for power filtering, if anything, for DC devices all hooked up to a bus (on a bus) well, this is on the coach (not the starter motor) battery system. it is always connected to 440 AH of deep cycle batteries, which are pretty good at eating most spikes. The house charger is a brand new modern switching unit that puts out 60 amps of clean, regulated DC. The only time this sees alternator is when I flip the switch driving to charge the coach batteries off of the chassis system. and that will only be in motion, when everything's turned off if i wanted to do something though i'd probably do a multi tier system of ~20V zener for overvolt crowbar action and a big rear end hand wound choke on a head bolt or something, L-networked with as much cap as I could find.
|
# ? Jul 4, 2014 01:16 |