sam_which directory should I save "ardublock-all-20130712.jar" to? (I am a Ubuntu user)
timemagesam_, what is that?
sam_I am not able to launch ardublock from arduino IDE
sam_I copy the "jar" file to ~/Downloads/arduino-1.8.3/tools/ArduBlockTool/tool/ but it didn't work
sam_then I copy the file to ~/Documents/arduino-1.8.3/tools/ArduBlockTool/tool/ but it didn't work either
timemagesam_, i've no idea what that is. but i can tell you that java normally looks for things in the class path. the class path is determined by the script the launches the arduino ide. it could also be loaded by path, in which case there will be something else that mentions where it is explicitly, a config file or some such.
sam_it seems quite complicated. I have decided to give up. Anyway, thank you for your help
timemagesam_, so, i guess it's basically scratch for arduino.
sam_are they the same?
timemagesam_, same sort of idea.
timemagesam_, http://blog.ardublock.com/engetting-started-ardublockzhardublock/ these instructions are telling you to put it into a directory under your sketchbook directory. not under the arduino ide directory tree.
sam_where is the sketchbook directory located?
timemagesam_, those instructions also tell you that.
sam_ok, let me check the website. thanks a lot
JK-47Anyone have any recommendations on USB power banks that dont shut off on them? Or should I just build one out of an 18650 set and boost circuit? (not preferred)
timemageJK-47, might be easier to build a load that pulses on occasionally to reset their timer.
JK-47The load will be LEDs or ELwire inverter so itll always be on.
timemageJK-47, huh. so you have a power bank that just shuts off regardless?
JK-47a few
JK-47anker, some no names.
tawrweird
timemageheh, i was going to say odd, but weird works too =)
tawrsadly my favorite usb powerbank
tawrits a thrunite c2, single (removable) 18650, 3A output 2.5A charge, comes with a protected panasonic ncr18650b 3400mah for 15 bucks on amazon
tawrbut, low draws make it shut off :(
sam_Dear timemage - I am able to launch ardublock now. Thank you very much for your instruction
timemagesam_, someone else wrote the instructions. i just got you to read them. =)
shbrngd0saying RTFM in a convincing and tactful way is a very good skill. well done!
tawrespecially when the question being asked is a day1 arduino skill, i was impressed
tawrthen again, timemage is awesome
HighInBCI made a 50mA dummy load to keep my USB bank from turning off
tawrmine needs like 1a lol
HighInBChow annoying
HighInBCI found mine turns off at 45mA but not 50mA
kandawould someone be so kind as to give me a bit of a summary of comments on what is happening in this piece of code https://pastebin.com/17sUtyz5
kandaor *
IcePicso which part is confusing you?
IcePicthe math or the iic read or the type cast?
kandasorry, here is a version that includes iic_read function
kandahttps://pastebin.com/J6q9hzV2
kandawhat is confusing me is the operations in bme function and the type_cast
kandaI get a bit lost in the bitshift
IcePicso print out intermediate values and see that they are as you expect them to be?
kandaoh okay, thats a good idea
kandais there an easy way to print these kind of data types ?
IcePicperhaps the cast should be outside the whole expression after Bme.P
IcePicseems like you cast only the first value
IcePicwhich may or may not work, depending on promotion rules and all. But it's the only thing that looks like an issue
kandaPressure is actually the only variable I dont care about if that matters at all
kandaso I can do without it if it helps
IcePicno, go with debug printing first
kandaokay, do you know how I can print a uint16_t
kandaI currently get values that jump around like this https://pastebin.com/Jak7BsWH
IcePicSerial.print() springs to mind
kandayeah Serial.print doesn't seem able to handle these kind of variables
dan2wikI don't think Serial.print has handlers for an array of uint16_t
IcePicI don't want to go all OCD on you, but "how to print a uint16_t" is simple with Serial.print. To print members of an array, feed one at a time to print.
IcePicso from the first paste, there is a bunch of math to get various 8 bit stuff into a 16 bit, there I suggest printing those out before and after just to prove to yourself you are on the right track, then the 16 | 16 -> 32, print before and after
IcePicso you are sure you know what gets stuffed into the various Bme.* placeholders, and what go read from the iic function.
IcePicwhat got*
kandaokay
kandaI thought uint16_t was just an int
IcePicit is just an int
blathijsActually, it is an "unsigned int" on AVR. On other CPU architectures, it could be different (e.g. on x86 "unsigned short" is uint16_t IIRC)
IcePicyes, but its not an array or anything, as per dan2wiks comment
kandaanother small thing: I am running i2c_scanner
kandawhy does it sometimes just print like this " I2C Sca" and then stop
IcePickanda: that would also be somewhat impossible to answer from remote, without knowing all of the code and the environment around your i2c bus
railhHi. I have arduino uno r3 and this motor shiled https://www.banggood.com/L298N-L298P-4A-Dual-Channel-Motor-Driver-Module-Motor-Shield-R3-For-Arduino-p-1080161.html?rmmds=buy connect a actuator and power supply 12v 5 a. My question is: if i connect it to my PC via USB will is fry my pc usb port or motherboard.Thanks
IcePicthat would depend on how you connect it. A good idea might be to get a powered usb hub in between, so IF anything is to burn, it will be a $10 device and not your computer
railhSo is it safe to conecnt with when and extrernal power supply is connect to the motor shield
IcePicwithout seeing your complete schematics, it will be hard or impossible to tell if it is safe or not
railhI simple stuccked in my motor shield to the arduno and conected the actuator to to vin and ground and + and - my acctuator thats it
railhi have a powered usb hub
railhpower supply to vin and ground
_JordanHey guys! I wondered if someone can help me with an arduino question?
railhI simple stucked in my motor shield to the arduino and connected the power supply to VIN and GND and my actuator to + and -.Thats it, is is safe to connect to pc so i can upload my code.Thanks
blathijsrailh: The Arduino Uno automatically disconnects USB power when power is applied on Vin or the DC jack, so it is safe to connect both at the same time (provided Vin is high enough, > 6 or 7V IIRC)
railhThanks for the reply balthijs, my power supply is 12v 5a
railhTechnicllay i have this motor shiled https://store.arduino.cc/arduino-motor-shield-rev3
railhbut i have a copy
railhhttps://www.banggood.com/L298N-L298P-4A-Dual-Channel-Motor-Driver-Module-Motor-Shield-R3-For-Arduino-p-1080161.html?rmmds=buy
blathijs12V should be fine (though make sure to not power too much things off the 5V lines of the Arduino, since the 12V->5V regulator will generate quite some heat (depending on the current drawn)
railhI have only this actuator connected to it
railhhttps://www.banggood.com/DANIU-200mm-Stroke-750N-Load-Mini-Electric-Actuator-Linear-Tubular-Motor-Motion-12V-DC-p-1103447.html
blathijsrailh: That's not connected to the 5V line, but the 12V line, so that should be fine (the current does not pass through the regulator)
blathijsSo you probably only have the Arduino itself, and perhaps the logic part of the motor driver, connected to 5V which should not be too much either.
railhI just simply connected the motor shield to the arduino, do need i need to cut some pins ?
railhthe actuator is 12v 2a
blathijsrailh: Why would you cut pins?
railhim new to this just asking
railhso its safe to connect to my pc to upload the code
blathijsI think so, yes. Not guarantees, of course :-)
railh:P
railhthe power suplly is connect to vin and ground of the motor shield
railhand actuator to terminal A + and --
railhshould this provide 12v to the actuator or will it be shared bettwen the actuator and arduino
blathijsrailh: I would suspect that the VIN of the motor shield is connected to the VIN of the Arduino, but you should probably check the schematic to be sure
railhyes vin of the motor shied is vonnected to the vin of the arduino
_JordanWhat are the pinout comparisons for PWM pins on the mega 2560 and the arduino UNO? for example digital pin 10 (PWM) on the arduino mega 2560 is which pin on the arduino UNO?
_JordanI'm breadboarding my own IC chip (Atmega328P-PU
IcePicthe pin numbers on the board are sort of "inventend", so on the AVR it will be pin 1-8 on port A,B,C.. and so on, where the 2560 has many more ports than a 328
IcePicinvented*
IcePicthe arduino code translates ping 13 to whatever it really is, like pin 5 on port B or so
buZzpin*
IcePicso it could be pin 3 on port D on a 2560, but the code will fix that for you since you choose for which board you compile your code
IcePicyeah, sorry.
_Jordanis the port PCINT?
blathijs_Jordan: Find the standard/pins_arduino.h and mega/pins_arduino.h in your Arduino installation folder, that's where the code figures out the pin mappings.
IcePicand datasheets
IcePicto see which trigger INT vs PCINT
_Jordanblathijs I've got my code. but i've recently switched from a MEGA (way to overkill for one stepper motor). to a Arduino UNO (ATMEGA328p-pu) And I wired it up the same, and noticed that PWM on pin 8 is not the same for the UNO.
railhyes vin of the motor shied is vonnected to the vin of the arduino
_JordanI wondred if anyone can help me find the difference,
IcePicits somewhat confusing to me when you talk about the uno, since you are breadboarding it yourself, if I understood this correctly.
_JordanYeah, sorry the reason I call it an UNO is because thats the board I use when choosing a board in the arduino IDE.
_JordanI have run a successful blink test
IcePicor rather, when you say "pin 8", do you mean pin #8 on the avr, or what the Uno would mark as 8 on their board
IcePicthose two are probably not the same at all
_JordanI believe that digital pins are the ones I am talking about
IcePichttps://www.arduino.cc/en/uploads/Main/Arduino_Uno_Rev3-schematic.pdf
IcePicthat one shows how the AVR -vs- arduino markings are done
_Jordanare the numbers to the side, digital or physical pins?
IcePicPD7 (port D, bit 7) goes out on leg #13 and is marked as pin 7 on the arduinoboard, and would be set with digitalWrite(7, HIGH);
blathijs_Jordan: There's three types of numbers for a pin: The physical pin number in the DIP package, which isn't often used. The logical AVR pin number, indicated as e.g. PB1 (port B, pin 1). And the logical Arduino pin number, which is just a plain int (or Ax constants, which map to higher pin numbers)
blathijs_Jordan: IcePic Just provided nice examples of these three pin types as well
_JordanOkay thanks guys, I'll have a look at that graphic
_Jordanokay new issue. I messed around in tools and now my arduino isn't uploading sketches please help haha
railh Ok coonected to pc actuator works superb now if i go bellow 255 i hear a whine, I heard there is a registry hack to elminiate whine
[itchyjunk]Hello, i know nothing about circuits and what not. Hoping to learn things by just handing around here. :)
[itchyjunk]hanging*
HighInBCif you are the type to learn by reading then you will learn lots
HighInBCI have to do and fail a few times before I get it
[itchyjunk]I feel like I like the `ideas` of stuff but never end up doing any of it..
[itchyjunk]Being in ##physics and ##math has kept me motivated to do homeworks and stuff.
[itchyjunk]So I figured maybe that will also be true for stuff like this. So I joined ##hamradio as well.
[itchyjunk]The idea of having to get a license gives me anxiety though.. so not sure about that.
baldengineerthere is also ##electronics
baldengineerfar more active than here
Twist[itchyjunk]: This is a physical sport. You'll need a few components to play around with.
[itchyjunk]Yes, I saw some starter packs that comes with the board and few other things.
[itchyjunk]I just wanna be sure I wanna invest before I do. :P
[itchyjunk]also, i'll join ##electronics, thanks
TwistThey're mostly hugely overpriced, but do save time.
[itchyjunk]Ah, really?
[itchyjunk]I was using the `bundle hence cheaper` logic..
TwistAnd that's a lot of electronics and computing right now, actually.. if you have more time than money, you can scrounge up nearly everything you need from discarded gear.
[itchyjunk]That sounds.. like a lot more fun...
[itchyjunk]To be able to get parts out of discarded gear...
[itchyjunk]:D
[itchyjunk]I think i'm looking at some random guys projects : http://vwlowen.co.uk/arduino/index.htm
Twist[itchyjunk]: Bulk discounts on components are substantial. Things sold at $5 for 2 in consumer packaging are often under a cent when purchased in the thousands.
[itchyjunk]Yes, that makes sense.
Twist[itchyjunk]: So you're paying for someone to pick parts and put them in a shiny box
TwistAnd probably paying the marketing department
[itchyjunk]ah
Twist[itchyjunk]: Where in the world are you? (city. I don't need directions to your house.)
[itchyjunk]How does one look more into shit scrounge up thing you mentioned?
[itchyjunk]SLC, UT
Twistthere's gotta be a hackspace there.
[itchyjunk]usa
Twist*clickety*
Twisthttps://wiki.hackerspaces.org/Utah
[itchyjunk]I saw there were some.. i didn't wanna show up when i know absolutely nothing about electronics
Twistoh yeah
Twist[itchyjunk]: absolutely show up knowing nothing about electronics.
[itchyjunk]lol
Twisthackspaces are just nerdy social groups.
TwistLooks like there are actually two in town
Twist[itchyjunk]: one common pattern at such spaces is a weekly meeting open to the public
[itchyjunk]I think its the 801 i had looked up before.
[itchyjunk]Twist: ahh
Twist[itchyjunk]: and it looks like Make Salt Lake and 801 Labs have their meetings on different nights. That's nice.
TwistAround here, every damn group meets on Tuesday. It's frustrating.
[itchyjunk]:D
[itchyjunk]they have a channel here on freenode they claim
TwistTry it out. If you're into learning/building things and at all autodidactic, they are probably your peoplel.
TwistOr people. One of those.
deshipuTwist: all hackerspaces always meet on Tuesday, it's a tradition
[itchyjunk]#dc801 has 900 people :s more than i expected.
[itchyjunk]doh 91
Twist[itchyjunk]: Also, you have a Fry's in town
[itchyjunk]Whats a Fry's?
Twist...I"m wrong on that
[itchyjunk]ahh
Twistgoogle.. why U return irrelevant results
[itchyjunk]Is it really cheaper to purchase stuff in store than online though? :s
Twistno
[itchyjunk]ACTION thought electronics was generally cheaper online
[itchyjunk]ah ok
Twistnever
deshipubut it's often faster
TwistBut sometimes you want things right meow.
deshipuand you see what you are buing
deshipubuying?
[itchyjunk]Not me. I purchased a $2 mp3 player but looks like it uses some other type of jack 'TF 2mm' instead of '3.5mm' i generally use
[itchyjunk]and the adapter is $5 :P
[itchyjunk]ACTION doesn't know what to do with said $2 mp3 player now
deshipuopen it up, remove the socket and solder the headphones directly
TwistThat sounds like the old cellphone audio jacks
[itchyjunk]ah i'd love to learn to solder too
deshipujust watch the first youtube tutorial you find
deshipuand remember to use flux
[itchyjunk]K, 12 mins. doing it now
Twist[itchyjunk]: these guys seem like they're more into electronics and hardware than 801 labs. https://makesaltlake.org/tools/
TwistPossibly they just have a better website.
Twisthttps://www.meetup.com/MakeSaltLake/photos/
[itchyjunk]hmm
[itchyjunk]lead solder for wires
[itchyjunk]there i learned something ;P
Twistlead solder is not for eating.
TwistNow you know two things.
timemage[itchyjunk], they're suggesting leaded specifically for wires?
[itchyjunk]https://www.youtube.com/watch?v=Zu3TYBs65FM
[itchyjunk]he said silver is for pipes and sheeets
[itchyjunk]unleaded is good for env but not that great
TwistI have watched 3 seconds, and I already hate this man.
[itchyjunk]he said both leaded and unleaded works for wires
[itchyjunk]lol that was the first youtube vid for solder
Twist[itchyjunk]: https://www.youtube.com/results?search_query=learn+to+solder
NicoHooddoes anyone know if fastled works with the arduino leonardo and neopixel? because for me it does not, but on the uno it works.
NicoHoodhttps://github.com/FastLED/FastLED/issues/492
Twisthttps://www.youtube.com/watch?v=J5Sb21qbpEQ
TwistThere we go.
TwistIf you don't find Dave's voice annoying. :D
timemage[itchyjunk], there's a 'curious inventer' video that's good iirc. there's also an old pace systems video that goes over a lot.
[itchyjunk]lol that tshirt
deshipuit's not the voice, it's the intonation
[itchyjunk]i only give negative feedback
TwistThere are lots of gurus out there. It's important to find people you like.
deshipupeople are made of meat
deshiputhat's unhygienic
TwistIt's okay. They're not part of my diet.
TwistMuch like solder.
deshipugood, you don't know where they've been
deshipuand what they ate
timemage[itchyjunk], yeah, like he said, they'll both work fine. out of the two, it's really the melting point that makes the difference in how easy they are to use.
[itchyjunk]i see
deshipualso, rather use a pencil soldering iron, not a pistol one
deshipufor small stuff
timemage[itchyjunk], i'm skipping through the video you linked, so far as i can tell it's all good info. don't really feel like watching the whole thing now though.
[itchyjunk]yes the gun one looks expenssive
Twist[itchyjunk]: Anyhoo. You can buy yourself into the poorhouse trying to start up with this hobby solo.
[itchyjunk]yeah.. i can tell $_$
Twist[itchyjunk]: A decent hackspace will have all the tools lying around, and probably piles of components and electronics scrap
timemage[itchyjunk], good thing is these tools are not that uncommon. odds are you know someone that would let you borrow them. maybe even show you how to use them.
baldengineerand plenty of grey beards to tell you how circuits used to be done better
TwistMore importantly, they can tie it all together for you.. It's fun watching people go from blinking an LED with an arduino to controlling a 3d printer with one in a single evening.
[itchyjunk]i think there is a club in the community college i go to as well.. they might have soldering tool i could borrow
baldengineerWhen working on a circuit at a hackerspace, always be ready for unsolicited feedback. It is usually annoying. But if you listen carefullly, you'll learn really important tidbits
baldengineersometimes that tidbit is, don't ask bob a question. ;)
[itchyjunk]lol
TwistSure... but they won't be open 24/7, and they'll get pissy if you have a beer while you work.
baldengineerAlso, don't drink beer while learning to solder
Martin`I need to solder something really small :(
Martin`just some cables to it :P
baldengineerwait until you have a few thousands of hours of experience and are a master at soldering. it makes the burns more meaningful
[itchyjunk]ofcoursee not, ill chug it before i start
Martin`but last time I tried I connected all the connectors to each other
timemagebaldengineer, heh
baldengineerMartin` i've actually found a beer to help steady the hand a bit. any more than that and it's just as bad as drinking coffee
Twistheh.. my solder burns never seem to involve alcohol. It's always in the middle of a 3AM push to get a project done before demo day
Martin`:P
baldengineerTwist just as bad ;)
Twisthaste and exhaustion. lovely combination.
Martin`wanted to test something with lorawan
Twist[itchyjunk]: aanyhoo. Back to the practical advice section of the discussion
Martin`so i've ordered an RN2483, but hard to connect some cables to it :P
baldengineerMy biggest mistake was so soldering large through-hole components on a control board for a Tesla coil. I thouoght "oh this is easy, I can drink beer while doing it." I went to bed assuming I'd inspect the joints in the morning. I woke up assuming I did it the night before. I shorted line to neutral on one of the IGBTs. clear as day when I looked at it, but it was too late.
Twist[itchyjunk]: https://learn.adafruit.com/ has great starter tutorials on everything
[itchyjunk]i've lurked there a few times
baldengineer[itchyjunk] I do a series of intro videos that might be helpful. youtube.com/addohms
[itchyjunk]ACTION almost purchased a raspi even
baldengineer[itchyjunk] except #3. my least favorite
[itchyjunk]lol
[itchyjunk]ACTION checks out #3
baldengineer[itchyjunk] wait no, #4. it was the last one I did without writing a script
[itchyjunk]oh you start off with the symbols and stuff?
[itchyjunk]ACTION thinks he'll need that stuff for PHY II next semister
baldengineer[itchyjunk] actually yes.
[itchyjunk]For that mp3 player that needed the 2.5mm , is opening it up and sodering a 3.5mm directly to it an actual solution?
[itchyjunk]:s would that just work?
Twist[itchyjunk]: If you don't break it in the process, yes. That board might be all surface mount soldering though.
[itchyjunk]the whole player is smaller than my thumb size :P
[itchyjunk]and has no internal memory, works with TF card which is same size as SD i found out on research
TwistAFK a bit.
TwistACTION toddles off
grokkingStuffhi there!
[itchyjunk]hey
grokkingStuffis it possible to connect a display to an arduino mini? Can't find much documentation out there.
timemagegrokkingStuff, if by display you mean an led, why yes, yes you can. =)
grokkingStuffsweet. how about a multiplexing scheme? Not sure how to implement that with an arduino
deshipuanything that works with any other microcontroller should work here too
timemagegrokkingStuff, really you can hook all kinds of displays to it. i was hoping you'd be more specific.
grokkingStufftimemage: I just need a cheap display to show letters. monocolor works
akkmultiplexing scheme seems kinda nonspecific too, that could mean lots of things.
akktimemage: I'm using a 2x16 LCD I2C display for the project I'm working on right now, cheap and fairly easy to get working.
timemagegrokkingStuff, if you're not that picky you may want to work backwards from support libraries, see what models they support. if you want colored text you're probably looking for a graphic lcd or oled display.
akksorry, grokkingStuff, not timemage
grokkingStuffakk: sweet, thanks
grokkingStufftimemage: good idea!
grokkingStuffwill do that now.
timemagegrokkingStuff, adafruit makes a popular display library, which supports their stuff and a bunch of clones.
akkDefinitely check for tutorials before buying any specific display. Some are easy to use, some are hard.
grokkingStuffneed to connect eight switches plus a few more to the arduino which is why i mentioned the multiplexing scheme
akkThere are multiplexing boards you can buy that talk I2C or similar protocols. Should work but I haven't used one myself.
deshipugrokkingStuff: the HT16K33 LED driver also handles keys
grokkingStuffdeshipu: keys?
deshipugrokkingStuff: it can scan up to 16x4 keys
deshipubuttons
grokkingStuffoooh, that's handy. seems like it's exactly what i need.
deshipuit can also drive two 8x8 led matrices
deshipuor one bi-color one
grokkingStuffhmmm, but i'm looking for something small.
grokkingStuffi don't mind if i have to make switches so that the display i use is small
deshipuhow small and what do you want to display?
grokkingStuffenough to show two-three lines with sixteen+ characters on each line
deshipu8 buttons could be also done with an analog input and a ladder of resistors
cehtehbonus points when you make that interrupt driven
grokkingStuffabout the buttons, the buttons need to be pressed together at the same time
grokkingStuffit's either on or off
grokkingStuffto submit a password, i need all required buttons to be pressed
cehtehhuh?
cehtehthat doesnt improve security over pressing them in sequence and is only a bad user interface
cehtehand programmatically not so easy because the user wont press buttons at the exact same time, you need some timeouts and settle for a stable value to register it
grokkingStuffcehteh: hmmm, true. i could change that.
cehtehfew buttons might be modifiers like shift or ctrl key does, but notice that order matters you cant press 'h' first and then 'shift' to get 'H' for example on a normal keyboard
grokkingStuffgive me a sec to figure it all out. brb
cehtehyou may require multiple buttons pressed in sequence
plutonikHi, I don't know much about electronics, are batteries, wires and resistors considered electronics component?
Mikeeeyes
Mikeeewires are conductors, resistors are conductors with set values of resistance, and batteries are voltage sources.
plutonikOk, what's the difference between electronic component and electrical component?
YotsonThe size of the sparks you can make with them. :)
plutonik:)
plutonikSo electronic deals with small current and voltages?
Peppernrinonot necessarily. cars and computers both use 12v.
plutonikOk' thanks
baldengineerthere isn't a clear distinction
Peppernrinoi think electronic might have something to do with transforming the energy out of electrical current into some usable format, like an led display.
baldengineerthat's like asking if fruit is considered food, then what are nuts?
Peppernrinoand electrical is just the base energy.
plutonikHahahaha
Peppernrinosome nuts are legumes. ;)
baldengineerpart of my point ;)
Peppernrino:D
plutonikI'm sorry I just ask some times stupid queestions
baldengineerlike all well established disciplines, many terms get overloaded or just flat out used incorrectly
Peppernrinolike "jailed".
plutonikI'm a telecommunicaftions engineer and we never studied in college electronics. It's a shame
Peppernrinodamn shame. :(
Mikeeei would suggest youtube
Mikeeeif you want to understand electroics, find a youtube series
Mikeeebuy an arduino, start wiring shit up.
Mikeeetelecommuications engineering means you already fully understand communications protocols, which means you can jump into interesting arduino projects
Mikeeeafter only a few weeks of tutorials, that is
baldengineerwith the vast amount of tutorials, cheap components, and tools like arduino. there really is no reason to waste time studying in school, unless that is your focus
baldengineersorry to analogy again, it's like saying "it's a shame I didn't learn latin in college." Yes, it is a shame. But it isn't an excuse.
plutonikMikeee, that's what I intend to do
baldengineeryou'll *learn* much more when you apply a skill to something you care about
Mikeeeor something you can brag about
Mikeeemy favorite method is having people build their own lab equipment. That way they fully understand it and when they're done, they have lab equipment to make the next build easier
baldengineerthat's a fine method if your goal is to learn how to build lab equipment
Mikeeewhat an ignorant thing to say
baldengineerno, a formal "you have to learn this first" method is ignorant
baldengineerthere are always building blocks and steps that have to be taken, but the end goal needs to be factored into the development of that path
Mikeeei feel you're creating a situation where you want to be hostile/assertive using ignorant misinterpretations
Mikeeei don't want to be part of it so i'm opting out. have a wonderful day
baldengineerHuh. Some might say asserting "you're ignorant" and then not listening to a response might be the very foundation of ignorance.
ozzzysounds like it
baldengineerbut is usually how conversations with them goes
ozzzybut then... I wouldn't hire someone that says 'I can make an Arduino get up and dance' unless a dancing Arduino was the goal of the project
ozzzyand I wouldn't hire a kid that says 'I'm a great coder' just on their word.... I'd say 'bring me your transcripts, any papers you've written and a list of what you've done'
baldengineerIt's more like "Yes, we'd like to hire you as a C++ programmer. Please demonstrate your mastery of machine language first."
ozzzythat's quite odd
baldengineeror back to the original conversation: "I want to learn to make an Arduino library." with a response being: "learn assembly language first."
deshipuyou really like to beat a dead horse, do you?
baldengineerdeshipu how dead is it? can you define dead?
baldengineerj/k
deshipuon a scale from 0 to 9, 7
Inari-So not dead enough
deskwizardyep, still has life in it, keep beating
deskwizard:P
deshipusingle-celled, mostly
plutonikSorry, disconnection issue
petzupanyone have some ideas how to find solution for D12(MISO) problem on multiple SPI programmers?
baldengineercan you explain the problem first?
petzupW5100 and RC522 doesn't want to work together, w5100 works but rc522 doesn't
baldengineerwhat does "doesn't work together" mean
petzupRC522 isn't recongized
petzupW5100 works but RC522 doesn't, if i unplug power supply or MISO from W5100 than RC522 is recognized
baldengineerdo they have their own chip select pins
baldengineerand do their library support them
petzupyes
petzuphttps://pastebin.com/BxF8mExJ
petzuphere is my code
deshipuyou didn't connect both to the same cs?
deshipuah, the code says no
deshipupetzup: do you have a logic analyzer or an osciloscope available?
petzupdeshipu, logic analyzer is software on PC? idont have osciloscope
baldengineerlogic analyzer is a type of test equipment. like oscilloscopes, there are PC based versions, but still require some form of external hardware
petzupyeah, dont have them soo no way to check it... any other ideas?
petzupis digitalWrite(PIN_NUMBER, HIGH); for turning on PIN or turning OFF?
deshipuneither, it's for setting it high
deshipuI guess off would be high impedance
petzuphttps://pastebin.com/39iBvbzf
petzupis in this code anything wrong?
baldengineerare you using a Leonardo or 32u4 based board?
baldengineerThis is bound to cause problems: Serial.println("Before: RFID: " + String(digitalRead(RFID_SS_PIN_MFRC522)) + " | Ethernet: " + String(digitalRead(ETHERNET_SS_PIN)));. do them as individual Serial.print()s and don't cast to String
baldengineersame with 37
baldengineerif you aren't using a Leonardo / 32u4 based board, delete 4-7
petzupbaldengineer its only for output
baldengineerwhat is?
petzupwait 4-7 aha ok
petzupdeleted
petzupanything other?
baldengineeryes, 18 and 37. get rid of the String and concating you're doing. make it individual print statements
baldengineeryou're thrashing the stack for no reason. on this code it probably works okay, start running low on RAM and you'll introduce really tough to find bugs
petzupok i remove those lines
petzupwhat could i do next?
baldengineershrug. i have no idea what you think the problem is
baldengineerprobably better to start with that
petzupbaldengineer, i have w5100 and rc522 if i use them seperatly every card works if i combine them, they doesn't work together
baldengineer but what doers that have to do with the code you just posted?
baldengineeranyway, i'm going to eat lunch. hopefully someone else can help
petzupi have no luck with help at all, don't find solution in 14 days, thats really frustrating
deshipu14 days sounds like enough time to find the problem yourself
petzupdeshipu i know what is problem but don't find solution
deshipuso "what is problem"?
petzupW5100 and RC522 won't work together, RC522 isn't recognized
deshiputhat is not the problem
deshiputhat is the symptom
petzupokey those are symptons, but doesn't find solution for those symptons
deshiputo find the solution you need to find what the problem is exactly
petzupi think MISO (D12) is problem
deshipuwhat makes you think that?
petzupif i remove MISO from W5100, RC522 is recognized
petzupi mean if i remove wire which is connected to MISO
deshipuok, that's something, so what is wrong with that miso pin?
petzupdon't know, looks like eth shield become master and don't share MISO pin with RC522
deshipuin your code, why are you setting both SS pins low at the same time?
petzupdeshipu, that is my current code https://pastebin.com/W0FuwZQh
deshipuhow are you telling those libraries which pins to use as SS?
timemagedeshipu, pin 8 and 10 iirc. he'd posted the full code a while back, a week ago or whatever.
deshipupetzup: I would check if your shields really release the miso pin when their ss pin is pulled high
deshipupetzup: you can do it with a multimeter or a LED or something
deshipupetzup: if that works, I would use the same method to make sure the SS pin is really set high when the library doesn't use it
petzupdigitalRead gets same data or no?
deshipuwhat?
petzupdigitalRead(PIN) doesn't get data about PIN if its high or LOW?
deshipuit does, when that pin is in input mode
petzuphttps://www.arduino.cc/en/Reference/DigitalRead
deshipuit tells you nothing about whether it's being pulled low or high from external source when it's in output mode
petzupok so i need leds for that or some volt meter
deshipugenerally debugging things without any way to measure stuff is very hard
deshipuyou can buy a logic analyzer for $5 from China
deshipuit's surprisingly useful for debugging such problems
petzupi have volt-meter how should i now mesure pin? negative on GND positive on Pin number?
timemagepetzup, in a round about way you have a volt meter now. or at least as good as you need. you have the adc on the arduino itself. though, really you should buy a meter.
timemagepetzup, yeah, that's generally how you take voltage between two points.
deshipuyou need to measure both bwteen the pin and gnd and between thepin and vcc to make sure it's floating
petzupyeah only pin D8 has power D10 has no power
baldengineerwhat board are you using?
petzuparduino nano
baldengineerhuh, somehow i could guess
baldengineerjust a tip. the numbers of the silkscreen are the "arduino pin" numbers, which are used in the IDE
baldengineerdon't confuse them with the typical numbering scheme for a DIP style chip
petzupaha
baldengineerin other words, make sure you follow the silk screen or text printed next to the pins
petzupyes, wiring is correct
petzupwhat can i check next?
timemagepetzup, you mentioned before that you have two identical setups, yeah?
petzupi record arduino for better explanation, where can i put video?
railhHi.How do i get ultrasonic pmw via arduino uno, i think it can be changed via registry.Thanks
timemagepetzup, if so, did you swap the rc522 or ethernet shields to see whether or not the problem travels with one of them?
timemagepetzup, for me, anywhere that doesn't require that i have an account.
railhthe purpose i dont my arduino uno to whine whiles its moving the dc motor
timemagerailh, i don't get your question, but the arduino ide runs multiple oses and it doesn't use the registery or any other os specific place to store configuration.
railhsomething like this
railhhttps://forum.arduino.cc/index.php?topic=188309.0
railhi have the offical ardunio motor shield
railhruning an actuator
railhhttps://store.arduino.cc/arduino-motor-shield-rev3
railheverything below 255 produces a whine at 255 no whine
railhso is there any easy way to this without alot of code
timemagerailh, you can find examples and libraries that alter the period of the waveform generated by analogWrite. if you're going to do this, i'd suggest doing it on something other than timer0 where it will probably screw up millis()
railhlink please :D
timemagehttps://playground.arduino.cc/Main/TimerPWMCheatsheet
timemagehttps://github.com/jurs/arduino-pwm-frequency-library
railhwell this is going to need a lot of coffee
railhThanks timemage will it screw up delay function
timemagerailh, what library are you usinng? or are you using analogWrite directly?
timemagerailh, almost certainly yes *if* you change the frequency of timer/counter 0.
railhno idea bra im new at this just using this code this is my code give me a sec
timemagerailh, well, you should be able to say what you're currently doing to control the motor.
railhhttps://pastebin.com/Le6uY15C
railheverthing works just fine at 255 no whine but i fish to move the actuator slower with no whine
timemagerailh, that would be "using analogWrite directly"
timemagerailh, right. iirc the frequency they use is around 1khz. audible frequency in any case.
railhso what should i do read all the stuff you suggested or is there a quick fix
timemagerailh, i would try the library if you don't want to get into the details of how timers work. look at the pighixx pinout for whatever arduino you're using and chose one of the pwm pins not on timer0. should be something like OCR1A for example.
railhim using an arduino uno, damn you are good at this stuff
railhwell this is going to swallow a day already drinking coffee
timemagehttps://playground.arduino.cc/Code/PwmFrequency <-- you could probaby plant that into your program and use it without too much trouble.
petzupcan i have 12v power supply to arduino?
railhthe actuator is on pin 12 i see no example for it
railhhttps://playground.arduino.cc/Code/PwmFrequency
railhwhats the base frequency for pin 12 on arduino uno
timemagerailh, i don't know what it starts at, but iirc around 1khz.
railhmkay
timemagerailh, you'll be changing it to whatever you set. really they've poorly named the function. you're not setting the frequency by frequency number but by divisor from the mcu clock speed.
timemagerailh, it's only meant to be used with specific numbers that you can see in the switch statement.
railhgot it drinking coffee intensifies
timemagerailh, the 256 divisor seems like it should work. that should give you 16mhz/256, 62.5 khz.
timemagerailh, actually now that i think of it that's the rate that it counts at, i think.
railhgot it bro thanks for the help so far
timemagerailh, the simple/crude thing to do would be to just start at the high end 1024, and you should hear the same whine you are now. and then drop it to 256, 128 etc until you don't hear the sound anymore.
railhwhats the code i have to put in im still reading upon this
railhsetPwmFrequency(12, 1); something like this or
timemagerailh, yeah, pinnumber, divisor
railhalso found this
railh ATmega chip, and the name and bit of the output port. For instance Timer 0 output OC0A is connected to the Arduino output pin 6; it uses chip pin 12 which is also known as PD6.
timemagerailh, that suggests pin 12 isn't a great candidate for this.
petzuphas somebody used STM32?
railhyeah i will try what you suggested so 12,1 is at what frequency do i keep dividing by the power of two or
timemagerailh, it's PB4 on the uno. so which 'atmega' are you talking about. all of the official arduino products that i know of are atmega-somethingrather.
railhi have the offical arduino uno
timemagerailh, http://www.pighixxx.com/test/wp-content/uploads/2014/11/uno.png
timemagerailh, pin #3 is ocr2b. that seems like one to try.
railhi have also the offcial ardunio uno motor shield connected to it
timemagerailh, does that mean your locked into using a particular pin?
railhand the actuator is connected on terminal a
railhi think so
tawryes as i have an official motor shield too
tawrbta railh there is 2 awesome pages on the arduino site about this
timemagerailh, it is odd if they chose 12
tawr"arduino pwm cheatsheet"
railhgonna try setpwm now
tawrand the secrets of arduino pwm
tawrit has all the info you need and examples
tawrhttps://www.arduino.cc/en/Tutorial/SecretsOfArduinoPWM
tawrhttps://playground.arduino.cc/Main/TimerPWMCheatsheet
tawri still refer to those occasionally
tawrit has full charts with everything railh
tawrand im pulling my motorshield, i'm pretty sure it's not pin12
tawrthose are direction pins railh
tawryou don't pwm those.
tawrrailh: pins 13 is DIR-B pin 12 is DIR-A. those aren't the pins you pwm.
tawryou pwm 11 which is OUTPUT B and pin 3 which is OUTPUT A
tawrso pin11 is the pwm output for output b. pin 3 is the pwm output for A. stop trying to pwm the wrong pin
tawrtimemage: ^^ you too
tawrbtw the braking pins are 8 and 9 (A)
timemagetawr, i pointed him at the cheatsheet page earlier. the secrets one is linked from the code snippet page. i kind of get the impression that it's a bit much for him.
tawrbecause he's doing it wrong, you don't pwm those pins.
tawrbtw timemage not sure if i ever showed you the finished one, but I ended up adding a diffuser to the picture frame led thing
tawrnow it looks kinda neat when off
tawroh i also went and liquid electrical tape encapsulated some of my boards lol
timemagetawr, heh, yeah, i guess that would do it =)
tawrand no idea why he's not responding but oh well :)
tawrlol
railh_sry firefox crashed
tawrdamnit
tawrhwo much did you see
tawrbecause i explained everything.
railh_gonna see logs
railh_hmm cant find no logs still searching
supayis it possible to prevent a computer from accessing an arduino?
grokkingStuffthanks supay. should have thought of this earlier :)
supayhaha, no worries mate! :)
railh_could you post the log to pastebin twar.Thanks
timemagerailh_, https://pastebin.com/0DVxHX0L
railh_Thnkas time such a great help
jancoow__Hi
jancoow__I've a small html document
jancoow__which I want to put in the code
jancoow__However
jancoow__well.. what is the best way to do this
timemagerailh_, made a simple sketch that does not much more than analogWrite and the default period seems to be about 490hz, which is lower than i expected.
railh_hmm interesting
jancoow__the page is 4,169 bytes
jancoow__can I fit this inside a string variable
tawrrailh_: okay now that you know you don't pwm pins 11 or 12
timemagerailh_, well, i didn't have strong expectations. i'm used to controlling the timers directly.
tawrbecause those are the direction pins, what are you trying to do?
tawrjancoow__: esp or what?
supayjancoow__: why not?
jancoow__tawr: yep
jancoow__supay: max size of a string?
tawrokay jancoow__ you dont have to put it in the sketch directly, in fact i'd really recommend against it
jancoow__overall max size of the flash
jancoow__tawr: yeah I don't like it being in the sketch
tawryou realize esp has mb of flash and a filesytsme you can write too directly right
jancoow__nope I don't realize
tawr*mbs. depending on the model they can have up to 32mb
tawrmost have 4 or 8 depending on how old
timemagetawr, he sees differences between 255 and other numbers, so i'm guessing he does because analogWrite(pin, v) will do something like digitalWrite(pin, v > 0x80) for non-pwm pins. kind of think some information is askew.
tawrthey have partitioned file systems
jancoow__yeah I did read something about that
jancoow__where I can save wifi credentials etc. right
tawrno timemage analogwrite not pwm pins on a motor driver pin NOT wanting pwm input is going to cause a whole host of problems
tawryes correct, that's actually a seperate partition for configs
timemagetawr, uhh, you're missing my point. =)
tawrone sec
railh_so what do you suggest i have the actuator connected to terminal A of the motor shield
jancoow__tawr: i've got an esp-12f which I need to design a pcb for in the end
jancoow__but that doesn't really matter; what matters is how I can do this the cleanest way :)
jancoow__i've minimized the html file and it's using 4,169 bytes
timemagetawr, he's getting an audible buzz of the sort that you'd get when using a duty cycle of something other than 0 percent or 100 precent. therefore one way or another it seems that he /has/ managed to connect pwm to whatever pin is *actually* using.
railh_and im using this code
railh_https://pastebin.com/Le6uY15C
tawrjancoow__: spiffs
tawrtimemage: i don't think so
tawrrailh_: you SET DIRECTION OF TRAVEL USING PIN 11 or 12 WITH DIGITALWRITE
timemagetawr, it'd also be a bit weird for them to design a motor shield and have the pin needed be something other than a pwm pin. if i put the two together, says to me something is wrong with the info.
railh_mkay
tawrAND YOU PWM PIN 11 FOR OTUPUT B, AND PIN 3 FOR OUTPUT A.
timemageuh huh.
jancoow__tawr: could you explain that a bit more for me? :)
tawrusing analogWrite(3, VALUE) etc
timemagesomething like that, for example.
jancoow__tawr: if you have the time ofcourse :D
railh_got it
tawrsure jancoow__ just gimme a sec, i'm looking for hte guide that helped me understand how it all worked, one sec
tawrhttps://tttapa.github.io/ESP8266/Chap11%20-%20SPIFFS.html
tawrhere's a short thing on how to do it, read over that in the meantime when i'm looking for the full guide,
tawrrailh_: we won't know how to help you or what to do, until you actually set things up the right way and see if you still have the problem. those pins you were trying to do aren't even PWM pins, they don't have hardware pwm peripherals, and the motor driver chip doesn't understand pwm on them. so we have no idea what could be the problem since you're not using them in the right way
railh_I was using this example
railh_http://www.instructables.com/id/Arduino-Motor-Shield-Tutorial/
railh_the code is in it too
tawryeah?
railh_i have my power supply connected to vin gnd
tawrso where did you get in your brain that you analogwrite 11 or 12?
railh_pretty simple
railh_no brain as it seams
jancoow__tawr: man thank you!
tawrand i didnt see you say stepper
jancoow__this make sense, littarly
tawrjancoow__: :) btw i really love the wemos d1 mini PRO for my esp's, robotdyn has some nice clones as well (if you want it in black board instead of blue lol)
jancoow__I was always thinking like, is this spi flash storage used anyways but it is! :D
jancoow__tawr: I'm doing some custom projects :)
tawralso take a look at BLYNK. it's a phone app + arduino/esp/many other arduino library that makes phone -> cloud -> device IOT stuff drag and drop
tawrrailh_: if your stepper is vibrating. you need to power all 4 wires. you can't run a stepper motor on 2 wires. do you think you have a normal motor or a stepper motor?
jancoow__tawr: i've designed a pcb that fits inside a wall socket, so you can replace a normal light switch. You can add modules behind it (relais, dimmer, current sensor) and it ahs 2 capative touch, pir, light sensor at front. It fits needle in my wall socket :D
tawrjancoow__: https://i.imgur.com/nouH3wE.jpg
railh_i have dc motoro a actuator
jancoow__tawr: so I replace a normal light switch with my new pcb and plastic parts, and voila a whole room automated (at least, lightning, movement etc.)
jancoow__and it looks neat
tawrrailh_: then why are you following a STEPPER MOTOR guide?
tawrjancoow__: definitely check out blynk then
jancoow__tawr: yeah I will do. However, I designed my own home automated system ;p
railh_I followed Step 4: One Motor
railh_http://www.instructables.com/id/Arduino-Motor-Shield-Tutorial/
tawrthat device i linked you is an esp + dht22 + blynk library (and phone app) to record my deep freezer temp/humidity and show me real time on my phone with a homescreen widget and sends alerts if it goes above a certain temp
jancoow__(yeah like everyone does nowadays but I started it like 3 years ago )
tawrrailh_: and what does it do?
jancoow__okay that's actually fun :D
tawra 9v battery has almost no current flow ability what so ever.
tawrunless the motor is itty bitty, a 9v battery isn't going to power a motor
railh_move to one direction then it hits the limit switch and goes back and again built in limit switch, that pretty simple
railh_so which pin should i pwm
railh_set pmw
railh_if im following that examp,e above
jancoow__blynk pretty good concept
jancoow__there are so many home automation solutions nowadays
railh_so it seams i have to set pmw on pin 3
jancoow__But I believe my product is a nice solution to automate a old house without pulling extra wires or to much hazzle
jancoow__But i've no expertice to raise a kickstarter etc.
tawrokay that was hilarious
jancoow__not?
jancoow__what was hilarious :P
tawri just dropped my arduino motor driver board, it hit the foam in my storage case i keep my shields
tawrbounced
railh_:O
tawrhit my bed, bounced, hit my laptop keyboard, bounced, hit my tile floor, bounced, and landed upside down on my laptop charging brick
jancoow__oh lol
tawrlike a rube goldberg-esque failure. and surprisingly not a single pin was damaged lol
timemagerailh_, btw, that function works okay. i added it into the code and called it in setup() and with 1 divisor it winds up around 31khz or so. i'm used to just doing these things directly, but it doesn't hurt to have something like that to point people at.
jancoow__what do you think tawr
jancoow__of my concept
tawrjancoow__: sounds great to be honest. just make sure you know what you're doing with house wiring..
railh_goona try diferend divider and report back on pin 3
tawrHERE BE DRAGONS
tawrrailh_: what are you powering it by?
jancoow__tawr: yeah I know
tawrrailh_: and make sure the timer you're changing is the pin3 timer
jancoow__tawr: but I feel I need to share this around me, maybe make money with this :P
jancoow__I mean
railh_external power supply to vin and ground
tawrwhat is "external power supply"
tawrthat says nothing to me, what are you powering it by
jancoow__How cool, pull out a normal light switch, pull this module in, add what you want (relais, dimmer module) and voila
tawrjancoow__: sharing != make money :)
railh_12v 5 a
jancoow__well kickstarter
jancoow__I didn't saw this solution before
tawrrailh_: hmm. can you get a pic of this motor and your arduino wiring?
jancoow__Because all solutions are ugly. Or battery powerd
jancoow__Or complicated to install (add extra wires etc.)
tawrfunny you mention it, i just stole your idea and i have a gofundme and etsy already set up to sell your idea because i just stole it
jancoow__hahaha
jancoow__damn
jancoow__:p
jancoow__I don't know how to do all that
jancoow__Well, in about 4 weeks I receive my 3d printer, then I can print and test everything
jancoow__Make some pictures and hoppefully I could set something up on gofundme
railh_dont have camer pretty simple red to + and black to minus on terminal a and red to vin and black to ground for power supply pretty straight forward
tawryeah, it's a great idea. there's been some work in the past, and some off the shelf things like remove light switch, install this weemos (i think that's the name by belkin) light switch and have it controlled by wink etc
tawrbut they're ~30-40 bucks, and don't dim
jancoow__yeah
jancoow__and this one also measure movement
jancoow__light
tawrjancoow__: really kickstarter is the best place
jancoow__add 2 configurable capative touch sensors
jancoow__so you can config it with anything you want, like switch all lights of in the house
tawryeah, throw in WINK compatability along with alexa
tawrand i see many money millions in your future
jancoow__or just implement myqtt?
jancoow__mqtt *
jancoow__Or let it configurable in the webui
jancoow__When it's launched for the first time, it just makes a wifi network available where you can configure the module
jancoow__(that's why the webpage thingy in my first question :P)
tawrthat's how most work
jancoow__yeah
jancoow__but make it EU certificated etc
jancoow__make it fit in every type of wall socket
jancoow__that are things which are very hard to develop for me ;p
jancoow__did you ever setup a kickstarter project?
tawrsorry doggie maintenance
tawrno jancoow__ i haven't
samy^hi all, is there a CPU frequency definition accessible from within a sketch during compile time?
cehtehF_CPU
samy^cehteh oh great, thanks!