timemagexxoxx, it can be. if you don't need it initalized on each call you can make it static, in which case it behaves a bit like a global variable in terms of life span, but scoped to your isr.
drewmuttYou'd still want to make it "volatile" no?
timemagedrewmutt, if it's a static local, nah. volatile will only slow it down.
drewmuttOh sorry, didn't see the local bit :P
axlebHEY HEY!
axlebhavent been here in FOREVER !
axlebwhats GOING ON ?>??
axlebthats unfortunate dude
axlebso quiet here
axlebmust all be BLINKING LED's
axlebHEY ENRIQ !
xxoxxarduino documentation not giving function signature is annoying
timemagexxoxx, yes
xxoxxmap, constrain, all integer
xxoxxhaving to recreat floating point equivalent
xxoxxbut docs don't say anything about them not working with floats
baldengineer"The map() function uses integer math so will not generate fractions,"
baldengineerWMath.cpp:long map(long x, long in_min, long in_max, long out_min, long out_max)
xxoxxand docs don't mention it
xxoxxit's impossible to find out without reading the actual source code
baldengineerFrom the docs: "The map() function uses integer math so will not generate fractions,"
baldengineerwhere's the mystery
xxoxxi see it now. they even include an Appendix with type signature spelled out
xxoxxi am fairly sure the Appendix wasn't there when I last looked at it.
xxoxxand the lack of function signature is still annoying
xxoxxespecially for listed math functions
xxoxxuh... never mind... it seemed to have been added as of now
baldengineeror months or years ago
baldengineerwell, no, not maybe
xxoxxyou got a problem ? want to be confrontational ?
xxoxxi just add trolls to my ignore list, so convenient ...
tylerlOK: I have a simple tight loop driving a 7seg display and an interrupt-driven i2c input for specifying which segments are lit. But sometimes (1 in 20-ish) sending i2c commands will cause the loop to freeze.
tylerleven though i2c stays alive and continues to respond, including being able to retrieve data.
tylerlcode fyi: https://gist.github.com/tylerl/2f03d4d45e035ca7f38657492483be6f
mrpacketheadjoin #osmocon
timemagetylerl, have you turned on verbose and increased the warning level?
tylerltimemage, verbose? as in during compliation?
timemagetylerl, yes
timemagetylerl, i want be certain there isn't a useful diagnostic you could have.
tylerltimemage, afraid not; no compilation warnings. Also, if I comment out my t2313_* function calls, I can still get the same effect. So it has nothing to do with me toggling output pins.
tylerl...or reading or acting on volatile state.
timemagetylerl, yeah. so far i don't see any errors that are relevant.
tylerlsame thing if I remove all of the delays. so nothing about that either.
tylerlsuper confused about the fact that i2c continues to function properly. That's why I have the loop increment a value that I can read back via i2c; that's how I tell the loop has stopped.
tylerlFWIW, I'm using platformio rather than arduino studio, but it's still the same compiler, so shouldn't matter.
timemagetylerl, yeah, i kind of guessed that's how you made the determination. but wasn't sure.
timemagetylerl, originally it looked like you were overflowing a buffer, but i noticed how the macro wasn't the actual size of the array.
tylerlyeah... that's temporary while I debug the thing.
timemagetylerl, guessed that also =)
timemagetylerl, i might as well say before i forget, line 71, unsigned.
timemagetylerl, i would think you'd be getting a warning for that.
tylerltimemage, naw, it won't warn from that; subtracting two unsigneds will legitimately yield a signed.
timemagetylerl, unsigned long dwell = 64 + (128 * bright); <- that isn't strictly a problem, but it looks weird. because this is signed int arithmetic. which you aren't overflowing with current values. but if bright were 255 it would overflow.
timemagetylerl, no such thing as assigning signed int a value outside its range. undefined behaviour.
timemagetylerl, in, end - millis() should millis() > end, the unsigned long result will be large. so say millis() on line 60 is 100. so end is 110. should. should 11ms transpire between lines 61 to 71, end is 110. millis() is 111. so 110ul - 111ul results in 0xFFFFFFFF which is outside the range of long, so the initaliziaton of diff becomes undefined behaviour. under high optimization settigs the compiler may assume diff > 1 any time
timemageend != millis(), because nothing that is defined in this expression can result in a negative value in diff. so all that matters is wheter or not it's zero. delay also expects unsigned long. if the compiler opts to run this (which at this point is really its choice), it could delay() well, a very long time. perhaps 24 days.
timemagetylerl, unfortunately you may change the behaviour of the problem by doing it, but you might try putting Serial.println(diff); infront of delay(diff); and see what if anything you get in the output.
tylerltimemage, hm. that's intriguing. I don't have serial on this device, but I can pull it w/ i2c
timemagetylerl, ah, now a i think i know what your 2313 refers to.
timemagetylerl, https://hastebin.com/axapopipus.cpp
timemagetylerl, uhh, i did that wrong.
timemagetylerl, hang on.
timemagetylerl, https://hastebin.com/efezumewiv.cpp // ehh, more like that.
tylerllemme see...
tylerlhm. I think I"m going to have to call it a night. thanks for you help timemage
timemagetylerl, arduino has a min macro, so the delay expression could probably be practically done as delay(min(10, diff));
timemagetylerl, anyway, don't overflow your signed types =) no idea whether it has anything to do with what you're seeing. not really thinking it does. but it's not impossible.
tylerlthat's actually not a bad idea.
tylerlI sorta think the problem might be somewhere in the i2c handler.
timemagetylerl, yeah, come to think if it min can't be used there.
tylerlthinking of simplifying that corner of the code a bit
timemagetylerl, okay.
timemagetylerl, ehh, probably too tired to completely get that. but maybe.
timemagetylerl, anyway, one thing that i'll sometimes show people is something like: extern int x; an then: bool func() {return x + 1 > x;} often the compiler will just generate what is essentially a return true; it knows you can't overflow an int, therefore you didn't, therefore x + 1 is greater than x.
matumbawomanis there any sort of autocompletion in the arduino IDE?
djphnot that I'm aware of.
matumbawomanAny alternative that does have it?
djphanything you want, it's just C code. Although the Arduino thing does make it a LOT simpler to select the board / upload settings / etc.
djpher well, C++ more than C (but C works too)
tgacheck out platformio
p0g0matumbawoman: you can use external editors, just find one that suits you. Eclipse, kdevelop, vi, etc- any one will do.
matumbawomanI'll look for some vim plugins that help with arduino integration then
djphthey'd probably all fall under "C Programming" more than "Arduino" (but then again ... )
MetalsuttonHey all. Im SKETCHING my head a little
MetalsuttonI have a project where i want to control brightness of some leds, however i also want to pack in some other control functions.
MetalsuttonHaving 2 pots, and maybe some mode change buttons.
MetalsuttonBut i guess brightness would need to be on a dedicated pot, because if you hold down a mode button, it mucks it up because there are hardware rotation limits
deskwizard... what?
MetalsuttonWell controlling brightness with a single pot. if i had a button that you held down to change another value, then it would not work when you go back to brightness, because its a hardware value
MetalsuttonI think my best option for having a more advanced controller is either an LCD screen, or just doing the whole thing through an app and wifi
deskwizardor a rotary encoder instead.
deskwizardand if you really want to f around with wifi and an app later, nothing is stopping you then
deskwizardjust a thought.
deskwizard(as in, it works really well.)
pwillardThis is why we love rotary encoders
BirdyNumNumMy new Atmel-ICE just arrived!
deskwizard \o/
pwillardcool... not sure how that applies here... but cool
deskwizardthat reminds me, I still have a motorized pot somewhere
BirdyNumNumha sorry thought i was in #avr!
pwillardMine was always finicky... like the grease inside the motor gearing solidified.
deskwizardOh. mine probably will be as well by the time I try to use it hehehe
p0g0warm it, drain the grease, put in something less viscous...
deskwizardit's some overly engineered ALPS thing iirc, weird thing.
deskwizardp0g0: good point
pwillardyeah, mine is alps as well
pwillardGot them from a surplus web vendor
pwillardI tried using them with a H-Bridge driver... and it kept stalling...
deshipusurplus web?
deskwizard:( that sucks. Mine's out of an old AV receiver, I took the h-bridge out with it hehe
deskwizardthat sorta thing: https://i.imgur.com/bmkknLw.jpg lighted shaft and all
djphbleh, SPI is hard when you're dumb :)
deskwizarddjph: that's why I use I²C :P
BHXDoes anybody see an error in the schematic, as to why the voltage behind the MAX4238 is around 1.5mV higher than at its input?
pwillardMine is exactly that... just NOS.
deskwizardhehe cool
pwillardSPI is very "open ended"
deskwizardyeah with multiple modes and stuff, meh *shrug*
djphpwillard: it's more the getting the microchip to not spaz out. nearly thought I bricked it there. good thing I had a 2 second delay in the setup to get the (bitbang) code uploaded
pwillardBHX... use a decent sharing site... we generally don't like a bazillion ads...
pwillardBHX... imgur is free
BHXOh, sorry, I have adblock, so there are no ads on postimg for me...
BHXI mean like I didn't actually know there are ads on that site ^^"
deskwizardI need a new adblock then. :|
pwillardSo much I didn't even look at what you posted...
djphyou're feeding back into itself?
djphwait, no, looking at the wtong datasheet
pwillardThats just a No Gain buffer
BHXYea, I want to use it as unity gain buffer
djphyour schematic doesn't match their "typical application circuit"
BHXWell, no they use it as bridge amplifier, I use it as unity gain buffer...
deskwizardBHX: 1) make sure your grounds are VERY GOOD and very close to each other
deskwizard2) you might need to trim it, welcome to hell.
pwillardYeah, I was thinking 'noise'
deskwizardmaybe also, how the decoupling on the rails? where are they from?
deskwizardyeah sorry I jumped to my own latest issues there hehe.
BHXThe values are very stable, the difference is just to high. The datasheet gives a maximum offset error of 2.5µV, so 1.5mV seems quite extreme
pwillardI get that. Can't explain it... but I get it.
BHXMy first thought was ground resistance, but the pcb has a full ground plane, so there is practically no ground resistance... :/ I hate when things like this happen... *sigh*
deskwizardarff, that sucks :|
chisightBHX: what is your load?
BHXchisight: doesn't seem to matter, the results don't change between 1k, 4.7k, 10k and no-load
chisightBHX: the features list indicates 1k to ground and doesn't mention an ability to sink current, so keep the 1k.
rawtazhey peeps
rawtazquestion: wont these two lines introduce a potential buffer overflow?
rawtazchar messageBuffer[UDP_TX_PACKET_MAX_SIZE] = {0,};
rawtazudp.read(messageBuffer, UDP_TX_PACKET_MAX_SIZE);
rawtazperhaps not in that regard, hmm. what im thinking about however is that there wont be a terminating \0 so it has to be handled with care
cehtehit depends on if you later expect the terminating 0 (aka C string) or not
cehtehdoesnt udp.read() return the number of characters read?
cehteh(or -1 on error)
cehtehuse that to terminate the string then
BHXIs UDP defined to be string based in arduino? Isn't it usually raw binary?
rawtazcehteh: yeah,, im kind of "confusing" strings termination with control of amount of data put into a buffer. there's nothing wrong with the above code per se, it's just not the scenario i had concerns about
rawtazso it's basically all fine
rawtazbut it might be wise, as a precaution, to make the original buffer size one byte more and fill that with a \0
rawtazthen it's safe to use it as string later on
cehtehor read one byte less :D
BHXWhat's the point in using a raw binary packet as string? Wouldn't it be prone to contain non-printable and control characters?
rawtazwhich i very well might do cuz im not indoctrinated enough to know what's good for me :-)
rawtazcehteh: yeh :)
cehtehyou dont need to fill the whole buffer with zeros, just use the return of udp.read
cehtehyou need to handle errors anyway, otherwise thats the index where you put a 0
rawtazBHX: hmm you mmight have a point. i was pretty much expecting the bytes to be put into that buffer to be printable chars, plain string messages
TimVoschHey all! I am experiencing a something quite weird imo. I'm writing a library that prints to Serial, however it only prints if I print something earlier in the process. Which has to be atleast two Serial.print(); statements. only then do the other Serial.print statements actually print something to the serial monitor.
TimVoschI thought it could have somebody to do with incorrect line endings, string termination or Serial sending buffer size.
blathijsTimVosch: Are you printing from inside ISRs or with interrupts disabled perhaps?
TimVoschhttps://gist.github.com/anonymous/ae61b416f0026395dd8f5cc46347be42#file-simwrap-cpp-L44 I have to insert two Serial.Print statements here before the other ones in the program work.
blathijsAre there other things that are weird or unexpected (that might suggest out of memory problems or other random behaviour)?
blathijsTimVosch: Could it be that the rest of the prints are never executed? Perhaps you need a bit of delay in that place so the peek() actually has a byte to peek at?
blathijsTimVosch: Perhaps try while (serialPipe.available() > 1) { to wait for 2 bytes in the pipe?
TimVoschThanks, out of memory could be a problem. I'll check on that further
TimVoschBut first ill try the waiting for two bytes
TimVosch@blathijs You are absolutely correct! The second byte to peek() at wasn't received yet so never continued....
TimVoschI'll buy you beer send me your paypal
rawtazanother question.. in the example at https://www.arduino.cc/en/Tutorial/UDPSendReceiveString we have the lines char ReplyBuffer[] = "acknowledged"; and Udp.write(ReplyBuffer); - looking at https://github.com/adafruit/Ethernet2/blob/master/src/EthernetUdp2.cpp#L110 it seems to me that this would just send one single character, not the entire string. am i right?
kappa1hi, what started kit do you recommend me to buy? I am completely newbie, never had contact with arduino before
rawtazkappa1: what do you want to do? do you have an idea of something you'd like to create/achieve? a simple goal of some sort always helps when learning something
kappa1rawtaz, maybe an autonomous car with some AI
rawtazthen you need to tesla ai car beginner kit
rawtazit's just somewhat expensive
rawtazjokes aside, perhaps you should try to find some robotics starter kit
kappa1oh I see, maybe I should start with something smaller first
akkrawtaz: If you like autonomous cars, be sure you get a starter kit that has several kinds of motors in it (DC, servo, stepper).
rawtazthere ARE arduino starter kits. i got one, had some components in it. i never did anything real with them though because i had other plans
rawtazkappa1: what akk said ^
akksorry, that was for kappa1
rawtazkappa1: do you know electronics in general? like, can you make calculations for voltage, current, resistance, etc.
rawtazdo you know the basics, i mean
kappa1rawtaz, yes, I am an engineer
kappa1I had some electronic classes
kappa1just never tried arduino
rawtaznice :) then youre off to a good start
rawtazwell i suggest you simply try to establish what you want to build, and take it from there in terms of what components you need to get etc. if you then find a starter kit that's useful, great. otehrwise just get the components you need
rawtazpersonally i like the Teensy 3.2 very much, so for a board i can recommend that
rawtazthere's not a lot of shields for it though
akkIt is helpful to have a starter kit with a good assortment of parts, so you don't have to wait for an order every time you want to try something new.
rawtazif you want shields you might want to try the Adafruit Feather boards or the regular Android boards or their compatibles
kappa1yes, that might be the best way to go. I will check for some starting projects that look interesting to me
rawtazakk: yeah, but truth be told, how much does a starter kit really cover what you need?
akkI'd start with an uno-compatible personally. You can always go to teensy or feather when you're actually building something real.
rawtazperhaps i just had too specific plans when i started. the kits are probably pretty general and useful after all
akkrawtaz: Often yes -- the starter kits these days have a great assortment of hardware that covers most of the basic areas.
akkrawtaz: I look at modern starter kits and see so many of the pieces I gradually assembled over years while learning, and wish I'd had them at the start.
kappa1uno seems affordable
kappa1thanks for the hints
rawtazhappy building
rawtazfeel free to stay and idle :P
djphwell, that was fun ... "why's my computer hot ... " (check processes ... "why's my computer at a load average of 5!?")
maxl04Hey, could someone help me with tips to write a code for a "raindrop effect" with a 8x8 shield on a d1 mini.. somehow i can´t figure out how to start a second column. 1 column or 2 at the same time works fine but if i want them to run independent on random times it just won´t work. https://gist.github.com/Max0412/e449c94ae8d57bc2d6ceb189f9bff10a
sibiriayour approach is wrong
sibiriainstead, scroll the entire display each "frame"
sibiriaand then randomly plot a new drop somewhere along the top now and then
sibiriainstead of keeping track of columnd this or that, or drop this or that
maxl04Ok, thank you.. i can´t figure out right now how to do that but i will google that
sibiriayou move the second row from bottom down one step
sibiriathen the third one step down
sibiriauntil you've moved the top row
maxl04i know what you mean but i can´t find the right connection to code that in my brain right now :D
djphyou need to draw different "whole" pictures, and play them in order
djph... er, I'm assuming your "shield" is providing you with some form of multiplexed "display"
maxl04i´m not sure what you mean with multiplexed display right now but it´s this one https://wiki.wemos.cc/products:d1_mini_shields:matrix_led_shield
djphyeah, it's a multiplexed array
sibiriathat's his last concern
sibiriagetting his framebuffer out
maxl04i´m trying to make the 1st line with random(0,1) for every dot and after that to set y +1 every time
maxl04with the same dots like the first line
djphthat's not how the display is designed
maxl04No? As you might already know.. i´m new to this stuff
djphso, the display is made up of a shift register, and a pair of MOSFETs ...
djphthe schematic is awful though,
djphdammit, and the LED driver's datasheet is in Chinese :(
maxl04the Mosfets are used to turn on the LEDs .. i guess.. and the shift register?
djphto turn on the other side
djphoooo wait, this is a shift register + mosfet ... no, wait, the schematic makes no damn sense either
maxl04Haha oh damn..
maxl04i thought i could get there the easy way
djphit makes no sense because I don't know chinese :)
djphit LOOKS like it's a shift register + MOSFET package ...
djphbut then the "example use" schematic has the "grid" and "segment" pins on a common bus (unless it's just a terrible drawing)
maxl04now i´m even more confused than before
djphit *looks* like it's a single-chip LED driver that can handle both the current source and current sink duties (as opposed to say a TI TLC5940 driver which is ONLY a current sink)
maxl04i don´t wanna be rude or anything and that´s interesting for sure but how does that help me with my code?
sibiriaat this juncture it does not
sibiriabut once you want to push your LED framebuffer out to the display...
djphWorking it out as I type ... what you *have* to know is how to address the chip so that you turn on pins 1,1 // 2,3 // 3,6 // 4,4 // 5,5 // 6,7 // 8,8
djphin such a fashion that it only looks like those LEDs are lit...
djphtrouble is, neither the shield's schematic / examples, nor the driver chip's "example" schematic make any degree of sense
maxl04Sorry for the trouble
maxl04i was thinking about a 8x8 array with 1 & 0 and changing them with every frame
djphthat's almost what you do
maxl04But i think that won´t work either.. or is just stupid
sibiriaand that's how you should do it
sibiriano, that's the right approach
sibiriayour display is after all a simple matrix
djphwell, not "every" frame -- you want an image to stay long enough that your eyes + brain can register it as a unique image
sibiriahis frame
sibirianot the display's frame (which cannot even be gauged)
maxl04yeah there will be a delay between these
djphsibiria: what frame of reference are we using when we say 'frame' though ;)
maxl04Ok going to read the array wiki.. long time since i last coded
sibiriaword-jokes ;)
sibiriabyte matrix[8][8] = { 0 }
sibiriashould do for you
djphlooks like what you have to do is draw each "frame" of your animation fully
djphthen spit that out to the shield in one go
sibiriathen just iterate across each row to scroll, and finish by rendering the entire top row with certain randomness to put a 1 now and then as a new drop
maxl04yeah like 64 times 0 or 1.. with every loop
maxl04thank you guys.. going to read some stuff about it and trying it out..
maxl04byte matrix[8][8] = { 0 } makes 8 x 8 with the value 0, right?
maxl04that´s a good start
davorWhat is the maximum value time_t can take on the ATmega328P?
sibiria{ 0, 0 } rather
sibiriabut iirc it's not really in any C revision's specs whether filling of that sort has to be implemented - but it is the norm across implementations at least
maxl04what´s the second 0 value for?
sibirianothing, ignore what i said. i'm trying ot use my brain on two places at the same time :)
sibiria{0} it is
maxl04Haha ok boss!
djphlooks like the library already covers the matrix with the "dot" function --> dot(uint8_t x, uint8_t y, bool draw)
djphif (draw) then turn on column Y at row X; else turn off col Y / Row X
maxl04turn of is that -> volatile uint8_t disBuffer[8]={0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; ?
maxl04Ok seems like i´m wrong
djphlooks like they're initializing x&y in that function with bitwise and against 0x07
djphnot entirely sure why; and don't have one of those things to check what it's really doing
maxl04and yet again you confuse me haha
djphdon't worry about it, trying to reverse engineer the code.
maxl04i think i´ll go with the array and try that out
maxl04ok not going to worry
djphlook at the library they provided - it shows you how to do it.
djphthe "draw_dot" example
maxl04yeah that´s what i used for starting my code
djphso then what you need to do to draw multiples is (1) draw all the dots at once, then throw the whole thing up for ~200 milliseconds; then go to the next "picture", show that for 200 milliseconds, etc.
maxl04But i´ve been told that this "looking at every dot alone" approach is wrong
sibiriafor this purpose, it is
maxl04yeah put an array with this 64 values into mled.dot(x,y); for every dot.. then mled.display that.. wait 200 .. clear.. and repeat with changing array
djphthat's not how the library is coded. You have to treat "mled.dot(x,y)" as the array
sibiriasomething like this should be what you want: https://pastebin.com/raw/UtdeHXTu
sibiriabarring whatever means you need for rendering to your specific matrix, that is
sibiriarun that every .2 seconds or something and it'll trickle down nicely
maxl04thanks going to figure out how your code works right now
sibiriait copies the 7th row to the 8th, the 6th to 7th... 1st to 2nd
sibiriathen it renders the 1st row anew
sibiriawith mostly 0, now and then a 1 (drop)
sibiriait just scrolls the whole matrix down one step and draws a new line in the top, simply
maxl04Mh mh mh.. so many questions. :D
Katanado anyone think supplying the Adafruit Motor Shield v2 with 12.3V would be an issue? docs says max 12V but I measured my power source to output 12.3V
KatanaDont know how sensitive that stuff is
deshipuKatana: best look at the datasheet, it should be linked from their docs
deshipuKatana: if you look at https://cdn-shop.adafruit.com/datasheets/TB6612FNG_datasheet_en_20121101.pdf and scroll down to "absolute maximum ratings" you will see that you should never exceed 15V
Katanadeshipu: sounds good :) found this info also, but I think its for v2 and not v2.3. https://forums.adafruit.com/viewtopic.php?f=31&t=129779
djph+/- 10% is usually OK with power, but always best to check the datasheets
tonton81what about 12v 1000A
tonton81can put 10K accross?
tonton81whats the Amperage loss?
Blakes5I'm moving to the next phase of my first arduino project which is finalizing it. I want to take the arduino, the sensors and the led matrix from the bread board and into a permanent housing. Anyone have ideas on how I should do that?
deshipuKatana: as long as it's the same chip, it should work
deshipuBlakes5: use a pro mini?
deshipuBlakes5: and veroboard
deshiputonton81: google for ohm's law
maxl04Blake 3D print a Box
Blakes5deshipu I'll look into that, thanks.
timemageBlakes5, not sure what to mention except the term "enclosure".
Blakes5maxl04 - I'm looking for permanent connections...the enclosure I'm cadding right now.
maxl04Ah ok
maxl04otherwise there are some online pcb producers..you send them your layout and they print it
Blakes5Ah, I didn't know that. I've got a soldering iron I don't mind putting to use. I just need to know what all is involved since I've never done this before.
maxl04there are pcb design softwares onlie and you send them this file.. costs like 5$
maxl04you could do that with a laserprinter too but that´s pretty much work to do and doesn´t work every time
djph^ jclpcb will make 10x 4" square (approx.) 2-layer PCBs for ~$20 shipped (USA). Took about 3 weeks to get them.
akkBlakes5: One thing that makes things easier is to get some 28-pin sockets, use a socket when you're soldering things together
akkBlakes5: then you can program and test the CPU in an Uno then pull it out of the uno's socket and plug it straight into your project.
akk(it also means you can replace the chip if you ever cause it to emit the magic smoke)
maxl04oh this magic smoke.. i know that very well
Blakes5thanks akk
Blakes5OFf to work.
rawtazim so happy - have a cellular arduino here, and couldnt get anything with it to work. it refused to connect to the network and i couldnt even read the battery voltage. but after testing it in another phone and disabling the PIN requirement, everything works
rawtazfor a while i thought that 2G wasnt supported by the sim card, but it was apparently
maxl042G? Wow
rawtazmaxl04: yeah, the adafruit FONA has a cellular module which only does 2G. seems to be very common in many basic things such as alarms etc as well (at least the non-expensive ones)
redrabbitI got 3g dongles for 15 bucks each on ebay
redrabbitthey do 7mbps internet and sms
redrabbitmy provider gives a second sim card for 2eur/mo so im using it
Lizards|Worklol u said dongles
redrabbitthey must be stupid as well then
rawtazhm, when i do char foo[] = "abc" is there three or four bytes reserved? im thinking it's four bytes and the last one has a \0 ?
drewmuttYep, four.
rawtazbut when i do e.g. char foo[40]; then only 40 bytes are reserved, so if i ever want to use that as a string i should only use the 39 characters
rawtaze.g. at most strcpy(foo, "39 char string here, not 40 char long")
drewmuttYep, strcpy also moves the null term
timemagerawtaz, sizeof reports things in char (aka bytes). so char foo[] = "abc"; Serial.println(sizeof foo); or just Serial.println(sizeof "abc"); will show you 4.
drewmutttimemage: I had a thought. Why don't we null terminate arrays more often? Not just strings..
timemagedrewmutt, we do. in particular argv is null-pointer terminated.
drewmuttAh, that's true. I just don't see it often in run of the mill like arrays containing structs, usually just another var to hold the length.
timemagedrewmutt, also not uncommon say an array of structures where the structure is something like struct {size_t len; void *p;} and use null pointer for p, or in some cases use a signed len and -1 to termiante.
timemagedrewmutt, heh
timemagedrewmutt, yup.
drewmuttC could of really used "vector"
timemagedrewmutt, instead of array?
drewmuttIn conjunction I suppose.
timemagedrewmutt, hmm, not sure i'm getting the distinction.
rawtaztimemage: that makes me think sizeof is some form of preprocessor macro or similar
timemagerawtaz, keyword and unary operator
timemagehave to take off for a bit. back maybe 25 minutes.
rawtazim off too, cya