timemagerawtaz, https://pastebin.com/9Su1dKKC
timemagerawtaz, a direct instance of the IPAddress class. 4 bytes less data space. 12 less code. also to use the raw array in contexts where you need an IPAddress type you /may/ incur more loss. again, if you really want to know, test it.
timemagerawtaz, it's possible when you put either into use in your code it will change favour. i sort of doubt it. but, try and see.
rawtazthat makes sense
rawtazim not constrained on space though
rawtazif i was, i wouldnt be doing this
timemagerawtaz, worried about space is the only objection i could think of that makes sense given that wha you're suggesting is more complex in terms of what you write in the code.
timemagerawtaz, if it's not buying you space, or speed, and it's effectively making your more moving parts, why?
rawtazfor code compartmentization, if that's a word
rawtazat the cost of some performance and memory
timemagerawtaz, if you're you're using the same header on a system that doesn't have the IPAddress type, then yeah i can sort of see that. otherwise, nope. still not making sense. not that it needs to.
rawtazthats not the point of it
rawtazit's not in the way that you guys work, i know that. i dont think i can explain why im doing it this way
rawtazi tried but failed :P
rawtazlet me ask you; why *not*? i can waste the memory and what not. it's totally not a problem
rawtazif i feel it makes my code structured in a better way and more coherent in the end, i think thats good
timemagerawtaz, it's sort of my default position that the program should be reliable. which means simpler typically. which often means smaller as well. i'm curious to what your conception of us guys is.
rawtazif i arrive at a situation where i need to optimize and cant do these silly things, then i will. i have no proble adhering to the c++ way or what to call it when needed. but if dont have to, i prefer managing my code in a way that im more happy with, not coming from a c++ background
rawtaztimemage: sure, but those are different things. there's no less reliability in either method in your paste, is there?
rawtaztimemage: my conception of you guys? none special really. you know your uC and c++, thats what i think :)
timemagerawtaz, not by a large degree. but one variable better than two.
rawtazsure. but it's still not an actual problem in any way, and it would never be either
timemagerawtaz, maybe someone else here will explain what i'm missing. =)
rawtazhehe dont worry about it. it's just two different ways of working, IMO neither is wrong
rawtazyours is most likely the proper c++ way, thats for sure
djphwhat're you doing / trying to do?
rawtazdjph: i just wanted to have a file where i define the ip address, and then in another file actually instantiate that ip address object
djpho...k?
djphwhy use a file at all?
rawtazyou mean why put the ip address in a separate file than the one where i instantiate the ip address object?
djphI mean, it'd be more a variable than an object ...
rawtaznot sure how you mean, sorry
djphwell, anIP address is just aaa.bbb.ccc.ddd (or a string of 24 1's and 0's)
rawtazah you mean the ip address object would be more like a variable than an object having a bunch of funky features that you use in terms of OO, so to speak
rawtazput another way, more like a data type than an object in the context of OO
djphbecause it's NOT an object
djphthat's like saying "my name" is an object -- it's not, it's a variable owned by the "object" "someGuyOnIRC"
rawtazIPAddress is a class, no? so if you instantiate it, it will be an object?
djph... i have no idea what you're talking about now ...
djphwhere are you getting this "IP Address" thing from?
rawtazhttps://github.com/arduino/Arduino/blob/8418eecca7e9d9b2f852194bd64a2563fd47943d/hardware/arduino/avr/cores/arduino/IPAddress.cpp and the corresponding .h
rawtazit's a *class*
rawtazand unless im terribly off in my highly rusty c++ terminology, if you instantiate a class even in c++, it's what you call an object
rawtaz(well, not the *class* itself, but the "entity" you create as part of instantiating the class, i.e. the "variable" you create by doing that)
djphyour link doesn't work
rawtazit does here - takes me to the source code of the file IPAddress.cpp
rawtazperhaps your client didnt account for a newline or something?
rawtazwait i can get you a tinyurl
rawtazhere: https://tinyurl.com/y794vbyo
djphthat's an ugly as hell way to represent and IP address
djph*an IP address
rawtazwhat do you think is the proper way?
timemagerawtaz, i dunno if i'm muddying the waters here or what, but the term object and what it means to instanciate haven't got much to do with whether or not a class is involved in c++. there's as heavier meaning of object from object oriented. but that term is also applied in C where there is no inherent object oriented support. when you make a priminitive type like an int, you're instanciating it. and it is an object so far as the language is
timemageconcerned.
djphI suppose it depends what you're doing with it. At the end of the day, an IPv4 address is a 24-bit number (so, unsigned 32-bit number would be the closest thing, or a string / character array would also work)
rawtaztimemage: that makes sense too, and good to know, i appreciate your input
djphmaking a full header file and having functions that handle "an IP Address" is a fair bit more than what's necessary in many cases ...
rawtazdjph: hehe, well im only guilty of the former, the IPAddress class and those functions is not my doing but the Arduino project's :)
djphyeah, I see that
zap0i would have typedef uint32_t ip_address_t; and a bunch of helper functions in a namespace NetworkIP. the class i think is a bit overkill
djphI'd have to read through the whole project ...
rawtazin https://www.arduino.cc/en/Tutorial/UDPSendReceiveString there's a line Ethernet.begin(mac, ip); and a line Udp.begin(localPort); - for the latter there's an "object" created a few lines up, EthernetUDP Udp; , but for the former there isnt.
rawtazin the former case, what's the .begin() doing work on? doesnt there have to be an object for it to work on, so to speak?
rawtazi guess it just initializes some stuff such as the SPI etc
djphyou're running the "begin" function from the "Ethernet" object.
rawtazim not seeing an instantiation of the Ethernet class though
djphthe library may create it itself
OmnipotentEntityHi there! This is my very first project using the Arduino IDE. I'm trying to write a memory tester to determine if a high flux of neutron radiation has damaged my board. Having looked at memtest86+ for ideas, it seems like assembly will be almost obligatory due to needing to address and overwrite specific areas of memory, and potentially needing to also move the program itself from the standard entry point to a different
OmnipotentEntitysegment of memory. Is this possible from the v1.8.5 IDE? I'm seeing things about "setup" and "loop", but I'm unsure how best to approach this. I do have the manual for hardware, so I know where the proper memory addresses to scan are and where the entry point is and so on.
OmnipotentEntityFor clarity, I do have several copies of this board, and I've only subjected one of them to a high amount of radiation.
xxoxxthere are simpler ways of doing this than flushing code around
xxoxxfill the flash with large array variables, bootloader will do the verification
OmnipotentEntityTrying to test the DRAM actually
OmnipotentEntityThanks for the hint on checking the flash though!
xxoxxyou don't execute from DRAM. DRAM is data only.
OmnipotentEntityThe flash memory isn't cached into RAM at all? Or does it just never leave SDRAM?
xxoxxthe program counter doesn't reference DRAM at all. It points to and fetches code from flash only.
xxoxxyou can go the other way around though, load data into flash with "progmem" keyword
OmnipotentEntityFor clarity, my chip is a Teensy3.6
OmnipotentEntityAnd referencing the docs, it seems that it only has SRAM
OmnipotentEntityLooks like 64kB of SRAM and 256kB of flash. hmm...
OmnipotentEntitySo is there not a more elegant way to do what I want than to simply dynamically allocate just under 64kB of data using malloc or similar?
asecretcathmm, since the teensy looks like it's an ARM core and not AVR i don't think it has the same modified harvard architecture separation the AVR has
asecretcatso the flash and SRAM may be in the same address space?
OmnipotentEntityThat's what I've gathered from the documentation
OmnipotentEntityhttps://www.pjrc.com/teensy/K66P144M180SF5RMV2.pdf <- if it helps
OmnipotentEntityTable 5.1 contains the system memory map
xxoxxi was assuimg atmega. ARM is a different story
OmnipotentEntitySorry for the confusion xxoxx
OmnipotentEntityalso it seems like I lied, only the SRAM_L is 64kB, the SRAM_U is 192kB in addition for a total of 256kB of SRAM
OmnipotentEntity(whoopies) :)
timemageOmnipotentEntity, i haven't been following, but that sounds a bit like how the due's chip is set up. is that what you're using?
rawtazhm, if i have a .h file that i want to include in two different projects (compiling using the arduino IDE), what's the best way to place that somewhere and reference it from both projects?
rawtazeach project is of course in its own directory
OmnipotentEntitytimemage, hey! The memory layout is not specifically a problem. I just need to somehow figure out which areas of memory are in use so I can not clobber them. If I can avoid using malloc that would be great because then malloc will be storing metadata about the memory allocated and I will have to as well.
baldengineerit might be worth a post on the PJRC forums. They are a very technical bunch and you'll likely get Paul's attention
OmnipotentEntityThanks baldengineer :)
timemageOmnipotentEntity, i have some vague memory that one of those windows is changable. and they set it up so the address ranges are contiguous. as far as what i think were you asking before, the flash is usually just mapped into the same space as sram and not shadowed or anything of that sort. that comes up sort of here often because of the avr progmem. and i guess rarely because of how the esp8266 operates. but most simple embedded systems
timemagejust have ram and flash directly accessible though the same space.
timemageOmnipotentEntity, erm, that sort of thing comes up here often....
OmnipotentEntityright, I have the SRAM offset, and its length, I just need to figure out how to read from malloc's table to figure out if any particular word is being used and skip that memory location when writing and reading patterns.
timemageOmnipotentEntity, or just set things up so there's nothing in memory at the time that you care about and directly address everything.
rawtazis it really not possible to include a header file from a location relative to the current/main .ino file? im trying to do a simple #include "../../common/test.h" but just getting an error that the file doesnt exist or is not readable, which it sure is.
rawtazalso tryed with backslashes instead of slashes
rawtaztried*
OmnipotentEntitytimemage, I believe that some dynamic memory is used internally by the arduino compiler, for what I do not know, but an empty "setup" and "loop" function has the arduino compiler claiming that nearly 4kB of data is in use.
OmnipotentEntityrawtaz, sorry man, I don't know. I'm not very good with the arduino compiler unfortunately :(
timemagerawtaz, so, you have something like: ./common/test.h and ./a/b/something.ino including it?
rawtaztimemage: exactly
rawtazthats what i want, as usual ;)
rawtazwhat i get when i do #include "../../common/test.h" or the same but with \ instead of / is: E:\Arduino\plc2v1\main\main.ino:12:31: fatal error: ..\..\common\test.h: No such file or directory
OmnipotentEntityI suppose it just doesn't accept Windows directory separators.
OmnipotentEntityIf anyone would like to weigh in https://forum.pjrc.com/threads/49581-Memory-tester-(self-test)-(Teensy3-6)
timemagerawtaz, i see. /tmp/arduino_build_478560/preproc/ctags_target_for_gcc_minus_e.cpp" so, the arduino preprocessor changes the location of the effective cpp file. so your relative path is now relative to that location, not to the .ino file location.
OmnipotentEntityIs there a way to change the Arduino's library paths to fix that?
rawtazah. that makes sense..
rawtazi wonder if there's some defined path thing you can use in your include to make it work. like, #include COMPILEPATH(additional/path/test.h)
timemagerawtaz, yeah, i'm looking into that.
OmnipotentEntityrawtaz, generally, you can modify the library path of the compiler using -l or -L to address that; however, I'm not very conversant with the compiler and build environment of the arduino compiler, so I can't guide you through it, but I'd imagine that there's a way.
rawtazOmnipotentEntity: you sound like a very advanced user for being a newbie to the arduino IDE. perhaps you'd be better served with avrdude or what the name is of that suite the pro's in here use
rawtazwhy constrain yourself to the arduino ide
OmnipotentEntityTeensy3.6 uses it as a programmer. I don't know how to program it any other way
OmnipotentEntityhttps://www.arduino.cc/en/Guide/Libraries
OmnipotentEntityrawtaz, that link might help, specifically the part about manual installation of a library
rawtazyeah, seen it
rawtazim not looking to install a lib though
OmnipotentEntityDoesn't do what you need? Drat!
rawtazthanks though :)
timemagerawtaz, so.... given that nothing is coming to mind: why is referencing a file above it in the directory tree?
OmnipotentEntityrawtaz, according to some random guy on the arduino forum, you cannot modify the library path (easily)
rawtazi have my simple configuration for two very similar projects in that file, thats why i want to include it in both projects
OmnipotentEntitywhich means you either need to install your library as a library locally or just simply include two copies of it
rawtazOmnipotentEntity: yeah, i guess thats the case
OmnipotentEntityIt is unfortunate, I am sorry that the official IDE is somewhat inflexible
rawtazyeah its made for adhering to strict guidelines :>
rawtazin this case it would be silly to make it a "library" and put it in a totally unrelated place, just to be able to reference this file
rawtazalternatives would be symlinks, or reading a proper configuration file instead of a .h file, but that's just overkill for this simple case
rawtazi will probably just duplicate the file instead
rawtazquite unfortunate but,, well
OmnipotentEntityIf you weren't on a windows computer, I would suggest a hard link actually
rawtazah yeah
rawtazthats an option too
rawtaztimemage: thanks for checking!
timemagerawtaz, uhh, is your other project also an ino?
rawtazyeah
timemagerawtaz, ah. okay.
rawtaztheyre for two different little boards, a teensy and a feather. too different to be merged into the same codebase though
rawtazbedtime.
OmnipotentEntitygood night rawtaz
OmnipotentEntityI'm going to head out as well, bye!
rawtazokay, i did another least sucky option - i simply hardcoded the full path to the file in both projects. two places to maintain, and i will spot it if i need to change it. fair enough
baldengineerthis sounds like an XYproblem
baldengineermost code designed for multiple boards use IFDEF blocks for the appropriate boards
baldengineernot duplicate files
baldengineerusing a full path or relative path doesn't seem any different to me.
timemagerawtaz, yeah, i figured that suggestion wouldn't go well.
rawtaz:D
zap0can you do analogWrite() on the built-ni LED on a Uno ?
zap0-in
baldengineerno
zap0:(
rawtazbaldengineer: example: each of the two projects will have some message strings in them, the text in these strings being the same in both projects. thats one example of stuff i wanted to share in a common file, since obviously it's pretty retarded to have to change the texts in two different projects when you want to adjust them
rawtazbaldengineer: a relative path does not need changing in case i relocate these projects' files, whereas an absolute path will have to be changed in two places if i were to relocate them. thats why i prefer relative paths
Rickta59make a binary only file that is .elf and link it to both
rawtazthats way too much work
Rickta59but elegant
rawtazhow do you even do that with the IDE?
Rickta59all ide work by calling programs behind the scene
rawtazi know, but how do you do that with the IDE?
rawtazthe point of using the arduino ide is simplicity. if i have to go through hoops and what not for even the simplest things, then whats the poitn of using it.
baldengineeryou can't pick arbitrary things to be the "easy things"
zap0a shared header is enough.
rawtazincluding a common file is pretty much as basic as you can get :>
baldengineerit doesn't make EVERYTHING easier
baldengineerno, it isn't
baldengineerfrom your perspective perhaps, but the vast majority of users aren't trying to do what you do
Rickta59you can make it a library
rawtazbaldengineer: let me guess, you rarely program anything but C/C++?
rawtazRickta59: yeah, and that is way overkill for sharing ten message texts..
baldengineerrawtaz bad guess and I fail to see the point
baldengineerlol
baldengineercracks me up. *MY* corner case is an issue. argh!!!
Rickta59i would do that if you want to keep it simple
rawtazbaldengineer: my point is that NONE of these things is a problem in ANY other programming language or more specifically environment that i ever use in other contexts. i blame the IDE, basically. and i still think that being able to simply reference a file two levels up in the filesystem is certainly as basica as you can get in terms of what you'd be able to do
Wolf_Linkbaldengineer! I know you! you were here when I used to hang out on IRC and come here a lot before
baldengineerBlame the IDE, whatever makes you happy
rawtazbaldengineer: do you seriously not think that referencing/including ../../foo.h should be pretty straight forward?
baldengineergiven how rarely I ever do it with the IDE, I don't care
rawtazbaldengineer: you seem to be happy by just arguing without much basis for it, fwiw
rawtazbaldengineer: EXACTLY. then who are you to argue, if you never use this thing in the first place? as others pointed out, what i want to do is perfectly doable outside of the IDE. hence the IDE is the limitation
baldengineerI don't care about your "<insert random issue here.>" It just fanscinates me when people pull the "this <insert random thing> should be simple! why isn't it!"
rawtazyet you call me out for "blaming the IDE". well, guess what. it IS the IDE that's the problem here
baldengineerWolf_Link wow, blast from the past
rawtazbaldengineer: again; in what way is it not a relaly basic thing to reference a file two levels up? it's a relative path. theyve been around since the beginning of unix for gods sake.
Wolf_Linkmy Nick was, like, shantaram or shantaram3013 then
rawtazplease explain why you dont think this is a basic thing that shoudld be doable?
baldengineerYeah I recognize shantaram
Wolf_Linkit still is, I guess but I'm in disguise.
Wolf_Linkquestion, what's the terminal command for compiling an Arduino sketch ? gcc-avr file.cpp?
rawtazlol. you're really funny actually. calling it a corner case. to reference a file using a relative path. serious lol to that.
rawtaznot sure what universe you live in.
Rickta59you realize how the ide works when it compiles rawtaz yes?
rawtazRickta59: yeah, i do. and timemage pointed it out earlier. i think you did too :)
Rickta59i just came in .. i probably should scroll back
rawtaz(i dont know the EXACT details of it, but enough to understand why the reference im trying to do doesnt work)
Wolf_Linkand then to send it you use avrdude? I'm wondering if I can make my own script to compile and upload programs. I could work in nano then.
rawtazRickta59: nah, dont worry about it. it's a no dice anyway
Wolf_Linkor gedit.
Rickta59i don't see why a library is such a stumbling block
Rickta59you just want to include a common .h file yes?
mrpacketheadis this ( http://www.microchip.com/DevelopmentTools/ProductDetails.aspx?PartNO=ATATMEL-ICE ) a useful programming device
rawtazRickta59: just FYI so you dont have to wonder, timemage summed it up nicely: < timemage> rawtaz, so, you have something like: ./common/test.h and ./a/b/something.ino including it?
rawtazRickta59: yep, like ^
rawtazRickta59: from that .ino i tried to do e.g. #include "../../common/test.h"
rawtazdoesnt work though, as the compilation happens in another place than the .ino is in
baldengineerWolf_Link look into "arduino builder" it's the new process that the recent IDE uses.
baldengineerWolf_Link covers the case where you want to build your own build chain
rawtaznight peeps
rawtazACTION &
Rickta59i just tried the library thing
Rickta59simple and works without pain
Rickta59@ rawtaz
Rickta59https://dpaste.de/ZeY1 simple
shantaram3013hello frenz
shantaram3013because friends is too mainstream
mrpacketheadcould someone confirm somethign for me...
mrpacketheadi've just been reading https://www.arduino.cc/en/Tutorial/ArduinoISP which is about using an UNO to be a programmer
mrpacketheadProvided i wire it all up correctly, does this mean that i can program a device that has no bootloader
mrpacketheadi'd rally like to do it in one step if i can
mrpacketheadjust program the bootloader and app
baldengineeryes
baldengineerbut yesterday you said you had many boards to do and you wanted something that was fast. using a second arduino as ISP always has issues
baldengineerit is either reliable or fast
baldengineerat least based on the sheer number of questions that people ask about doing it
sjohnsonhi. i think my Arduino Nano is bricked after my brother programmed it with an Atmel programmer instead of using the Arduino IDE software.
sjohnsonnow i can't figure out how to get it so that the Arduino IDE can upload sketches to it. it just stays stuck at 100% forever.
baldengineerthe Atmel programmer likely wiped out the bootloader
sjohnsonyeaeh, that's what my brother figured.
sjohnsonsomeone else suggested i try using the Arduino IDE software to "Burn BootLoader"
sjohnsonbut perhaps it's not as simple as that.
sjohnson(i just get a simple error when i try that. "Error while burning bootloader."
sjohnsonand nothing else.
sjohnsonany advice greatly appreciated!
baldengineeryou need to use a hardware programmer to burn the bootloader
sjohnsonk, someone is helping me. (the same person)
sjohnsonhe said that too. good thing i bought one of these a few months ago off eBay!
baldengineerit'd be the same thing used from Atmel
baldengineeryou need a programmer to blow away the bootloader
sjohnsonis there any guide that explains how to do this?
sjohnsonmy programmer is 10 pins, the arduino nano has 6 pins.
sjohnsonah i found this: https://learn.sparkfun.com/tutorials/installing-an-arduino-bootloader
sjohnsoni'll give this a try.
mrpacketheadbaldengineer, Yes, id did ask about that too.
mrpacketheadI was just looking at various options.
mrpacketheadIf i wanted to put something on my desk to program one or two
mrpacketheadbald i'm assuming that you probalby can program a composite impage of the bootloader and the application together in one operation?
baldengineerI'm not certain that is possible
baldengineerI don't think the chip will let you program in both spaces during the same operation
baldengineerbut I don't know for sure
mrpacketheadwe do this with microchip product
mrpacketheadbut i do appreicate it is differnet
sjohnsonbaldengineer: thanks for the help earlier. the bottom line is i'm going to order some 10 pin to 6 pin converters off eBay and freely give them away to whoever wants one.
sjohnsonor i might try and use a breadboard. or both.
baldengineerI don't know what the 10-pin, pinout is, but I imagine you could use jumper wires to turn it into a 6
mrpacketheadbald, do you even need to load the bootloader? is it possible just to run it without one?
baldengineeryou only need the bootloader if you want to program over serial
baldengineernone of my embedded boards have the bootloader
mrpacketheadhttps://www.arduino.cc/en/Hacking/Programmer <---
mrpacketheadthis confused me
mrpacketheadHowever you must have in mind that the Upload Using Programmer procedure doesn't burn fuses so, if you have a fresh factory micro-controller you have to burn the boot-loader first in order to have a properly working device.
mrpacketheadso, if you are using an AVR-ISP you can't set config fuses?
mrpacketheadtaht seems bizzare
mrpacketheadi cant' undersand this correctly
baldengineerwhen I have a custom board, I burn my code with avrdude
baldengineercommand line
baldengineerwhich lets me set the fuses and upload the hex at the same time
mrpacketheadahh
mrpacketheadcode that you devleoped with the arudino ide?
baldengineerafter that, upload via programmer is fine since the fuses are set
baldengineersure
mrpacketheadcmd line is good if its going ot be factory automated
mrpacketheadmeans i can program / test
mrpacketheadbed of nails stuff
baldengineerI just find it easier
baldengineere.g. ./avrdude -c usbtiny -p m32u4 -Uhfuse:w:0xd0:m -Uefuse:w:0xfb:m -C ../etc/avrdude.conf
baldengineerbut that's for a 32u4. I can't remember the last time I did a 328p
mrpacketheadcool
mrpacketheadthat sounds like what i need
mrpacketheadhttp://www.microchip.com/Developmenttools/ProductDetails.aspx?PartNO=ATATMEL-ICE <--- thats half price at the moment
deshiputhat's still 10x more than what it
deshiputhat's still 10x more than what it's worth
noob12hello
noob12i have a "model" of a vehicle using two wheels
noob12right now i can make it go forward and backwards
noob12i want to be able to make it go "sideways", like: move across x-axis
noob12now it can move across y-axis
djphnoob12: cars don't do that ...
noob12let's not call it a car then?
p0g0some do, if they have an axis above each wheel
noob12i was wondering if it was even possible
p0g0as well as the axle
noob12yeah i thought of putting a motor to turn the wheel itself
djphp0g0: it's too early in the morning
djphp0g0: can't visualize that
p0g0think of the coaster wheels under a shopping cart
noob12so stepper motors to turn the wheels themselves
p0g0They have a vertical axis
djphp0g0: OHH you mean to rotate the wheels 90 degrees, makes total sense
djpherr, the wheel-carriers
p0g0like any steering tire....
p0g0it turns in two dimensions...
djphyeah, I ws thinking "car" as in "2 wheels connected with an axle"
p0g0ah
noob12p0g0: i have a feeling this is a known/solved issue
p0g0I was thinking bicycle
p0g0it is way known
p0g0all cars have the tech
p0g0in the front
p0g0some have it on all wheels
djphp0g0: even that'd work, but the wheels are linear, so
noob12djph: i can put them like a bicycle no worries :D
djphp0g0: i dunno, it's still "first cuppa coffee" :)
noob12still though need to work out rotating the wheels themself
p0g0djph: put your cup of coffee on a potter's wheel, you'll get the hang of it...
noob12p0g0: what should i search for in my local market?
p0g0food?
p0g0The tech you are looking for is a bit special
noob12it's a small motor scale model
p0g0I doubt you will find the whole thing in a local market.
djphnoob12: basicly, a vehicle will traverse the plane parallel to the wheels, and cannot traverse the plane perpendicular to them. Now, as p0g0 has pointed out, you can change which plane is parallel to the wheels (note, turning wheels, as in standard automobiles still follows that rule - you're just moving through an infinite series of planes until the wheels straighten back out again)
p0g0Get the RC actuators off the web, they are small and well documented
noob12p0g0: so the RC actuators hook "above" the wheels
noob12?
p0g0noob12: yes, and you'd need to engineer that.
p0g0They also don't do full rotations, but I think they will do 90 degrees
p0g0When done in heavy equipment, there is a hydraulic motor to spin the wheel, and one to orient the wheel direction. It is all heavy metal.
djph"heavy equipment" as in construction machinery? I mean, I've got an old car here where it's brute arm strength ...
rawtazRickta59: yeah, thanks for the example. i know i can make a library out of it, but it's utterly silly to place a file that just consists of some shared lines of code in an even more remote place. it simply is not a library and does not belong in the library folder. it should reside in the main projects folder where i have the other two projects. i have no problem making libs, but this is not suitable for a lib, and the lib folder is the wrong place.
rawtazit's just the IDE that's preventing this, otherwise it would have worked just fine
p0g0djph: yes, like mining equipment, some heavy trucks and the like.
djphp0g0: just checking since a car is "heavy" too ;)
p0g0djph: you just think it's heavy... wait to you meet something that weighs a few more tons.
djphp0g0: like a steam locomotive?
djphthey're big, and nothing's not heavy on them :|
Rickta59so how would you go about this on another IDE rawtaz ?
p0g0djph: yep, those are heavy.
rawtazRickta59: the IDE normally does not move the compilation of the files to another place like the ardunino IDE does, so its usually not an issue - since the files are compiled from where they normally are located, the relative paths/references work fine
Rickta59eclipse does
rawtazi guess a better summary is that it's the build process that's the "problem", how it does its work
rawtazRickta59: okay
Rickta59all ides do crap that you have to work around
rawtazRickta59: i rarely do c++ and when i did it before (except the arduino IDE) i just used regular compiler tools, so they happily accepted the relative paths
Rickta59even makefiles
IcePicits all assumptions. At times, someone elses assumptions will not match yours
Rickta59so you do java?
IcePicnothing to be surprised about
Rickta59if you do then you have to work within its bounds
rawtazRickta59: it's been a while. lately it's been php, python, lua etc. and some other ones
Rickta59all of them interpreted languages
rawtazRickta59: sure. but seriously - if i were to make a small basic example of including a file relative to the current dir, and compile that with gcc, then it would work, right?
rawtazRickta59: so what.
rawtazinterpreted or not, doesnt matter. it's about how the build process works
Rickta59your source code is your binary in interpreted
rawtazagain, if i were to make a small basic example of including a file relative to the current dir, and compile that with gcc, then it would work, right?
Rickta59compiled langues are pulling in libraries header files .. producing asm it assembles and eventually produces a architecture specific binary
rawtazi know man, you dont have to explain that stuff to me
rawtazive done assembler as well
Rickta59i'm not sure why you complain about an ide that is meant for artists who would never share a file they would just use copy and paste
Rickta59and if you want to be "smart" then you have to play within its rules
p0g0which IDE is the artisan's?
Rickta59arduino
p0g0yeah, that IDE is hopeless.
Rickta59* checks channel .. yep i am in arduino
p0g0hey, that's why it needs all the support.
rawtazRickta59: i am not complaining. you are asking me why i think it's a problem and why i think it's not perfectly fine, and im explaining that to you. in part i am merely concluding that the problem im facing happens due to how the build process is set up to work, which i obviously understand, and in part im explaining why i never experience this problem in my more common coding endeavours.
p0g0But many just use the 'external editor' option and are good.
rawtazthats not complaining, im just answering you and thats about it
rawtazp0g0: im using an external editor :)
rawtazRickta59: and i totally understand the arduino IDE is made to be very simple. i knwo that. im not bashing it for it. im just concluding.
p0g0Well, between (under Linux) the external editor and grepping the logs in /tmp, I don't suffer too much.
p0g0I'll bash, cheerfully.
rawtazi just have to live with this, thats the bottom line. i understand why it happens, im not surprised, it is what it is.
Rickta59i got the impression earlier you said "the ide is the problem" and I contend that what you want to do isn't the use case for arduino .. but i can handle it if you use a library
Rickta59and you reject that because you want it to work some other way
rawtazRickta59: okay, let me phrase it more specifically - the reason i cant do what i want to do and am used to be able to do in 99% of all my other programming is how the build process in the ardunio ide "suite" is set up to work. it's per its design, so i cant complain, but that's the reason for what i feel is a problem
rawtazRickta59: yes, i want it to for example have a macro i can use to define relative paths. if it moves/copies the files for compilation out of their original location to build, it would be nice if it did supply such a macro so i can work around the problem
rawtazif i cant have that, then fine.
djphthis sounds a bit like an XY problem ...
rawtazill just have to work around it some other way. but the IDE or the build process is the *technical* reason why my relative path include does not work, i suppose we can all agree on that?
Rickta59sure
rawtazi like the IDE, fwiw. it's really great and easy to work with for beginners (which i still am one, in this context)
rawtazdjph: i just wanted to include a file, thats all :P
Rickta59heh .. I think the IDE could use a lot of work to make it easier to work ... code completion would be a huge step forward
djph#include "/path/to/file" ...
Rickta59which every other ide has
djphugh, I hate code completion :)
rawtazdjph: yeah but #include "../../file.h" does not work
Rickta59i guess you have a better memory than me
Rickta59you can put your code in a .cpp file and do whatever full path you want to
IcePicrawtaz: then you post it on destructables.com and winders people can't make forward slashes to work .. ;)
rawtazRickta59: yeah.. that would be nice. then again we'll always want more features. in one way i think it's better if people just learn to use an external editor instead
rawtazIcePic: heheh :)
Rickta59then why bother to use the ide at all?
Rickta59for the "optimized" libraries?
djphRickta59: nah, I just hate typing "S" and getting the thing to try adding [erial|tring|omething|tars|ource|tuff}
deskwizardIcePic: lol
rawtazRickta59: the IDE has a lot of the things a beginner needs to get things running smoothly. just think about all the library and boards management, all the examples, and the settings you change in the menu to target different boards, ports, serial, etc, etc. all those things are straight forward knows you turn to quickly get your project running. but the sole editing of the source code is better done in something more suitable, and using the IDE for all
rawtazRickta59: imagine if beginners didnt have those knows in a central app like now. they'd be very confused by having to configure these things in the IDE or some other environment. ive seen this a ton of times. also it would be different between many IDEs.
rawtazIMO the IDE could be turned into a control center for everything but the editing feature. but its also good to have that quick and easy editing, so there's really no problem with it being there.
dunz0rThat was the biggest reason I didn't get in to microcontrollers when I first started getting interested in electronics
rawtazmany newbies use it, after all
Rickta59but the Arduino IDE does that by avoiding what all normal ides do
dunz0rOverwhelming with all the programmers/AVRStudio and reading datasheets and everything.
rawtazsure, but it's an integrated package streamlining the experience when you're new to this :)
Rickta59there are other ways
dunz0rI did program some PIC in college... but it was such a hassle, compared to the turn-key-solution with Arduino
dunz0rNow though, I do "real" AVR-C with makefiles instead, because I got over that initial hurdle :)
dunz0rI think the fact that the IDE basically is Notepad with syntax highlighting is a good thing
dunz0rA "full" IDE seems, on first look, overly complex and messy
dunz0rWhich might just scare people away. It needs to be accesible :)
djphand probably scares people away -- I mean, arduino is kind of the "non-engineer's microcontroller"
djphhaha beat me to it dunz0r :)
IcePic"please add -march=avr168 -Og -fzomg-opts=99 to compile line before Blink.ino can compile"
IcePicarduino.user *= 0.01;
djphIcePic: o_O
buZz'when compiling fails, try it with sudo'
dunz0rI mean, have you ever tried asking a question in AVRFreaks as a complete beginner?:P
buZzi tried being in #avr for 5 minutes
buZz#neveragain
dunz0rbuZz: I hung around there for quite a while. #avr isn't very bad
dunz0rIt's a lot better than ##electronics at least.
buZzpoint on the devboard where the bad men touched you, dunz0r
buZz:P
dunz0rHaha
Rickta59when i first started with avr chips #avr was caustic
Rickta59but i was asking dumb questions
Rickta59:)
dunz0rRickta59: It wasn't awful when I frequented it last at least.
Rickta59this was 8 years ago
dunz0rBut sometimes some one would come in and be all "how 2 prgrm microarduino"
dunz0rAnd the channel would tear the person a new one, as is customary.
Rickta59but that is "classic" irc
dunz0rIndeed, ##electronics is a special kind of bad though
p0g0dunz0r: you had a bad experience there?
dunz0rp0g0: More than once, even though I know my shit.
p0g0I have several folks there on ignore, it helps.
dunz0rIf you're not a regular who yaps all the time the channel will assume you don't know what you're doing.
dunz0rWhich I am, most of the time at least.
dunz0rHmpf. God damn it
djph?
dunz0rACTION is looking to see if someone has made any IN-14 nixietube adapters
dunz0rThey have not. Have to make them myself it seems.
djphyay!
dunz0rdjph: Sort of yay, but mostly not. It's a "boring" board :D
dunz0rJust pins to other pins
dunz0rEasy though
deskwizard:| I wish I could say the same hehehe
dunz0rdeskwizard: What are you making?
deskwizarddunz0r: dummy load. Somewhere along the way, it fkin got out of hand lol
deskwizardCurrently at the "even if I make it work, I'll never manage to wire the thing" part of it
dunz0rdeskwizard: Haha, I know that feeling :D
dunz0rIt's difficult to not overengineer stuff
deskwizardman, tell me about it. I always get too many ideas for improvements lol issue is, I tend to have over-confidence in my own talent
p0g0I found great satisfaction in going from hand wiring to Kicad and cheap PCBs, I was drowning in bugs from the hand wiring.
tgagreets
deskwizardwhich is fkin ironic now that you think of it hehe
deskwizardo/ tga
deskwizardp0g0: yeah I should do that really, or at least make my own
dunz0rdeskwizard: Tbh, ordering pcbs is a lot less work than etching your own
Rickta59i'm at the point of thinking how to make something, figuring out i could make it and then coming to the conclusion i'd never even use it if i made it
dunz0rAnd is consistently good
dunz0rRickta59: So? Make it anyway, for the pure fun of it!
p0g0In hindsight, there is no question. I thought the learning curve would get me, but it is actually a Whole Lot easier.
p0g0Getting them made is Way Too Cheap too
dunz0rp0g0: Yeah, getting pcbs manufactured is waaay easier than etching
p0g0I'd have to drill hundreds of holes...
dunz0rSo many steps where you can fuck up with etching your own boards, and the drilling!
p0g0and do all the etching.
deskwizardpoint taken lol
dunz0rAy caramba, the drilling
deskwizardespecially with my handyman skills
deskwizardya know, the guy who ran out of wood trying to drill 6 holes in a line
deskwizardI know how now though. lol
dunz0r:D
p0g0So DirtyPCBs.com gets my work, 10 two layer boards for under $20 if you want slow shipping, about $40 with fast.
Rickta59all-pcbs seems to have decent deals and free dhl shipping
p0g0They'll panelize and do cut-outs and 1 side silk screening for that price too.
dunz0rAnd you can pick the board colour
dunz0rACTION is going to use dirtypcbs fro making the adapter boards for his nixie tubes
Rickta59http://www.allpcb.com/online_quote.html?hidLength=50&hidWidth=50&num=10&countNumer=10&txtSelNum=&Layersquote=2&Thicknessquote=1.6
p0g0uhm, 10 4x4" two layer boards, etc etc.
deskwizarddunz0r: just to give you an idea... https://i.imgur.com/mu6Z2Zj.png
deskwizardunrelated: any of you know if MCT6 optocouplers are fast enough for uart at like, 57600 ?
dunz0rdeskwizard: Hehe, you should see the schematic for my nixie-clock...
deskwizarddunz0r: must be quite extensive I bet hehehe
blathijsdeskwizard: Their datasheet should know? (I'm not familiar with them, so I don't)
dunz0rdeskwizard: Yep... 7 tubes, one BCD-to-nixie-decoder per tube, 4 shift-registers and an Atmega :D
ScrumpyJackjoin infinite
dunz0rMight even be 5 shift-registers....
pwillardyikes
dunz0rhttps://imgur.com/UR4gJ5e
dunz0rIt's not very messy though, because there's labels
dunz0rI love labels, so handy
redrabbitis there a good chan for robots here
redrabbiti want to build a waterproof bot with camera+wheels
redrabbitand control it over 3G
redrabbiti have made the power management for the rpi0w.. basically i want to add wheels on it
redrabbithard part is finding a waterproof solution
dunz0rredrabbit: Get a box, hot-glue box shut, boom?
redrabbitidk, im looking for something you can get back into easily
redrabbithotglue is a permanent solution
deskwizardblathijs: yeah, sure, I obviously never thought of that.
dunz0rredrabbit: There are boxes with seals that are waterproof
redrabbit+ there's moving parts with the wheels and camera
deskwizardthanks anyway uh :P
dunz0rredrabbit: Sure, but the wheels themselves doesn't need to be waterproof, they're just wheels.
deskwizardI'm sure I'll figure it out :)
redrabbitnot sure how you would water proof the wheels
redrabbitthey have to be connected to the motor
dunz0rredrabbit: The motors doesn't need to be waterproofed really
redrabbitah
dunz0rredrabbit: And are you sure you need ACTUAL waterproofing? As in dip in water?
redrabbitits gonna stay outdoor for months
dunz0rElectronics can survive pretty well as long as you cover it somewhat.
redrabbiti doubt it in that case
redrabbitcondensation
deskwizardcon-den-sa-tion
deskwizardlol where the f what that from...
dunz0rredrabbit: Even condensation isn't a huge issue
redrabbitits not gonna be powered 24/7
dunz0rredrabbit: Water-tight plastic-box for the electronics should do it really.
redrabbitdeep sleep most of the time
dunz0rLike a tupperware container or something
redrabbitsounds ghetto lol
dunz0rSure, but it works! :)
deskwizard^
redrabbiti dealt with outdoors disasters too many times
redrabbiti have "waterproof" boxes with rust inside
redrabbitsomehow moisture managed to get in
deskwizardwater is a bitch, it'll always get you hehehe
redrabbitno half assed solutions for this
dunz0rWhat I mean is that some moisture isn't all that, really.
deskwizarddefine that :P
dunz0rOr maybe don't make it waterproof at all... some ventilation holes so the moisture can go somewhere
redrabbitill use some hot pulse sealing machine for the electronics
redrabbitbut i need a solution for the wheels/camera
dunz0rThe wheels/motors doesn't really need to be waterproofed, imho
deskwizardthere's some 3M material made especially for that, lets moisture out but keep it "sealed"
deskwizardhell if I can remember the name of it
dunz0rDC motors can survive quite a lot of abuse
dunz0rI mean... electric trimmers and the likes doesn't have a lot of weatherproofing besides covers for their motors
redrabbitalso, after im done with that.. i want to make a submarine
redrabbitlol
redrabbitthat one better be waterproof
dunz0rredrabbit: Oh, I know how to solve the camera issue!
dunz0rredrabbit: Make a box with a transparent front!
dunz0rLike from plexi or something
redrabbiti have waterproof boxes like that
redrabbitthey dont have the perfect shape though
redrabbitthe plexi is on the cover would be ideal if it was on the sides
dunz0rIt took me a few years, but I've learned to not care about "perfect" solutions. You never get anywhere if you do
redrabbityeah im ok with a crappy solution while i work on the next better thing
redrabbitideal would be a box with 4 wheels sticking out and waterproofing
redrabbitmotors inside
redrabbitplexi on the front
redrabbitidk how youre supposed to waterproof around a moving part though
redrabbitprobably kind of silicone/rubber seal and some grease
Rickta59i think boats have figured that out
redrabbitsure i mean idk how i can do it myself
redrabbitanyway, 1st goal before i figure out waterproofing is to control 4 wheels from the rpi
redrabbithttps://i.imgur.com/OoDhfVd.jpg < atm im using this to control power to the rpi from the attiny85
dunz0rredrabbit: 4 motors + gearboxes, each motor sides connected in paralell, each side connected to an H-bridge, control H-bridge from RPI :)
redrabbithowever its looking like the mosfet is using a bit of current
redrabbitshould i add a transistor ?
redrabbitatm the attiny85 is powered from a second, tiny 500ma battery and it controls power from a big battery
redrabbitso the mosfet draws on the tiny battery
redrabbitif i add a transistor the mosfet would draw from the big battery
redrabbitdunz0r: is aliexpress a good place to buy this
dunz0rredrabbit: Probably, depends on your needs.
raphapwillard: you there?
pwillardI am
SchreaviousHi there
SchreaviousI would need your expertise regarding zigbee and arduino
pwillardgo ahead... just ask
SchreaviousI am using the 2 xbee modules, 1 arduino uno, 1 zigbee usb adapter and a Zigbee shield v03 which only has XBEE/USB switch
Schreaviouswhich only has XBEE/USB switch I have tried the xbee to xbee comm. and it works just fine
Schreaviousbut whenever I mount the Zigbee shield with the xbee module there will be no data displayed on the arduino's serial monitor
SchreaviousI am also looking for the manual/ tech specs of the xbee shield v03 on every websites but there seems to be none
Schreaviousasx
pwillardthere are numerous Zigbee shields... some actually share pins 0 and 1 and therefore have a switch to allow Arduino to PC or Zigbee arduino communications... but not both at the same time
pwillardSome just force you to share 0 and 1... and thats quite tricky for debugging
pwillardSerial interfaces like that are designed for 2 end points... not 3 or more... so there is "fighting" if you add a 3rd connection
pwillarddoes yours have an XBEE/USB switch?
pwillardand you can't find docs because SAINSMART sucks at documentation.
Schreaviousyes it has XBEE/USB switch
Schreaviousive tried using both switch but still no data
Schreaviousthey really dont have proper documentation on their products
Schreaviousi've been stuck on this about 2 weeks now -.-
pwillardwell, its actually not possible to SEND to the PC what the XBEE receives... the switch makes it mutually exclusive... as I explained about point to point connections
blathijsSchreavious: Try finding a schematic for the shield, then you know exactly how things are connected in which switch position
Schreaviousive been looking on their websites and visited every page but theres seems to be none
pwillardthe more correct way is to have an option that allows you to temporarily map the XBEE to alternate pins and use softwareserial for debugging.
pwillardI saw this shield and said "nope, not gonna work for me)
blathijsSchreavious: It could be that it is either XBee <-> USB, or Xbee <-> Arduino (e.g. it switches the RX and TX pins around).
blathijsOTOH, it would make sense to also have a Arduino <-> USB position for programming
blathijsSchreavious: You could measure using a multimeter
Schreaviousthis is the only shield available near me
blathijsand/or follow traces
pwillardThis is the shield I bought instead. http://shieldlist.org/seeedstudio/xbee-v1-1
Schreaviousits not available in our country sucks
pwillardI agree... you MIGHT want to do OTA updates with arduino... so the CORRECT design would let you do either SHARED 0 and 1 or employ software serial on alternate pins
Schreaviousi will try that blathijs
pwillardand that IS the way the switch works
SchreaviousI have also tried software serial instructed on this page http://www.science.smith.edu/dftwiki/index.php/Tutorial:_Arduino_and_XBee_Communication
Schreaviousgot the data on the serial monitor but once I mount the shield the data stops displaying
SchreaviousI'm sorry I dont really get it. it says here It can be used for programming or communicating with board which basic Arduino but without USB interface.
timemageSchreavious, i'm probably just going to retread everything here, but you get that pins 0 and 1 of the UNO are the hardware usart (Serial object), that these pins are carrying the same signals that show up in the Serial Monitor in the IDE right?
Schreaviousyes the rx tx
timemageSchreavious, okay. so you understand then that using attempting to communicate to a shield with them and to the pc at the same time spans the range from weird to impractical to impossible, often the latter.
pwillardits a point to point solution... you can't add a 3rd party.
pwillardhence the USB/XBEE switch on the board... you PICK one... the other won't work
timemagepwillard, well, there are some 'weird' things you can do. =)
pwillardyou... 1 talker... 2 receivers works... the other... doesn't
pwillardI meant YES
timemageSchreavious, makes sense, yeah?
timemagei'm going to take that as a loss of interest.
SchreaviousI know I cant make the pc and the arduino connected to the xbee at the same time I have read that there will be collisions
timemageSchreavious, pratically speaking you can't even have them connected at the same time.
timemageSchreavious, as they've pointed out, that's what the switch is for.
Schreaviousyeah I just want the data from the serial monitor to be displayed on the other end
timemageSchreavious, with the tutorial you showed, they don't have them both on 0 and 1. the breadboard a module with probably similar guts to your shield (level converters maybe, regulator) and wired it to other pins for use with software serial. you can do the same by not mounting your shield directly to the uno.
SchreaviousI'm sorry if I don't really know much about this
timemageSchreavious, that doesn't bother me. but if someone says something you don't understand you're better off saying so early.
SchreaviousI'm sorry I will check it again
timemageSchreavious, so, i dunno if this is what you want to do or not, but it is possible to do what is done in your linked tutorial. you have to *not* mount the shield directly. run 5v and gnd (and possibly others, not sure) and run pins 0 and 1 on the *shield* to pins 2 and 3 on the arduino, using SoftwareSerial like the tutorial does.
SchreaviousThank you I will try
timemageSchreavious, *if* the zigbig shield is passing pins 2 and 3 through *without* making internal connections to them, you could bend the shield pins 0 and 1 so they don't enter the arduino below. then insert a jumper on the top of the shield from 0 and 2 and from 1 to 3. that would get the same thing done, although mangling the shield a bit to do it.
timemageheh, zigbig.
Schreaviousthank you for your guidance
Schreavious. can i switch the code (2,3) to (0,1) instead?
SchreaviousI guess not
pwillardwhy not?
Schreaviousnothing comes out
pwillardYou find an example of how to use the softrwareseriual library... set that up with pins 2 and 3 and you are set to go.
tgaACTION is trying to figure out how to use a sht30 temp sensor with tasmota on a wemos d1
tgaanyone here happens to be familiar with tasmota?
xxoxxhi. is it possible to include header files from subfolders under project folder ?
pwillardhave you tried?
xxoxxi tried, doesn't work
pwillardthere you go
xxoxxboth in Arduino IDE, also tried to do it in Atmel Studio
xxoxxI wonder if there are work arounds through Atmel Studio
codahqwindows and are the subfolders in a readable location? (it may not work if the project sub-folders are under program files)
xxoxxin work copy location
xxoxxmy work copy are just samba mounts
xxoxxi rely on linux cli for all svn operations on work copies
xxoxxbut I enjoy working on the code through Windows GUI
xxoxxAtmelStudio is very nice
pwillardAtmel Studio is about a different programming paradigm that was not developed to behave the way the arduino IDE does. It assumes, initially that you want to code the AVR way (Normal avrgcc rules appy) and not the Arduino way. when you chose the arduino way... arduino recipes apply.
xxoxxthe middle ground is visualmicro
xxoxxatmelstudio does have issues... doesn't seem to allow relative path of projects within solution, which is annoying
pwillardThe AVR project for MARLIN (3d printing) has 341 files in the base folder and no subfolders are used by the compilation process. THeres your extreme example.
codahqyuck
xxoxxone work round might be packaging modularized code as libs
xxoxxlibs can and usually do live outside of project dir
pwillardThe IDE not a hardened code developers IDE and it is trying DAMN hard to not behave like a complicated developer tool on purpose.
pwillardyes, they can
tgaha, got it, i2c does not work if you read the pin next to it
xxoxxright.. hence the name "sketch"
codahq(i love visual micro btw)
xxoxxsame here. i love atmel studio in general
tgawhat about platformio?
tgaACTION is preparing to put two temp sensors next to each other
tgaI get the feeling I won't like the result
tga23.9° on the sht30, 15.1° on the AM2301
tgaACTION facepalms
tgawith humidity 29.7% and 49.1%
codahqyou should probably take the am2301 out of your mouth and read again.
tgamy mouth is slightly warmer than 15.1°
tgasoo what's a good way to calibrate temp sensors?
sibiriaa cup of hot tea
Lizards|Workuse known temperatures?
xxoxxactually you CAN include headers from sub folders
xxoxxit turns out
blathijsxxoxx: If you want to use subfolders in your sketch, it can be useful to put them below the "src/" subfolder, since only .cpp/.c files below "src/" are compiled (though you can also #include files from other subfolders IIRC)
tgawhat's a known temperature?
tgais it normal to have a 4 degree difference between sensors?
xxoxxblathijs: puting header files in subfolders under the main project folder; include them with "subfolder\header.h"
timemagetga, for something like that, dunno. for themocouples they often use an ice slurry basically.
xxoxxon windows, you had to use '\' rather than '/' and then it works fine
tgawell these are shields, I can't exactly put ice on them
tga"rf heating" doh
tgaapparently if the sensor is on a shield it's doomed to be too warm
timemagetga, right. best guess, you need to have another calibrated temperature sensor and then verify your other one against it. i know a couple here mentioned that the dht* sensors are kind of crap. worse so with humidity. and the am2301 is related somewhat, iirc.
tgaat least the am2301 is on a longer wire, outside the case
tgaso I tend to trust it more
tgathe sht30 is on a shield, right next to the controller and the wifi antenna
xxoxxdoesn't the atmega have an internal temperature sensor you could read ?
xxoxxmaybe useful for calibration ?
blathijsMost of them don't IIRC
xxoxxi vaguely recall at least the 328 does
tgaI don't think so, if I had one I wouldn't need the extra temp sensor
xxoxxhttps://gist.github.com/jenschr/1762b4784e1dcf11df146f928b92ca61
xxoxxtga: https://hackaday.com/2014/02/01/atmega-attiny-core-temperature-sensors/
tgaesp8266 here, pretty sure it has no temp sensor
SchreaviousI finally now made it work hehe thank you timemage and pwillard ;D I just realized how noob I am when it comes to this
drewmuttxxoxx: Wow, pretty obscure way to get that info.
xxoxxyeah it's one of those hidden away things.
timemagexxoxx, it's really not that well hidden.
xxoxxanother is 328 actually has a crude DAC
xxoxxwell if not hidden, maybe rarely used
timemagejust like the 'secret volt meter' page. not much of a secret. right there in the datasheet. it's also a fairly normal feature to have in an mcu.
xxoxxoften ignored
timemageyeah, often ignored is fair.
xxoxxignored or overlooked
xxoxxit's all there in the datasheet
drewmuttMaybe not hidden, but well.. writing "100111" to ADMUX isn't really "intuitive"
xxoxxbut esp8266 is different story; the documentation has "secrets"
timemagexxoxx, yeah, although the internal temp sensor isn't that great.. usually isn't.
xxoxxmaybe useful more as a trigger, than a measurement
drewmuttTurns out the esp8266 is a multicore ARM Cortex-A9, just hidden behind some secret register assignments. shhh..
xxoxxanybody had read the datasheet for say a modern desktop PC processor? I wonder what it's like.
xxoxxI vaguely remember having a physical copy of 486 datasheet back when ...
timemagexxoxx, iirc, they're broken down quite a bit now, like arm datasheets.
drewmuttI wonder if those are even publicly available.
cehtehi have the intel datasheets here, lots of books
cehtehintel once send them for free .. and fast
timemagedrewmutt, they always had been.
drewmuttACTION shrugs
cehtehone day orderd, two days later arrived in a big box .. from usa to germany
cehteh5 thick books :)
drewmuttGeneral question, if I wanted a job doing Arduino-ish stuff all day, what industry is in on that? I'm kinda guessing prototyping / IoT
akk"embedded systems"
akkthough usually that's lower level stuff than arduino.
drewmuttYeah, I mean anything cortex / atmel I'm comfortable with
drewmuttBut that's a great search term, lemme give it a shot.
Max___Hello, i have a LED Matrix and i want a raindrop code for that. There should be 2 or 3 raindrops simultaneously with a check if these are +1 -1 or 0 columns away from eachother. But i can´t figure out how to check that. It wouldn´t work with switch/case and an if.. would be a very long code.Is there a clever way to solve that?
Max___i can show you what i already have
Max___(it´s a LED Matrix Shield)
drewmuttMax___: Is the raindrop at a random column?
Mikeeeyou can just do logical shifts on the row pins
Max___yes the both are. int ya = random(0,8);
Max___and the same for yb...
Max___Mike but still i would have to check first if they are near to eachother. Otherwise they shift into eachother.. right?
drewmuttIf I understand you correctly, can't you just do yb = random(ya, ya + MAX_COLUMNS)%MAX_COLUMNS
MikeeeMax___ ah yeah if you're using a shield you wouldn't have control over that
Max___drewmutt: that´s a good thought, thank you. now i have to check if it still works when i put a higher number than columns in the code
drewmuttI mean, that snippet isn't exact, but that's the gist.
Max___int yb = random(ya + 2, ya + random(7)); made it like this now
drewmuttSeems reasonable, well, until "ya" is toward the right, and it returns a value that is beyond your column count.
drewmuttHence the modulus biz.
Max___Somehow if the number is higher than the columnnumber it starts from 0 again
Max___Don´t know why but it works
drewmuttHm.. perhaps your lib handles that.
Max___Think so too
Max___Otherwise i would have to check that every time
Max___now i have to figure out how i make them drop not at the same time
drewmutttimeLastDrop = millis(); if(millis() - timeLastDrop) > TIME_PER_DROP { timeLastDrop=millis(); launchOneDrop(); }
xxoxxis local variable in ISR a good practice?
drewmuttSome crap like that.
xxoxxor should ISR only access global variables ?
Max___thanks but i think i will go with a check for if the first dot is between the 2nd and 8th row to start the second drop
drewmuttThat works too.
xxoxxnot much job opportunity doing atmega stuff though
drewmuttI could work for Atmel :P
xxoxxI don't know if Motorolla still make MC6800 stuff
xxoxxused to be pretty popular before rise of Atmel or even Pic
Flea86isn't 68HC08 compatible with 6800? I've no idea..
xxoxxyeah that's what i mean. 6808
xxoxxbeen so long ...
Flea86heh yeah, for me too