timemagedeskwizard, well, if you take digikey or mouser part search for something like discrete led, it will likely have a search parameter that you can chose that would include 'clear' and the term you were looking for. so like, if you don't remember what it means to have a peice of plastic around your pin header, you'll be able to find the term just looking at the parametric search field options.
deskwizardyeah, I should have checked that haven't I... was just for my notes
deskwizardwell, all my voltages rails are up, that's a start :)
deskwizardtimemage: what font should I use? ... *sigh*
timemageheh
deskwizardsomething like that
deskwizardhttps://i.imgur.com/78zxqmb.png
deskwizardnot too sure where I'll hook up the vref yet but yeah, that's pretty much what the psu section looks like atm
deskwizardif anyone have thoughts on that matter, I'm all hears. The ref is shared between a DAC and an ADC
mrpacketheadcan any one suggest a good battery backup circuit for an ardunio.
mrpacketheadI was hoping to use 4 x AA cells
cehtehhow long shall it backup, what current do you draw, do you need recharge or replace the batteries?
timemagedeskwizard, 18 vac?
cehtehand whats your input voltage
mrpackethead4 x AA cells will power it for 140 hours, and thats fin
mrpacketheadand no just primary cells
mrpacketheadnot rechargable
mrpacketheadi could probalby run it on 4.5V..
mrpackethead( three cells )
mrpacketheadand use a 5V supply
mrpacketheadbut..
mrpacketheadbut diodes get in the way
mrpacketheadand then there are vdrops
deskwizardtimemage: more or less, figured I'd use some of those nearly useless wallwart everyone have around :P
deskwizard(aka, the transformers I had weren't up to it...)
timemagedeskwizard, yeah, i dunno that 18vac is all that common though. not in the u.s. anyway.
cehtehmaybe you can live with the vdrop of shottky diodes (arduino runs at far less voltage than 5V)
cehtehotherwise, google for 'ideal diode'
mrpackethead yes, i coudl use a FET
deskwizardtimemage: probably not, but I have the thing :P and in the end, anything that'll fit really, the bridge is in there anyway, so I can always use DC later if I want or something
cehtehor just use some cheap power bank, one which can load and discharge at the same time
deskwizard^
cehtehand maybe a big cap buffering
deskwizardbut beware of the cheap battery banks, I have some that have a shitty booster, drops out at like 3.4v
timemagedeskwizard, so.. what does the discharge pin of your 555 goin to?
deskwizardbitches.
deskwizardtimemage: couple hundred pixels north west?
deskwizard:P
deskwizardI should just re-draw the 555 with the discharge pin at the top... lol
timemagedeskwizard, btw, that doesn't look connected. not making much sense to me though.
timemagedeskwizard, you're going to use rst to tug on vcc for.... what reason?
timemagedeskwizard, nevermind, i see it.
deskwizardtimemage: thank god, 'cause the only answer I had was "the internetz told me to" :P
timemagedeskwizard, well, i haven't worked through the values. but at least it's make sense to me qualitatively.
deskwizardtimemage: ty :) I try to have the schematic follow what I have on the board, most of the time hehe
timemagedeskwizard, ehh, you mean you try to make it look like that?
deskwizardtimemage: lmao, nah I mean I try to test and update the schematic as I go
timemagedeskwizard, ah
deskwizardtest the circuit*
deskwizardtimemage: lol still nice to know how crazy you thing I am....
deskwizard:P~
timemagedeskwizard, i'm used to dealing with crazy people i guess.
deskwizardtimemage: I believe you hehehe
[ill]willmy stream is like 5 mins behind
timemagedeskwizard, so, what voltage were you expecting out of U1 ?
deskwizardtimemage: it's set to roughly 16.25v, 18VAC is what's written on the walwart, it's quite higher than that with a low load / after rectification.
mrpacketheadif you want to monitor the voltage of the power supply thats powering the ardunio, how woudl you go about doing that
deskwizardobviously
timemagedeskwizard, yeah, just making sure. it's a weird number.
timemagedeskwizard, your 555 variant is happy about 16.25 vdc?
deskwizardtimemage: hehehe ikr "Radioshack stereo mixer power supply" go figure. hehehe
timemagedeskwizard, so... yes?
deskwizardtimemage: for the time being... ? no, he's not much happy.
deskwizardI gotta play with the LM317 resistors, I threw what I had on hand on there, whatever I could get close, 555 is absolute max 18v, so... yeah.
timemagedeskwizard, it depends on the one you're using. not all of them go that high.
deskwizardtimemage: I made sure I had the proper datasheet.
deskwizardbut no, it's not happy, nor is it ideal but I at least managed to test the thing
deskwizardtimemage: but it's good to keep in mind if I get one locally and don't double-check I could very well screw myself up
miasmahm how is it possible that some 5.5mm dc jacks can only handle 0.5A when micro usb chargers provide 2,1A with much thinner pins
deskwizardthat's at the charger, not after the connector(s).
timemagemiasma, one might be that they don't expect anyone to try to operate the jack with the loss of a half a volt or a volt across it, which does happen with usb cables.
miasmadeskwizard: um, those chargers have builtin cables that can't be disconnected
deskwizardmiasma: sorry I assumed micro-usb was a connector.
deskwizardhttps://www.youtube.com/watch?v=n70N_sBYepQ <=- might be of interest, tests connectors as well
miasmaof course it is. if you buy a phone, it might have a 5V/2.1A charger and it comes with a micro-usb cable (well nowadays usb-c). the manufacturer somehow guarantees 2,1A max. also folks like rpi users draw great amounts of current from micro usb
miasmatimemage: my goal is to power 12V led strips via a 5,5/2,1mm DC plug. i'm afraid the light would burn the connector
deskwizardand then bitch shit isnt stable and use a pin instead after that.
miasmamy light would use 36W / 12V / 3A and the 12V dc plug is rated at 0,5A
timemagemiasma, by plug you mean barrel jack still, yeah?
miasmayep
miasmai'm looking at the pins and they seem like 10 times as wide as usb micro pins
deskwizardsorry, no idea why I'm being such a dick, old habits die hard I guess, carry on.
timemagemiasma, yeah, i understand that. i'm just not sure the current limit is necessarily because it melts/catches fire when you go over that. it may just be that it won't perform to the other written speces.
timemagemiasma, the first normal looking through hole barrel jack that i found on digikey is cui inc PJ-037A. 24VDC, 2.5A
miasmatimemage: the ones i have are these https://www.ebay.com/itm/10PCS-DC022-2-1x5-5mm-PCB-Mounting-DC-Power-Jack-Socket-Black/302119083735
miasmai bought all metal ones with rated 5A current, but still surprises me why the number is that low
timemagemiasma, being from ebay, you might as well make up your own mind what it's rated for.
miasmaat 0,5A it means the connector can dissipate at most 7,5 mW of heat :D
miasmai found the same at mouser and with same specs
baldengineerwell those barrel jacks are rated for higher voltage and current
baldengineerif they were only rated at 5 volts, their current rating would likely be much higher
baldengineeradditionally, compared to a micro-usb connector, there is more metal. it means less resistance. also, it means more potential heat sinking, allowing more current
baldengineerit's not just the current rating you need to look at
timemagemiasma, maybe nice that. dunno, whether or not they consider the contact resistance together or separately.
timemagemiasma, "it may just be that it won't perform to the other written speces." you combine that with what baldengineer is saying and then look it "Life: 5000 times". I'm guessing this is 'insertion cycles'. But then, it's ebay. I dunno as it matters so much what they have to say about it.
baldengineer^^ also that, rated lifetime
miasmaok thanks. i think i'll try with the current of 3A and see how it goes
baldengineermost people don't understand what the word "rating" means. and component manufacturers don't help the matter by using it however they see fit
miasmaindeed
baldengineerin the case of something like a connector, the voltage and current are rated for certain amounts at a certain temperature, for a certain amount of time. e.g. rated voltage, rated current, 85C, for 1000 hours
baldengineerit doesn't mean the connector will fail at hour 1001. it just means it lasts that long with a known amount of degradation. could be that is fine for your application and could also be something that would last for 5000 hours. it certainly will last longer once you back away from those ratings.
baldengineer(Not, I pulled those numbers out of my ass as an example, not based on a real connector)
baldengineerlast comment: when you're looking at that big barrel jack vs the micro-usb, also keep in mind that the micro-usb is at its limits. the barrel jack probably isn't. but nobody cares.
miasmawhy i mentioned micro-usb is that it used to be widely used and some of those connectors really get hot when charging at full power
miasmai assumed this would happen here too
timemagemiasma, but then, there's some supposition there that the things you're seeing are being used with their manufacturers specs also.
baldengineeryou've brought up a valid point. just have to look past the surface to understand why
Demon_JesterHey guys, if I have teensy related question would I ask here, or does teensy have their own channel?
baldengineeryou can try here. I don't think there is a specific one
deskwizardyou know what's nice having done electronics for a while? You get a kinda 6th sense for what's likely to fk you up
deskwizardsadly, often that's correct hehehe
baldengineeryeah
baldengineerit also starts to make "great new products" look a lot more boring
baldengineer"oh. its a lcd with an arm processor, in a BLUE box"
deskwizardI agree, it takes the "magic" out of all of it
deskwizardespecially obvious in movies...
baldengineeroh yeah
baldengineermythbusters helps with that too
DatzHi, I see a lot of code, where there is a delay at the end of the loop. I was wondering if there was any particular reason to run the code slower, if not explicitly necessary.
DatzSome code that I'm looking at now has output to the serial monitor, could it be just to slow things down visually?
baldengineeryes
deskwizardor friends/family telling you how awesome something is, you nod and go "oh, yeah" but inside you're thinking "i could do that in an afternoon, and they fucked up use-case X..." hehe
Datzok, thanks.
DatzSo for instance, this code would run the same with the 100ms depay, as without it? https://www.arduino.cc/en/Tutorial/Memsic2125
DatzI guess I'm not going to overheat the mcu
deskwizard:|
deskwizardif that happens, unplug it
deskwizardnow.
deskwizard:P
Datzlol
baldengineernothing you right is going to "overheat" it
baldengineerwrite*
Demon_JesterMy question towards teensy is that if anyone knows if the keylayout or the library is bugged? Whenever I hit backspace through teensy it shows an * asterisk instead. I checked the keylayout, and shows ascii table 42, and its listed under US keyboard layout..
Demon_Jesterand 42 in ascii is *
Demon_Jesterso it seems I might have to modify the library to fix that.
Datzbaldengineer: yeah partially a joke, but thanks for the confirmation
DatzI was looking for a way to run a function for a set amount of time without pausing the loop. Right now I'm using something like: while ((endtime - starttime) <= 5000) this causes a delay.
baldengineerthat's how you do it
baldengineerif you don't like that, you need to re-write your function so that pieces of it run each time it is called.
DatzI see. I was thinking about how I could do that
baldengineeralternatively, when I have long processes, I call out to other helper functions
baldengineersomething that loops a thousand times, every 100 I check to see if anything came in on serial
Datzhumm, I'm not sure if I have anything helper type functions, but I'll keep it in mind.
Datzthanks
mi11k1Sorry not Arduino related, but for an Arduino project, is there anyway to just buy past battery in a cell phone and hardwire it or something at least so it would just turn on?
HrdwrBoBmi11k1: not easily, for many phones
shbrngdomi11k1 - you'll need a proper 5V regulator off of the battery, and a LiPo doesn't produce a consistent voltage the way normal 'throwaway' batteries do.
shbrngdomost likely that would have to be a boost/buck regulator. You could try driving it through one of these, maybe: https://learn.sparkfun.com/tutorials/sparkfun-5v1a-lipo-chargerbooster-hookup-guide
mundosegundoHello, im having trouble with the keyboard lib. If i tell him Keyboard.write("chrome.exe http://something.org") the ":" char will print as Ç and the "//" will print as --. Why is this happening?"
shbrngdoI assume USB keyboard Arduino implementation. I think the scan codes might have something to do with that. Check and see how ':' and '/' are being translated
zap0whch charset are you using?
shbrngdooh yeah that too
mundosegundohow can i see that shbrngdo? i think its the US charset zap0
shbrngdoyou'd have to look in the 'cores' source for the USB keyboard implementation. I forget which file it is.
shbrngdoit's the same place 'Arduino.h' is so you could try searching for that file
shbrngdoin my case it would be /usr/local/arduino/hardware/arduino/avr/cores/arduino/ - Your Mileage May Vary
zap0US, and it has ? not likely.
mundosegundoi think im finding omething with ur tip shbrngdo. How can i be sure zap0 ?
mi11k1HrdwrBoB: why is that?
mi11k1shbrngdo: oh sweet thanks for the link I never seen those before. I have a couple of the ones in the last of this picture.https://i.stack.imgur.com/Uu4D3.jpg
mi11k1Be back in a bit
timemagea portuguese keyboard layout or something very similiar.
NeoFrontierGreetings Earthlings.
NeoFrontier:))
NeoFrontierYou have great telepathic powers. All I have to do when I want an answer is to drop in.
NeoFrontierThe telepathic field immediately induces information.
NeoFrontierI like it here.
NeoFrontierI'm gonna stay.
wonderlandanyone here good with KiCad?
jgalicCan Arduino mega be used to control remotely, over Internet, 10 smart digital candles? If Android application is used for sending on/off commands is mqtt server the best option for web communication?
deshipujgalic: arduino mega doesn't have any internet connectivity capabilities by itself
jgalicI mean with Ethernet shield.
deshipueverything is possible if you connect enough things to it
jgalicDoes anyone have experience with exploiting arduino mega to control some appliences over Internet? Regarding stability and reliability.
NeoFrontierIs it common to look at Arduino api documentation like this for the functions of Serial: https://www.arduino.cc/reference/en/language/functions/communication/serial/
NeoFrontierand then not see all the functions listed ?
NeoFrontierIt does not list readStringUntil()
NeoFrontieram I missing something or is the documentation incomplete ?
NeoFrontier*shrug*
IcePicNeoFrontier: I think Serial says "this is built upon x" which means one could look further in that function docs
IcePicthe "stream", which in turns list readStringUntil()
NeoFrontiereh ?
_JordanHaving uploading issues. tried the usual cable swap. arduino swap. port, board setting no use
_JordanI am using a knock off though
deshiputry to use a real operating system
_JordanI'm using Windows 10 pro. seems pretty real to me
_JordanThe ard im using is an elegoo uno r3
_Jordantheres already a sketch on it. which makes me think that is something to do with it
deshipuoh, if it's so real, then you can show us the system logs for the usb peripheral?
_Jordansorry for the spam
deshipuanyways
_Jordandeshipu If I could, I wouldn't know how to.
deshipuyou can try pressing and holding the reset button on the arduino until just before the upload starts
_JordanI can give you a pastebin of my output
_JordanYeah deshipu tried that. no avail
_JordanHeres my output https://pastebin.com/p8GVvJJS
deshipuwell, that's the typical "the bootloader is not responding" output
deshipunot very helpful in figuring out why it's not responding
_JordanOh I didn't know that
deshipuit can be a bad connection, it can be faulty arduino, or a number of other things
deshipuyou did select the correct com port, I assume?
_JordanYeah com 7 for me
_JordanOkay so I figured it out. the knock off doesn't like uploading with the shield attatched.
_JordanI'll know for next time
djphcould be power requirements too
_JordanThansk for your time though
deshipuglad you figured it out
YotsonClone or not doesn't matter btw. That shield you have will most likely mess with uploading to any board.
_Jordanunderstood wotson
_Jordanyotson*
Yotson:)
_Jordan(assumed)
pwillardYeah, design issues are just design issues
deskwizardo/
Flea86o/
deskwizardya know, it's not as bad a feeling when you're aware it's likely gonna bite you in the ass lol
p0g0what, getting bit? Knowing it is coming makes it better?
deskwizardp0g0: now that you mention it .... :P
deskwizardwell, technically it did exactly what I predicted so at least that's a silver lining. The other one being just before powering up I decided to swap the MM around... saved me a fuse hehe
jay3Hi! So I am running 2 Software serial on Uno , Serial1 on 3,4 and Serial2 on 6,7 . I am rading values from Serial1 And outputing values to Serial2. Now my problem is I get 60.234 on Serial1 next time I get 0.234 then .234 then 234 ..
jay3What could be wrong?
jay3I am always sending 60.234 to Serial 1
djphnot enough receive buffer / delay between read/write?
blathijsjay3: One thing to take into account is that you can only send or receive on a single SS at any given time. Not sure if that's relevant here, though.
blathijsjay3: Also, it seems that you're somehow not properly clearing buffers between reads or something like that. Perhaps you could put your code on pastebin.com / gist.github.com so we can have a look?
jay3I do Serial1.listen() I dont need to listen on Serial2 at all.. I will put the code somewhere
jay3Here is the code https://pastebin.com/51iMQmLU
jay3I wonder if its substring
blathijsjay3: That substring indeed chops off the first character, and then leaves the rest in the rawInput variable, to be processed again on the next loop
blathijsjay3: Also, your current code doesn't seem to wait for any delimeter (e.g. a newline), so you might read only a part of the message being sent, or even a full message plus a part of the next one, if you send them fast after each other. When you do a write to serial, the message is not sent as a single atomic message, but just as a sequence of individual bytes after each other, which take a bit of time to get
blathijstransferred
jay3blathijs: sadly I dont have any control over input. There is going to be any delay of atleast 30 seconds between msgs.
jay3blathijs: Do you have any example of code where i wait for newline
blathijsjay3: IIRC there is a ReadUntil function or something similar
jay3I just put : in between every char I read and here is what I got :::ҁ:0:.:2:3:4::
blathijsjay3: At least 30 seconds between messages is also a workable delimeter, especially if you know that there will no delay between characters within a given message. What you can then do is start to parse a message when you have not received any bytes for a given amount of time (minum a single byte transfer time, plus the maximum delay that can be between bytes inside a message). Alternatively, you can simply
blathijswait for a fixed amount of time after receiving the first byte. This amount of time should be more than the maximum message transfer length, and less than 30 seconds of course. I think the latter is what you're doing now, with your 10ms delay?
jay3sometimes I get ? and sometimes actual number 6
OfferHello everyone. I'm new here. Have a dream about ESP8266 device. Want to make a little relay that will be able to reset a router (and notify me once came back) when a ping doesn't work. There were 220V devices like this, but I think it's better to do it on the 5V line. Can someone please guide me with this? Thanks!
deskwizardMartin Luther King too had a dream, see how it ended
deskwizardlol :P jk
Offer:-)
Offer(As well as Barak Obama...) lol
deskwizardyeah but he didn't get shot :P
deskwizardanyhoo
deskwizardthe ping and reset part, no worries
Martin`I'm not that Martin
deskwizardthe notification part, lots of ways to go around
deskwizardMartin`: pfew, I was scared there for a moment ;)
Martin`:P
deskwizards/around/about
deskwizard*needs more coffee and smoke*
Martin`Well I had a dream too, but that is not important
deskwizardlmao
deskwizardOffer: what kinda notification did you have in mind ?
deskwizardOffer: (by the way, there's a ping library for the ESP8266, haven't tested it but I'd look into that if I we're you)
deskwizardpretty much that and the "blink without delay" example and that's those 2 things solved ;)
OfferAfter it comes back - maybe a URL request so I will be able to know there was an 'incident' (email will be probably more difficult, even if we'll just use like a 'telnet' to send it using smtp protocol. right?)
deskwizardwith a sprinkle of 'if's' for the WLAN status and stuff if you wanna go all fancy (if you do, hit me up ;) )
Offernice!
deskwizardcouldn't comment about smtp though
deskwizardsomething in the back of my mind yells MQTT, but not sure if it's the smart part or the stupid part :P
OfferI'll tell you. I have some servers (in a closed place) that are connected via DFL-210 dlink firewall. it got stucked today, and I had to drive 30 minutes just to un-plug the power-supply and re-connect it.
deskwizardOffer: been there, I figured that much lol
G_Hi!
deskwizardHello! :)
OfferI just want a device between the power supply and my firewall to ping every minute, and if 2-3 timeouts - to take power down for 30 seconds and re-power it.
Offerif the ping came back - it can email me or tell me in any other way..
deskwizardOffer: see, those sentence? convert that into code and a lot of it is done :) you explicitly said exactly what you have to do :)
Offerthanks :-)
deskwizardOffer: do as I say not as I do ... start with one thing at a time and build up from there
IcePicbreak the tast into small parts, solve each
IcePictask*
Offermy 'have no idea' part is the Hardware part... :-(
deskwizardOffer: start with a LED for testing ;)
deskwizardI'm guessing your device will be 5v powered ?
G_In an impulse buy, I bought all components to build a weather station and learn along the way. When I look at schematics for the solar power, there is always a diode between the panel and the TP4056 charging module. As I dont have such a diode, I wonder (for the short term) if there are huge risks directly soldering the panel
IcePicI thought it was his firewall he wanted to restart?
G_example schematic: http://cdn.instructables.com/FZO/898I/IJUCPD96/FZO898IIJUCPD96.MEDIUM.jpg
billxxWould this work for you? https://dlidirect.com/products/new-pro-switch
IcePicOffer: if it is a 110/230V kind of device you want to control, perhaps do like I did, I bought something along this http://dizw242ufxqut.cloudfront.net/images/product/otherelectronicsaccessories/otherelectronicsaccessoriesdefault/image0/telldus_paav_plug-in-brytare_slim_3-p-39557280-1.jpg and then had my arduino control the remote buttons
deskwizardprobably, but where's the fun in that :P
pwillardUmmmm... thats a really bad idea for solar charging... you would be better with a SolarBuddy from Sparkfun.
Offerdesk: 5v 3A I think.
G_Its a tiny solar power, just to power the arduino
deskwizarduh, yeah sorry I assumed we we're switching the DC side, my bad
G_im confused whos replying to who :)
deskwizardyeah its getting confusing hehe
pwillardand you NEVER want to CHARGE and LOAD a battery at the same time unless you have a solar charger designed for that
Offerbillxx: generally that's the idea, but: 1 - the price... 2 - it works on the 110v side. I thought about the 5v side..
G_well, from what I read and hear online (and many have done so before) the TP4056 takes care of that
pwillardjust placing the battery there is asking for issues
deskwizardACTION winz!
IcePicdeskwizard++
deskwizardlol
OfferI'm talking about the DC side..
deskwizard1Offer: then it's quite easy
deskwizard1start flashing LEDs damn it :P
pwillardbasically... when you see this "·Charges Single Cell Li-Ion Batteries Directly
pwillardfrom USB Port " its not ideal for what comes out of a solar panel.
deskwizard1from what I gathered about TP4056, I'm not inclined to want to use one. Am I wrong?
OfferIcePic: it looks interesting. The ping part will be the Arduino. But how will it be able to control this socket?
G_http://www.instructables.com/id/Solar-Powered-WiFi-Weather-Station/
G_A lot of people are using that system, including extended reviews to be found online / youtube
pwillardIts JUST a charger. IE; take battery out of your circuit... charge it with USB... put it back when charged.
deskwizard1IcePic: not a bad idea, I like ;)
IcePicOffer: buttons are mostly "is there GND or not on the contact plates"
G_By what I can feel to be respected people in the community :)
OfferIcePic: but it's RF remote. isn't it?
G_That pwillard , and what about my initial question of the diode?
pwillardOr... maybe I read it wrong...
G_*thanks
pwillardwell, I was just looking at the CHIP... not the board.
pwillardthe board appears to handle charging and load
IcePicOffer: in my case it is yes.
IcePicOffer: means airgap between 230V and my horrible creations.
IcePicthat is generally viewed as a good thing at my place.
G_Oh, sorry for the confusion :)
pwillardThe diode from the panel is a good idea
G_I got that :) Now the question is, whats the risk without :) Dont have the diode, need to go and buy one. Just can't wait.
jay3blathijs: So there is an Carriage Return at both end of the number 60.234. So I cant use readStringUntil. I ignored Carriage Return '\r' while reading each char. Now its better but still sometimes I get ? instead of 6 in raw input.. I am looking at the delay now.. Thanks for the help. hope that delay thing works out..
OfferSo, I'm confused. Can someone please guide me what should I buy on Aliexpress now?
G_Unless you tell me my house will be on fire overnight :) Then that would be a valid argument.
pwillardThe solar panel itself is dumb... it does not know how to be a load or a source... the diode makes sure it is only a Voltage/Current SOURCE for your project.
IamTrying#include <HttpClient.h> client.get("https://arduino.myserver.com/commands"); - How to make HTTPS work?
G_ok, so no solar for me today then :)
pwillardIOW... In the dark, when no voltage is being produced by the panel, the voltage at the charger board could cause a current to flow in the opposite direction through the panel... and that is just something to be avoided.
G_thanks pwillard
G_clear!
deskwizard1IamTrying: try harder.
IamTryingdeskwizard1: HTTPS crawl does not work but HTTP only. why there is no HTTPS implementation available yet?
pwillardGet a Shottky Diode... like a 1N5817
djphhttps is complex ...
IcePicdjph: and moving
pwillardBy design
IamTryingYEA - but Enterprise do not allow HTTP crawling djph
djphso then use something that can do what you want... I honestly don't think an AVR microcontroller has anywhere near the resources available to actually handle TLS
deskwizard1and have you looked at the HTTPS example from the library ?
pwillardthe fact that the S on the back end involves certificate negotiations, cryto cyphers and such... how could it be "simple"?
deskwizard1damn, gtg. 'later o/
djpho/
jay3blathijs: So basically I am doing Serial.available() which gives me no of chars in serial input . I wait using While loop untill I get all the chars finish transferring [10ms ago i no of chars = now char no]. Then i start reading them. Why the first char is garbege is still a mystery to me , T_T
IamTryingI put those argument to the security team. But they do not want to listen and refused my processor to run in there platform. HTTPS is must. so should i bypass the C++ code to use curl on the terminal?
pwillardYou have an overly complex "available" + "read char" loop routine.
IamTryinghttps://www.arduino.cc/en/Tutorial/ShellCommands - pwillard, that should solve my issue. all i need CURL for HTTPS dns's
IamTryingcorrect me if i am wrong plz.
Offeranother question please: Can I make a device that will be able to read a UPS status from its USB port? I don't know how to find the protocol for it..
anankeOffer: in theory, yes
IcePicIamTrying: that is only for Yuns that have a complete linux box running on it
IamTryingIcePic: YES YES YES - that is why i only used YUN having linux as backup for to do quick hacks.
IamTryingthank you.
Offerananke: Thanks. How can I start looking into it?
Offerit called Opti UPS. Comes with an old software called Sentinel. If I'd be able to connect it to a kind of Arduino and produce snmp messages (or registers) it would be great..
anankeOffer: your best bet would be to find if any of the open source UPS monitoring tools supported it, such as 'nut' for linux. if so, you'd start your exploration there
anankeOffer: and if this is usb attached, then there would be no SNMP messages or registers
Mangy_Dogdoes anyone know a arduino emulator/debugger/vm that can run programs using the libraries I use... I simple want to see the memory usage, i dont want to have or need any upload to real board and debug off real board features
anankeOffer: http://networkupstools.org/docs/man/optiups.html
anankeOffer: what model is it?
Mangy_Doguno
OfferAnanke: Wow! I'm looking. thanks for that.
OfferTS-1000B
anankeOffer: I don't see it listed as supported model
Offer:-( It seems that page is for the serial connection.. it was before it became USB..
anankeOffer: likely it would be more trouble to reverse engineer the protocol and build a monitoring device than to simply replace it with a well supported UPS. not to mention that this 'old' ups is likely to have a limited life remaining
OfferHere in Israel we have Opti-UPS or IPPON UPS. both are russians I think.
Offer(btw - this opti-ups I have many of them, bought the last 2 pieces 2 months ago..)
OfferAny idea?
hellerso guys
hellerany tips on choosing a servo
helleri need to move a trash bin with small 3d printed arm
deshipuhow much torque?
deshipuhow fast
hellerwell the torque thing is, not sure how to calculate it
deshipuhow much strength is needed to move it, and how long is the arm?
Offerananke: Just sent email to opti-ups now. I really hope they can help me with this protocol. Do you think there is a chance for it?
anankeOffer: unlikely
Offerwhy? Doesn't they want people to use their products?
hellerdeshipu: servo is attached to 10cm arm with 20cm extension
heller10cm part will do most of the force
deshipuheller: what does that even mean "most of the force"
deshipuheller: and how much force is it?
hellerits the arm which swings. 20cm piece is just to attach it
hellerdeshipu: 1kg?
deshipuok, so you need at least 10kg*cm of torque, possibly more
deshiputhat's a big servo
deshipuhow do you plan to power it?
anankeOffer: your use case is rather rare. they stand to gain very little from it, if they haven't made specs public yet
hellerdeshipu: i can do anything from 0 to 12V
hellerare you sure i need more?
deshipuservos are usually 4.8-6V
deshipubut I was thinking about the current
helleri looked at some youtube videos yesterday and i saw small servos pulling 2kg weights
hellerYeah, i'll probaply use a wall wart
heller2A for example
deshipunot sure 2A will be enough
hellerhttps://www.youtube.com/watch?v=M36MZqhAjbs something like that is not enough?
deshipuwell, look at how long that arm is
deshipuand how long your arm is
deshipuyours is 10x longer
hellerso a 10kg servo can handle 1kg at 10cm?
deshipuyes, it's linear
hellerhttps://www.ebay.com/itm/MG996R-Digital-Servo-Metal-Gear-Upgraded-MG945-MG995-RC-Helicopter-Car-Boat-Mode/122426796017
deshipuor 5kg at 2cm
deshipuetc.
hellerthat for example at 5V, about 1,4Kg at 10cm?
deshipuin theory, yes, in practice those ratings are exaggerated
deshiputhe official MG996R servo, according to product datasheet, has 9.4kg*cm at 5V
hellerokay. but i might test with that?
deshipusure
helleroh
helleralso i was thinking about fixing the arm to that servo
deshipuscrew the horn to it
deshipu(that white plastic cross thing)
hellershould i attach my 3d print to the metal part, or attach the plastic part to servo which comes with it
deshiputo the plastic part, the horn
deshipuattaching to the metal part is tricky, because there is no standard for its shape
deshipuevery servo manufacturer does their own
hellertrue
hellerOkay, i will order that
hellerwhat do you suggest, what to drive it with?
hellerpossibly using pro micro, so no shield will work
helleri do need some external board for the current
helleroh it might take 2.5A
deshipuyou don't need a shield, you can use the Servo library on the pro micro
deshipuyou do want to power the servo separately from the arduino
hellerah yes
hellerfor some reason i remembered i need to power it from the same thing as which controls it
deshipuso just signal and ground connected to arduino, and power and ground connected to servo power
hellerso i dont even need any parts for that :)
helleryeah
deshipuground has to be common
hellerokay
hellerawesome
hellerthanks deshipu
lvlinuxanybody familiar with that Atmega163? Is it possible to add it to supported boards in the Arduino IDE?
akkI know the 168 works, don't know the 163.
IcePicist also about the way you upload code to it, and if avr-gcc and the avr-libc has knowledge of it and so on.
lvlinuxYes I know the 168 is supported already.
lvlinuxAVR-LIBC lists the 163 as supported I believe.
lvlinuxIt's hard to find much info about the 163 because it was pre-Arduino I think.
akkYou can probably make a hardware entry like you do for attiny.
akka directory in sketchbook/hardware with an avr/boards.txt entry.
lvlinuxbut how do i know the correct fuses and such?
HighInBCACTION ❤ datasheets
akkYeah, datasheets may be your only option. There doesn't seem to be much on the web about atmega163.
akkIf you want an easy solution, use a more widely supported chip?
lvlinuxHehe yes that's the easy solution, and I have plenty of 328s, but I found this 163 in a bunch of stuff that I'd bought, with some ATtiny2313s and ATtiny15Ls. So I want to use it just for using it. :)
lvlinuxThe datasheet doesn't say anything about fuses though... :(
lvlinux163 is the predecessor to the Atmega16.
IcePicwell, just using them might be easier than first making the IDE handle all aspects of them, then coding something for them
IcePicyou probably wont get away with "figure out fuses and how to program it" in any case, but how to represent it in the IDE might be a bummer. Or not, haven't done it, but it will be non-zero work to grasp it
akkEven without the IDE the fuses seem to be needed ... at least they are in all the attiny C examples I found.
akkI'm not clear why you can't just say "just load the program and don't change the fuses", but nobody seems to do that.
deskwizard1timemage: made it all pretty :P https://i.imgur.com/mu6Z2Zj.png
jfcaronIs there a way to have per-project board settings?
jfcaronI work on multiple projects with Dues, Unos, Feather M0...it's annoying to keep having to change it depending on what I last worked on.
blathijsjfcaron: Nope. One thing you can do is have per-project preferences.txt and then select the one to use on the commandline.
pwillardremember: The ide is written for noobs... not hardened developers.
jfcaronI was unable to find consistent instructions for avoiding the IDE, especially in terms of library management.
pwillardThat is a correct assessment of the situation
jfcaronIs there a go-to alterative to the IDE? I usually use a text editor + gcc/clang at the command line for other programming.
pwillardI would say maybe the official Atmel Studio.
pwillardThere are some instructions fro using Atmel Studio 7 and Arduino without having to shim in 3rd party payware to make it work
jfcaronblarg.
BirdyNumNumI would second Atmel Studio for taking your progrmaming to the next level, and it's a free download.
jfcaronIt'd be nice to avoid IDEs entirely.
BirdyNumNumhow about vim, avr-gcc, and avrdude?
jfcaronHow hard is it to support both AVR-based Arduinos and ARM-based ones from the same set of command-line tools?
Rickta59do you mean gcc jfcaron ?
pwillardand the atmel tool makes it easier to just code avr's as intended
pwillardit was a crapload of work by the devs to make the arduino IDE be as board agnostic as it is npw
pwillardnow
pwillardNote: for many years now, we have been able to code avr's from command line. when you diverge from avr's... you enter the wild west.
pwillardif you want a new option... look at platformio
Rickta59i was just going to mention that
Rickta59so +1
Rickta59personally I use eclipse for everything because it has the best cross platform code inspection
pwillardthe true arduino cli is an unfinished project at the moment
Rickta59however if I was a windows person (used to be) the visual studio was a great platform , there is a company who has an add on for doing mcu development
Rickta59https://visualgdb.com/?features=embedded
Rickta59although looking at it they don't seem to worry about avr
Rickta59hard to compete with a free atmel studio (which is based on visual studio)
Rickta59you could also look into using the portable feature of the ide to have per board settings
Rickta59https://www.arduino.cc/en/Guide/PortableIDE @ jfcaron
pwillardits usually just all more work and pain and easier to just deal with the ide's pecadillo's
shantaram3013hello.
shantaram3013I was just messing about with my arduino (Uno clone)
shantaram3013I connected a jumper to pin 13 then the other end to +5V
shantaram3013as expected the led lit up
shantaram3013but then
shantaram3013when I unplugged the jumper from 5v I realised the led was still lit and on further investigation found that the led only remained lit as long as I was touching the other end of the jumper(the metal bit) with my finger
shantaram3013can anyone explain why this happens?
akkYou're not being clear on the wiring. All you said is a jumper from pin 13 to +5, which seems to leave out the LED and resistor (you do know to use a resistor with an LED, right?)
shantaram3013I was messing with the internal led
shantaram3013no sketch uploades
akkOh. Then you don't need a jumper at all.
akkThe blink sketch should just work with the built-in LED, no wires needed.
shantaram3013I wanted to do it mechanically instead of in software to see what'd happene
shantaram3013when I connected 5v to 13. but t
shantaram3013but then I realised that if I touched the naked jumper the led lit up although much less brighter than +TV. why was this happening is. what I'm asking
Snert__the question is....does the onboard led still work as expected or is it toast?
shantaram3013still works perfectly
shantaram3013it's a clone board, that uses a normal fat through hole led for the led on 13, and it has a resistor built in to the board
redrabbitpics
shantaram3013Google Image Result
shantaram3013http://2.bp.blogspot.com/-2L82aTxccS4/VX61InxqgLI/AAAAAAAAA6Y/R_GXBKMFScI/s1600/1.JPG
jfcaronHoly discrete through-hole components, Batman!
shantaram3013yeah lol
shantaram3013it's actuallt a pretty cool boars
shantaram3013and it was only like 12 usd
jfcaronAlso dip-switches are sexy.
shantaram3013s/boars/board/g
shantaram3013I still don't understand why touching the naked jumper causes the led to light up
shantaram3013jfcaron: the dip switches control the built in components(ldr, rgb led, the pushbuttons, etc)
jfcaronDo you have a vendor link for that board?
shantaram3013I think their website is down
shantaram3013let me see
pwillardwas it blinking already?
shantaram3013_Hi
shantaram3013_Jfcaron: here's the only site I found that still has it in stock
shantaram3013_http://www.altsense.co.in/product/simplelabs-induino/
pwillardwas it blinking already?
shantaram3013pwillard: like I said there was no sketch loades
shantaram3013or at least afaicr it was the serial sketch
pwillardso not blinking the default blink sketch (You seldom have no sketch loaded unless it has no bootloader)
shantaram3013so the led wasn't being used
shantaram3013I just connected the 13th pin to +5v to see if it would turn on(as +5v basically means high)
shantaram3013it did
pwillardTechnically... this is no different than having an external Switch on a pin in input mode. and default status is all pins are inputs
jfcaron1700 rupees. o_O
shantaram3013then I unplugged it from +5V and left the jumper free. (this was the board's own 5v rail)
pwillardhowever... if the pin was in output state... and you pulled it low... you shorted the output pin
shantaram3013when I touched the naked jumper for some reason the pin lit up
shantaram3013it wasnt in any mode
shantaram3013I had a serial sketch loaded
jfcaronOh that Induino thing uses CH340 USB adapter instead of FTDI. No good for OSX or Linux.
pwillardI explained how you could hurt the pin. The rest is up to you.
shantaram3013jfcaron: mine is an r3 version but it has a ft232
shantaram3013but how did it light up
shantaram3013my finger isnt a power source unless it somehow got energy from my nerves(bioelectricity ftw)
pwillardbecause the PIN drives the LED... to make it light... or not... bu raising the OUTPUT voltage or lowering the output to GND potential.
pwillardWhen in INPUT Mode... electric fields can cause pins state changes if you aren't careful... like your finger.
shantaram3013my finger is an electric field?
pwillardyes
shantaram3013ooh, because of my nerves? that use electricity to transmit information?
pwillardbut how the chip behaves depends on the code... I'm not convinced you really know what code was on there.
Rickta59get an oscilloscope, grab the probe then put your finger near a flowing ac cord .. not the 60Hz sine wave (assuming USA)
Rickta59note the
pwillardWe pick up AC fields and can deposit them in a circuit... for example
shantaram3013jfcaron: and I'm sure it has an ft232 because I remember installing ft232 drivers. besides there's a chip on the base of the board that says ftdi corpn
pwillardThe LED *will* light when it gets 5V from Somewhere... doesn't matter where
shantaram3013pwillard: like when ESD fries a motherboard/cpu
jfcaronOk, one page mentioned that in an update they went from FTDI to CH340. Looks like yours is before the downgrade.
jfcaronDoes anyone here use PlatformIO?
pwillardNo official boards use CH340, btw
Rickta59o'
Rickta59i've tried it .. but don't use it
pwillardI don't like platformio. personally
jfcaronRickta59: Did you try the CLI tools, or just the IDE?
Rickta59I was looking for its ability to do code completion so I was only focused on the IDE
Rickta59i just use make for command line coordination
akkPlatformIO looked sort of heavyweight to install just to get a CLI.
shantaram3013pwillard: I know
akkI use arduino-makefile and was looking to see if PlatformIO might be easier, but it looked much more complicated.
jfcaronIt claims to support all the MCUs that I've ever bumped into.
Rickta59yeah don't believe everything you read
shantaram3013either the atmega8u, 16u or the ft232
Rickta59like with the stm32 implemenation .. it has issues
jfcaronFair enough.
jfcaronI use AVRs, SAMs, and MSP430s.
pwillardI much prefer to use native solution for MSP430
Rickta59are you writing to the arduino api for all of them jfcaron ?
jfcaronNo.
Rickta59what are you hoping to accomplish then?
Rickta59just a single editor?
jfcaronMostly.
Rickta59what do you use for the different things? arduino for avr/sam and CCS for msp430?
jfcaronArduino for AVR/SAM, text editor + cli for msp430.
Rickta59you are using windows or linux ?
jfcaronTbh I kinda dropped msp430 when my workplace emphasized using Arduinos, but I'd like to get back to them. OSX.
jfcaronWe work with a lot of students and they mostly only know Arduino, if anything.
Rickta59have you tried energia?
Rickta59and which msp430s do you want to use?
jfcaronI tried Energia a little bit, but I found it very lacking.
jfcaronThe cheap ones, g2553.
Rickta59the api was lacking or the energia ide?
pwillardI like the red... lol
jfcaronIt was over a year ago, I don't really remember. I think it was difficult to understand what it was doing.
jfcaronAnd the default window size was really tiny. =p
Rickta59so do you write code to the arduino api on the msp430?
jfcaronNo.
Rickta59i find the eclipse ide meets all my needs ... but still i use emacs and vi too .. sometimes gedit
Rickta59however to make it work with different mcus requires different approaches
jfcaronWhat I'd like is to use the text editor I'm familiar with, but with simplified library management and compile/upload cycles.
akkThe arduino IDE will let you use another editor.
Rickta59that is the whole purpose of the ardunio ide .. and just use the "external editor" feature
pwillardThe external editor option is really implemented in an odd way though
jfcaronNever heard of it, googling now.
shantaram3013when was this external editor thing implemented
shantaram3013I haven't heard of it either
Rickta59File/Preferences checkbox "Use external editor"
pwillardages ago
shantaram3013 _
pwillardas in many years
shantaram3013approximate version number?
Rickta59.9
blathijspwillard: Odd how? It disables internal editing, and reloads the file whenever you hit compile or upload IIRC.
jfcaronhttp://www.mercedescoyle.com/blog/arduino-programming-part-1-ides/
shantaram3013I got on the arduino scene on like 1.0.5 or 1.5.6 or something
pwillardthen you have had the option
Mangy_DogI could do with a little help trying to do a basic port of the gameduino2 library (current version) to stm32duino core... From what i can tell the only thing that needs any kind of conversion is how it uses SPI, but im struggling to understand how to fix it... When compiling under stm32 core I currently get this compile error, error: 'SPSR' was not declared in this scope SPSR = (1 << SPI2X);'
Mangy_DogCan anyone help or point me in the right direction?
blathijspwillard: There is some work ongoing to just let the IDE always show a popup asking to reload when a file is changed externally, which should void the need for the "external editor" option, though.
jfcaronI use really obscure MCUs, you probably haven't heard of them.
jfcaron</hipster>
pwillardWhich is actually the behavior I always expected.
Rickta59looks like it is using the avr spi registers directly Mangy_Dog
Rickta59you have to turn those into standard spi calls
blathijsMangy_Dog: It sounds like gameduino is using the AVR-specific SPI hardware directly through hardware registers, instead of using the properly abstracted "SPI" library.
shantaram3013jfcaron: like?
jfcaronT'was a joke. =p
Mangy_Doggiven you both said that i think that means.... yes your both right :p
Mangy_Dogyeah i suspected it was doing something like that
jfcaron<hipster> Oh I actually spin my own MCU architecture on an FPGA. You really get a better feel for the computation that way. </hipster>
jfcaronI wish I could be like that ^
Inari-Well, you do?
Inari-I mean you probably shouldn't actually use it, but it's a nice learning experience
blathijsjfcaron: Building a CPU on an FPGA is actually a really fun exercise, and it *indeed* gives you a better understanding of how a program really runs. Did that once in university, really much fun :-)
shantaram3013<hipster> oh, I built my own chip fab, then designed and manufactured my own FPGA chips, then wrote compatible software on a CPU architecture that I also designed myself and used silicon I mined with my bare hands to make to make my own mcus</hipster>
Mangy_Dogi bearly understand binary i doubt ill be able to design a simple cpu on fpga :p
jfcaronMaybe as a retirement project.
shantaram3013Mangy_Dog: binary is easy
Rickta59there is neo430 source code you might look at jfcaron
shantaram3013there's a simple trick to it
blathijsshantaram3013: Don't forget to design your own language and write a compiler :-p
Mangy_Dogeasy for you to say :p
Rickta59fairly simple
shantaram3013blathijs: damn! you're right
blathijsAlso, building your own CPU architecture isn't really a hipster thing, way too nerdy :-p
shantaram3013Mangy_Dog: okay just take a number, say 15
Mangy_Dogis it snort nasal speaking pushing glasses up the bridge of your nose nerdy?
shantaram3013then start subtracting powers of 2 from it. subtract the highest power of 2 you can
shantaram3013in this case 8
shantaram301315 -8 = 7
Rickta59it is more like doing a grain brew instead of a malt extract brew
Mangy_Dogthats not nerdy thats hipstery
Mangy_Dogshantaram3013 i am reading carry on...
shantaram3013so one of 2³ and then 7 -4 = 3 so one of 2² and 3 -2 = 1 so one of 2² and one of 2^0
shantaram301315 = 0(2^7)+0(2^6)+0(2^5)+0(2^4)+1(2^3)+1(2^2)+1(2^1)+1(2^0)
shantaram301315 = 00001111
Mangy_DogACTION brain explodes
shantaram3013in 8 bits that is
shantaram3013when you wanna extend it to 32 bits
shantaram301315 = 0000 0000 0000 0000 0000 0000 0000 1111
Mangy_DogACTION cries
shantaram3013you can represent any number as the sum of powers of 2
shantaram3013that's what binary relies on
shantaram3013as the unique sum of*
Mangy_Dogi should have mentioned to start off with im rather dyslexic
Mangy_Dogmaths wasnt my strong suite
Mangy_Dog-e
shantaram3013okay okay
shantaram3013Mangy_Dog: do you know what a power of two is
shantaram3013and do g
Mangy_Dognot really....
shantaram3013you know what who le
shantaram3013whole numbers are
Mangy_Dogi mean i thought it was another way of saying times of... but
Mangy_Dogno... i dont know
shantaram3013okay let's start from the top. whole numbers are regular counting numbers (1,2,3,4 and so on) but they have an extra number in them, 0
Mangy_Dogi programme to make pretty things... ive had a life time of making pretty things
Mangy_Dog<<< graphics artist by trade really
shantaram3013Mangy_Dog: that's pretty damn cool actually
shantaram3013so whole numbers are 0,1,2,3,4 and so om
shantaram3013on*
shantaram3013now a power of any number is that number multiplied by itself a given number of time
shantaram3013times*
Mangy_Doghttps://www.youtube.com/watch?v=QtLtihhfuvk ,my current project
shantaram30132^3 (read as two to the third power) is two multiplied by itself thrice
shantaram30132 × 2 × 2
Mangy_Dogok
Mangy_Dogthat kinda makes sence
shantaram3013so tell me, what is 2^4
Mangy_Dog10^6 = million?
shantaram3013yes
Mangy_Dog8?
shantaram30132^4 is 16 but good try
Mangy_Dogsorry i times it wrong way :/
shantaram30132x2 = 4, 2x2x2 = 8, 2x2x2x2 = 16
Mangy_Dognods
shantaram3013what is 3^2?
Mangy_Dog9?
shantaram3013yes
shantaram3013good, you're getting the hang of it
Mangy_Dog3^3= 27?
shantaram3013correct
shantaram3013here's something to remember. any number to the 0th power equals 1
shantaram30136^0=1
shantaram3013and any number to the first power is itself
shantaram30135^1 = 5
Mangy_Doghmm ok
KaedennWhy does the Uno have a USB B and not USB A, mini, or micro?
shantaram3013now, we go back to binary
KaedennI never understood that design decision
Mangy_Dog00010000 = 5?that doesnt seem right
shantaram301300010000 is 16
pwillardand A? That would just be wrong
shantaram3013remember comoter
shantaram3013remember computers count in whole numbers
KaedennMangy_Dog: 256 128 64 32 16 8 4 2 1 are the individual digits
shantaram3013exactlt
KaedennMangy_Dog: that number * 0 or 1, add up the results, that's your number converted from binary to base 10
Rickta59shantaram3013: .. I went and looked up when the external feature was added ... I went back to the first arduino 1.0 .. it had it so probably from the outset .. it is in the wiring ide too from the start
pwillardRemember when the UNO came out... the B connection was the most common option and that made it get "locked" into the design... just like that stupid pin spacing.
Kaedenn0101 to decimal is 0 * 8 + 1 * 4 + 0 * 2 + 1 * 1 = 4 + 1 = 5
shantaram3013Rickta59: wish. how come I never noticed it before
Rickta59i don't .. i just found out in the last year that there is an auto format feature
Kaedennpwillard: you mean the pitch between the pins, or the distance between each row?
shantaram3013just keep subtracting powers of 2
shantaram3013take for example, 25
shantaram3013the largest power of two you can subtract is 15
shantaram301316*
Kaedenn16
shantaram301325-16= 9
pwillardthe 2 connectors for digital pins 0 through 13 are not spaced at a 2.54mm interval
shantaram3013then you subtract 8 which is 2^3
shantaram30139-8 = 1
shantaram30131 = 2^0
shantaram3013now there are 0(2^7), 0
Kaedennpwillard: ...I vaguely remember discovering this when trying to connect things directly to the headers
shantaram30130(2^7)+0(2^6)+0(2^5)+1(2^4)+1(2^3)+0(2^2)+0(2^1)+1(2^0)
pwillardright
shantaram301325= 00011001
pwillardthis is also why we use hexadecimal... its easier
shantaram3013I just learnt binary two days ago
shantaram3013don't force hexadecjam
shantaram3013decia
shantaram3013hexadecimal down my throat
shantaram3013ine
shantaram3013I mean, I know the basics
Mangy_Dogheh
shantaram3013there are numbers 0-F
Mangy_Dogok that makes a little more sence
shantaram3013and you use combinations of these to make characters
xxoxxhi. If I change frequency on timer0, can I still still use millis function ?
pwillardYou are going to find MANY examples of hex in arduino code
shantaram3013Mangy_Dog: so represent 13 in binary
Mangy_Dogthats because for the processor its more efficiant
Rickta59i find using the binary constant is sometimes less confusing, say 0b111 instead of 7
Mangy_Doguuummmmmm
Mangy_Dogi cant :(
Mangy_Dogyou explain it and i get it... but i cant do it:/
Mangy_Dogim not sure my heads into it right now
pwillardit depends. When controlling port pins... I agree... binary can make it simpler... especially when driving a 7 segment display.
Rickta59$ gdb -q
Rickta59(gdb) p/x 13
Rickta59$1 = 0xd
lvlinuxFor anyone who's interested, I found this very nice fuse calculator, and it has Atmega163 fuses too (in addition to all the popular chips): http://www.engbedded.com/fusecalc/
Rickta59(gdb) p/t 13
Rickta59$2 = 1101
shantaram3013Mangy_Dog: relax, you'll get the hang of it
Mangy_Dognods maybe
Mangy_Dogtbh im currently just struggling to get the hang of trying to port this library
shantaram3013yep, 1101
pwillardChanging fuses and using arduino tend to be antagonists to each other.
Rickta59doesn't the gameduino hardware depend on sepcific hardware?
shantaram3013gameduino or gamebuino?
Rickta59are you using this stuff ? http://excamera.com/sphinx/gameduino/samples/
shantaram3013I don't mean to act stupid or rude
Rickta59@ Mangy_Dog
shantaram3013just making sure you mean the shield and not the game console and...oh, never mind
Mangy_Dogits just a library for ftdi eve graphics chips
Rickta59if you are .. that has already has done the work for you
Mangy_Doghes designed a shield that makes it easy...
Rickta59#ifdef BOARD_maple
Rickta59shows you the difference between avr and stm32
Mangy_Dogtheres no board maple in his library?
Rickta59http://excamera.com/files/gameduino/synth/sketches/Gameduino.zip i just downloaded that to look at it
Rickta59is that what you are using @ Mangy_Dog ?
Mangy_Dogyeah
Rickta59it is from june 2015 .. so that code has been in there a while
Mangy_Dogthat looks like the old version
Rickta59where did you get yours?
Mangy_Dogthe latest version was from a few weeks ago
Rickta59* Maple boards are EOLed
Mangy_Doghttp://excamera.com/files/Gameduino2.zip
Rickta59but that doesn't mean the work for how to use SPI in an stm32 isn't valid
Mangy_Dogyeah the gd2 is the current lib... it covers gd3 as well
Mangy_Dogsorry yeah gd1 is the outdated one
Rickta59you need to look at the other version to see what is different
Rickta59the avr one is going directly at the registers
Rickta59the stm32 version is using spi calls
Rickta59both end up setting the spi speed
Rickta59which stm32 board are you using? it looks like the new one knows about the STM32L4
Rickta59and the esp8266
Mangy_Dogim using stm32 f103 and f407
Mangy_Dognot the l4
Rickta59the problem is the sam .. avr uses registers
Rickta59those other ones use SPI calls to set the spi speed
Rickta59same
Mangy_Doghmmm
shantaram3013https://pasteboard.co/H6gWZnG.png
shantaram3013tried to assemble a kit of hobbyist electronics components
Mangy_Dogi assume you know what your doing.... if and i realise its a big ask... if you were to do a simple port to just get it working... how long would it takee you?
shantaram3013did I miss anything major
Mangy_Dogbtw thats not asking you to do it
Mangy_Dogjust if you were to do it
Rickta59send me a gameduino board and I'll have it done bingobango
Mangy_Dogheh
Mangy_Dogdont have any spare
Rickta59yeah heh
shantaram3013that pasteboard link is the entire list
shantaram3013sorry heheh i was too impatient to pastebin
Rickta59and $39 would be very inexpensive compared to my normal rate
Mangy_Doglol
Mangy_Dogtrue
shantaram3013the worst part is I was on a budget
shantaram3013of literally $15
Mangy_Dogwhat im getting at is... is it a big thing to fix it or really just a few minutes of redoign the spi calls?
shantaram3013the IC pullers were out of stock
Rickta59grep for STM32 in the source
Rickta59that is the places you have to change it
Mangy_Dogif you say it would take 10-30 minutes for you to do... then ill put int 5 hours to do it kinda going in blind though
shantaram3013https://pasteboard.co/H6gWZnG.png
shantaram3013crappy sorry
Mangy_Dogok
shantaram3013crap*
shantaram3013wrong channel
Rickta59https://dpaste.de/gCfv look at the code in those file and you will understand what you need to change
Mangy_Dog404
Rickta59https://dpaste.de/gCfv case sensitive
Mangy_Dogstill 404...
Rickta59i just went to netrendere.com and it found it
Rickta59https://netrenderer.com/ put in the url
Mangy_Dogthat loaded :p
Mangy_Dogmaybe my isp is playing up
Rickta59must be banning germany
Mangy_Doglol
Mangy_Dogblame brexit
Rickta59so basically you can see 2 files and a few places you have to understand
Rickta59if it had to be changed for STM32L4 you need to do something similar
Mangy_Dognods
Mangy_Dogim currently trying to find the define for stm32f4 and maple
Mangy_Dogso i can add th ecode
timemageMangy_Dog, which define?
Mangy_Dogwhat mcu im using
timemageMangy_Dog, well, arm gcc doc will have something on predefined macros. maple is a pcb yeah? if thee'es a define for that it's probaly given in a -D
Mangy_Dogkeeping an eye out
timemageMangy_Dog, looks like they pass the core type, e.g. cortex-m4. so the part is less identifiable from the -mcpu option alone.
Rickta59timemage: i just took a look at it .. the big issue i see is that it uses spi transactions and the smt32duino libmaple core doesn't really implement them so it may or may not have issues
hellerso guys, where can i find most quiet servo?
helleri want to do some arduino-stuff at kitchen
hellerneeds not to make noise :P
Rickta59the board use spi for the fpga and the sd card so it has to devices on the spi channel
hellerand is ultrasonic sensors still good, or is there something better for max 50cm?
timemageRickta59, i haven't been following beyond the part about identifing the mcu/board via macros.
Rickta59i was off looking so i wasn't following either
Rickta59the libmaple stm32duino stuff has some code in there for transactions, just not sure if it is complete enough for it to actually work
Rickta59https://github.com/rogerclarkmelbourne/Arduino_STM32/issues/7
Rickta59the generic core might be better, don't know i haven't tried it
Mangy_Dogi think the generic cores are more for the f4 chips
Mangy_Dogand mostly just copy whats in the f1 cores from roger
timemageRickta59, so far i've done very little with arm under arduino. i did get an stm32 nucleo board working with it though.
Rickta59https://github.com/danieleff/STM32GENERIC/blob/master/STM32/libraries/SPI/src/SPI.cpp#L123 ...
Rickta59that looks much more complete
timemageRickta59, and i used it with one of those old nokia phone displays, which was spi iirc.
Rickta59sure. did you try the transaction stuff with multiple spi?
Rickta59i haven't so i can't say
Rickta59my only concern was the issue in the github about it
hyperiscoany idea what this sensor with a spring in it is… was in a typical sensor kit… called a "knock sensor"
Rickta59you might start with your f4 board and the generic core Mangy_Dog
timemageRickta59, hmm, i can look at the code. i think i did use .beginTransaction. not sure quite what is meant by multiple spi though. you just mean multiple devices?
Mangy_Dogi tried to compile direct with that before :p though thats before any define changes
Rickta59yes begintransaction is all about handling multiple spi devices on the same pins that have different speeds or byte order
Rickta59you are going to have to find the defines used by your board Mangy_Dog and make the header changes
Mangy_Dogyeah
Mangy_Dogsearching nmow
Mangy_Dognow
Mangy_Dogthanks btw
Rickta59yw
Mangy_Dogshould have said that sooner :)
hyperiscoit looks like this https://www.amazon.com/Goliton-Knock-Sensor-Module-Arduino/dp/B01N63JCAK
timemageRickta59, hmm, i just saw it was a convenience thing for setting the mode and all that. so far as i know it only helps load settings up easily. anyway, my code has a bunch of #ifdef DOTRANSACT in it, which i wrapped around the transactional stuff, and didn't define. so apparently i did have some sort of problem using beginTransaction/endTransaction
Mangy_Dogthats a motion sensor
timemageRickta59, this was january 8th. you'd think i'd remember but no.
Mangy_Dogpretty basic reed spring switch
hyperiscoI get a signal if I give it a good flick with my finger
timemageRickta59, oh wait, actually i do have it enabled.
timemageRickta59, actually it's more screwed up than that. i have it in the main code enabled, but not being used. and then in the code that was broken out into separate fileset i have it disabled.
Simoniousis there a problem displaying uint32_t using Serial.print?
klineSimonious, why do you ask?
Simoniousbecause as I'm bitshifting values, it marches off the left and I'm left with an unexpected 0 on my output
klineprobably would be ideal if you can post up a minimal example case
Simoniousok, I'll see what I can do.
klinesomething like `for (int s = 0; s < 32; s++){ Serial.print(1 << s); Serial.println(""); }`
klineyou should see it stepping it up as it goes and also at what point it fails
rupeyhi, how would you connect 20 leds to an arduino? every port with a transistor to reduce the amout of current flowing from the board? any other ways?
klinedepends on your needs, id probably get an LED driver or a few shift registers
Simonious^
Simoniouswell kline.. my simple example actually works just fine.. so I guess I need to go hunting for the real problem
Simonioushttps://pastebin.com/udSE6Yst
rawtazhi. curious question; i have an Adafruit Ethernet FeatherWing here, and noticed that the shield of the ethernet port is not connected to GND. shouldnt it be? i also have a FONA and the SIM card slot's shield is connected to GND.
Snert__verified by using an ohmmeter/DVM to check for continuity to ground?
JPT*grabs an ethernet cable and tests for continuity
klinerawtaz, have you checked the datasheet for "should" and datasheet for "designed to"?
DatzI think vaugly remember somehting in the USB standard that indicated that shields should/or don't have to be grounded.
klineid agree that it probably should, but checking is better than not
JPTLooks like my ethernet cable has no continuity for that silver part of the plug
JPTAlso, i remember that the shields of very long cables should not be grounded on both sides due to difference in ground potential being able to break equipment
JPTNot sure if that's a thing though
klineJPT, remember that ethernet cables are weird and also shields are often grounded for different reasons
klineie, just plugging a cable in doesnt mean any of its pins will be electrically close to the shield/chassis ground
rawtazSnert__: yes, exactly that
JPTI'll try and remember that :)
rawtazSnert__: to be more specific, i checked whether or not the shield of the ethernet port and the GND pins on the same board were connected
rawtazkline: no
klineJPT, also your probably thinking of ground loops for the "dont ground at both ends" thing. many ethernet cable/sockets are designed as very long transformers as well so that no absolutely voltage reference (such as common ground) need be shared between the two devices at either end
klinethey work on voltage differentials instead
mrpacketheadread about bob-smith termination with regard to Grounds and sheilds for Ethernet
klinerawtaz, no to what?
rawtazthe funny thing is that i bought a shielded ethernet cable, but since both ends are these featherwings im not sure that has any effect. but perhaps it somehow distributes interferance so it's better this way anyway :o
rawtazkline: i didnt check datasheets in this case :)
rawtazACTION ducks "bob-smith termination"
mrpacketheadfyi, if you are using STP and dont' have it property grounded. then you are in a worse place than using UTP
rawtazyeah? oh my :/
mrpacketheadunless you are in a *very* very electrfically noisty situation, there is no advantage, and often you'll be in a worse place
rawtazperhaps i should use an UTP i have lying here instead then.
rawtazhow come it's worse in that case?
mrpacketheadas a general rule, use UTP, unlesss you have to use STP
JPTkline: All i recalled was a teacher telling the class something about different ground potentials being an issue. Thanks for clearing things up for me. :)
mrpacketheadbecuase youv'e just built an antenna, which picks up all sorts of noise, but not provided any patth for it to flow to ground
mrpacketheadthe only place for it to go is into the signal wires.
rawtazmrpackethead: through magnetic induction or similar, i take it?
klinemrpackethead, we're talking about the port shielding, not the cable shielding i think
mrpacketheadif you have a sheilded cable, the sheild MUST be connected to a earth but jat just one end.
klinei think its unlikely the cable is shielded
mrpackethead<rawtaz> the funny thing is that i bought a shielded ethernet cable,
klineoj
klinerawtaz, that was silly
mrpacketheadin all likelyhood, it will just work fine
rawtazmrpackethead: makes sense, and thats what made me somewhat confused when i noticed it's not grounded :)
mrpacketheadit takes a pretty significnat amount of noise to degrade performance
rawtazyeah. but ill use the UTP anyway, no reason to STP in this situation
mrpacketheadtry it, if it works no problem
rawtazkline: yep :) this one is on me ;)
rupey@kline thx, what shift register would you suggest if i want to drive each led (maybe at the same time) mit the standard current of 20ma per led?
klinewhatever shift register has an individual pin current limit of at least 20mA and a collective limit of at least 20mA * number of pins
rawtazthanks for all your input guys, i appreciate it <3
rawtaz(and gals)
mrpacketheadprobaby not any
mrpacketheadstick a line driver after your shift register
BHXYou could also use a standard 595HTC and reduce the current per led to 8mA (or use low current leds @ 2mA)
klineBHX, but i already have a bag of 1000 20ma red leds
BHXAre they not bright enough at 8mA?
mrpacketheadhave you tryed runnnig them at 2mA?
BHXDoes abody know a reason not to connect the gate of an N-channel MOSFET (Rated ±12 VGS) to a voltage larger than its drain and source voltage (like using -3 / +9Volts to switch 0 / 3.3 Volts)?
rupeyok, so i better try running them at 8ma, but then u would not need to use a shift register at all as long as i habe enough pins on my arduino
BHXWell, you seem to be looking for a driver rather than a shift register then
rupeywell ok, thx
BHXSomething like an STP16CP05 for example
BHXoh... nevermind then ;)
rawtazanother silly question.. does anyone know if with the FONA ( https://learn.adafruit.com/adafruit-feather-32u4-fona ) it's possible to detect whether or not the Vusb is still providing power? i would like to send an SMS when the USB power is lost.
Greg__Where are you buying your 3.7 Lipos from in the US?
Greg__Is Adafruit the best place, or is there somewhere else that has better deals on quality batteries?
sibiriarawtaz: at the very least you can wire the USB Vin via a resistor to a digital input
Greg__.
rawtazsibiria: yeah.. was hoping i wouldnt have to but thats what ill do if needed. on the teensy 3.2 i can just connect it straight to the input if im not mistaken (as theyre 5V tolerant), but in this case dont i need a voltage divider to get it down to 3.3V?
rawtazsibiria: or should the one resistor you suggest in practice be one of the two resistances dividing the voltage, the input being the second one?
sibiriarawtaz: yes
sibiriaa voltage divider is needed
sibiriaand will suffice since you're not going to have any varying current going through there
rawtazyeah. so e.g. a voltage divider made up of a 100ohm and a 200ohm resistor pair would work i guess? those two over Vusb and GND, and the middle of them to the digital in.
sibiriaiirc 100 and 200 ohm will end up just over 3.3v yeah
rawtazyeah, 200/300 is 66% which is the same as 3.3/5
sibiriaand that's correct, you pull the divided voltage from between the two of them
rawtazokay, thanks :)
sibiria100 ohm on the positive rail, 200 on the ground side
rawtazyeah exactly :)
rawtazthis is pretty nice btw: "Other Feather's have a resistor divider to read the battery voltage. We decided to skip this and instead let you read the battery voltage via the cellular module using the AT+CBC command, which will give you the battery voltage in millivolts."
rawtazthats for the FONA
sibiriarather neat
sibiriathat's one of the required functions of the GSM spec
sibiriacellular devices communicate their battery status when they advertise themself to base stations
rawtazi really like the teensy being 5V tolerant. i dunno why but i find that most things i touch are 5V here and there. for example USB power supplies and some logic levels as well
rawtazoh, right. makes sense, that.
drewmuttIsn’t that a mild vulnerability?
drewmuttI can’t imagine why, but still.
sibiriai don't think the information can be exploited in anything besides possibly "fooling" law enforcement to some degree
sibiriathe data is still rather volatile
sibiriaa whole lot of the specifications for 2g, 3g etc. are built around law enforcement and search and rescue
sibiriathe former offering quite nasty stuff
sibiria3g is a quite powerful tracking construct
sibiriawithout positional components
Greg-JIt looks like Adafruit and Sparkfun have pretty small inventories of LiPos. Anywhere else trustworthy?
drewmuttAmazon?
xxoxxhi. I found maybe a bug with Arduino IDE.
sibiriaebay? :P can't go wrong if you pick up 3 for $2!
Rickta59just one xxoxx ?
xxoxxRickta59: this one is particularly annoying.
xxoxxthe screen display font seem to be off
xxoxxso '=' shows up lik '-'
Rickta59which font typeface?
drewmuttAliexpress if you have patience.
xxoxxdisplaying set at 150% scale on Win7 with 4k display
xxoxxjust the default font
Rickta59"set at 150%" .. and if you set it to 151? does it change?
Rickta59or 160
Rickta59166
xxoxx150% is at Win7 display option. Inside Arduino, UI scaling is 100%
xxoxxWin7 only gives you 3 choices
Rickta591st world problems
Rickta594k display ..
xxoxx?
xxoxxI have 12k display real-estate on primary desktop
Rickta59are you sure it isn't a render problem with your video card and win7?
deshipu3rd world problems: Windows
xxoxxit is only problem with Arduino. Everything else work fine. e.g. Atmel Studio
Rickta59how about other java apps?
Rickta59are you keeping your java up to date?
xxoxxJava?
Rickta59isn't arduino java on win7?
Rickta59that is what is doing the rendering
deshipuArduino IDE is Java
xxoxxok, interesting ...let me check eclipse
deshipueverywhere
sibiriait is, but it's bundled
Rickta59arduino using the java awt i think .. eclipse will be using its own gdi
xxoxxanother pesky little thing with Arduino IDE, it will not remember association with .ino files.
sibiriano need to install it separately
xxoxxthis apparently after installing AtmelStudio with VisualMicro
xxoxxnow .ino refuses to be associated with Arduino IDE...
Rickta59visualmicro is smarter than you , it knows you want to use it
xxoxxi am thinking about getting a license for visualmicro
xxoxxbut i still want the plain old arduino ide
Rickta59did you try using a different font in the arduino ide?
xxoxxfor simple one-file test sketches, arduino ide is very convenient
xxoxxi didn't find a place to find font face in arduino ide, only see place to change font size
Rickta59it is in the preference file
xxoxxi changed font to various sizes, it displays '=' as '-' in all sizes up to 30 points
Rickta59preferences.txt
xxoxxok let me check
xxoxxpreferences.txt just says "Monospaced,plain,24"
Rickta59https://forum.arduino.cc/index.php?topic=435093.0
xxoxxok thanks for pointer
xxoxxand another thing, still no convenient way to change PWM frequency.
Rickta59alas .. you found 2 bugs
Rickta59changing the scaling in the ide is probably the best solution .. at 150% in the ide my fonts look nice
xxoxxok
Rickta59* they should have a check box for *old person scaling
jfcaronAnyone know where I could find button caps for this thing? https://www.adafruit.com/product/772 The display screen is a good 0.5cm higher than the buttons, so it seems tricky to make a cover for an enclosure.
xxoxxthis '=' display issue persists; annoying ...
jfcaronWhere do you find caps for buttons anyways?
deshipuno patience
xxoxxdamn it. just ditched Arduino IDE...
xxoxxstick with Atmel Studio from now on ..
rawtazhmm, where would i find specs on what minimum voltage the digital inputs on the adafruit feathers (in particular the FONA) interprets as high/active signal?
sibiriarefer to the MCU's specs
rawtazhm, should be the 32u4 then
sibiria(atmel's spec sheet, that is)
sibiriaor microchip these days
malinusI hate how the google results of atmega datasheets redirects to microchip
sibiriawell, they bought atmel
sibiriaatmel.com is no more
timemagemalinus, yeah well, would happen sooner or late i guess. it bothers me that they've failed to redirect a lot of things that don't appear in search results and at the same time they've removed the doc from the original url.
timemagemalinus, when they first put up the results on microchip.com, there was no complete datasheet. basically search results were the only way to get one.
xxoxxI am moving into ESP8266 ...
rawtazhmm. on page 383 in the complete datasheet for 32u4 at http://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-7766-8-bit-AVR-ATmega16U4-32U4_Datasheet.pdf it says V_IH (Input High Voltage) is minimum 0.2 Vcc which for the defined condition of Vcc being 2.7V-5.5V is 2.7*0.2=0.54V. so in summary, the lowest voltage i can put on a digital input, and still expect the uC to think that input is high, is about 0.54V, right?
xxoxxhi
xxoxxwhat is the purpose of Force Output Compare ?
xxoxxon TCCRnC
xxoxxwhat are some use cases where it's useful ?
timemagexxoxx, iirc, when the wgm is in use the PORTx bit isn't effective. so if you want to manually toggle the bit without shutting off the WGM you need that mechanism.
xxoxxtimemage: thanks
pink_vampireis there a way to get the data from the HF free multimeter in to an arduino?
timemagexxoxx, look for "Compare Match Output Unit, Schematic" in the datasheet. you'll see a mux there effectively disconnects the PORT register from the COMnx# bits are set.
timemagexxoxx, you'll also see the force output compare bit shown.
timemagexxoxx, erm, "... PORT register from [the pin when] the COMnx# ..."
timemagepink_vampire, 'hf free multimeter' ?
pink_vampireyou are not from the us?
timemagepink_vampire, apparently not.
tgunrI am try to set up two 2560 such that the SPI master will program the slave. From all the reading it is not clear to me if the slave gets its power from the iscp Vcc or does it need to be powered up from the battery or USB in addition to Vcc?
timemagetgunr, uhh, the chip doesn't care. there have been programmers that power targets through vcc. programmers that get powered from the target via vcc. and ones that do neither but may use vcc in level conversion/isolation circuitry.
pink_vampiretimemage: http://i1.wp.com/struggleville.net/wp-content/uploads/2016/06/HarborFreightExpires362017-Copy-2.jpeg
tgunrso then, if I plug in the USB for the slave I dont need to tie Vcc on ISCP header?
pink_vampirethe publish this coupon almost every month ..
pink_vampirei have about 5 of them
timemagetgunr, it's not really clear to me what you're doing, so difficult to give an accurate answer.
pink_vampireis there a way to read it with the arduino?
tgunrright noww I have the two headers tied together, master <-> slave (ICSP)
timemagetgunr, when you said "two 2560" you mean an entire arduino, yeah?
tgunrreason I'm asking is the master which is running Ardunio as ISP doesn't seem to connect to the slave
tgunryes
timemagetgunr, well, it's up to you then whether or not you want the slave powered from the target. imo do that and don't plug in the slave's usb cable/external psu. or don't do that and do plug in the slaves's usb/external psu. imo, not a great idea to do both. also you have something of a problem there if you're connecting resets together.
timemagetgunr, the master needs to be able to use a gpio pin to reset the slave. and it must not have that reset coming back over the isp cable causing the master to reset also .
tgunryes, sorry, meant that, i have the master pin 10 going to slave reset
timemagetgunr, yes, *and* you do *not* have the reset line connected between the isp headers, yeah?
tgunrcorrect
timemagetgunr, okay.
tgunrok, will double check every thing again
timemagetgunr, also your mega2560 needs to have it's dtr reset disabled one way or another if you're trying to use it with the arduinoisp sketch.
tgunrhmm, ok lookig
timemagetgunr, if you have a arduino micro, leonardo, pro micro to use instead, use that. no need to mess with it then.
tgunrno have
rawtazwhat about a nice little teensy 3.2 instead?
timemagerawtaz, for isp programming?
rawtazhm, i thought he was talking about a mega 2560, but didnt know he's doing something that the teensy doesnt do :<
tgunrif the only have Vcc on slave tied to Vcc on master, shouldn't the ON led come on?
tgunrI only have the 2 2560's
timemagetgunr, assuming you connected ground also, yes
tgunri am, and its off :(, checking
tgunrgot a little further, now the IDE is saying avrdude: Device signature = 0x000000
timemagerawtaz, well, a teensy could be used to program a mega 2560. not sure i'd recommend it over another mega 2560 though.
timemagetgunr, check connections again.
BHXSorry to ask again: Does anbody know a reason not to connect the gate of an N-channel MOSFET (Rated ±12 VGS) to a voltage larger than its drain and source voltage (like using -3 / +9Volts to switch 0 / 3.3 Volts)?
timemagetypical nchannel mosfet
timemageack
timemageBHX, i dunno that you'll have that problem with a typical nchannel mosfet. but it helps to have a specific part to look at the specs on.