#avr | Logs for 2014-05-11

Back
[05:16:47] <clixxIO> Hello
[05:36:49] <antto> gudbai *shrug*
[06:11:19] <clixxIO_> Hello
[06:11:41] <clixxIO_> I wrote a command processor for my attiny85
[06:11:54] <clixxIO_> https://github.com/clixx-io/clixx.io/blob/master/examples_eventframework/seriallinehander/seriallinehander.cpp
[06:12:49] <bitd> clixxIO_, would you like a cookie or something? :P
[06:13:11] * megal0maniac_afk gives clixxIO_ a cookie
[06:13:16] <clixxIO_> Thanks for the thought, but I just had some
[06:13:29] <clixxIO_> I already rewarded myself
[06:13:30] <megal0maniac_afk> Tom_itx: Y u is ops?
[06:13:58] <clixxIO_> with cookies
[06:15:03] <clixxIO_> but cmon guys, is that a straight looking avr program? its "2924 bytes of flash verified"
[06:15:21] <clixxIO_> so there's 5k to spare
[06:18:36] <clixxIO_> I have my new python code-generator somewhat working. So it asks you what you want in your program
[06:19:08] <clixxIO_> dlyon@dlyon-HP8000SFF:~/clixx.io/eventframework$ python mkproject.py seriallinehander -t attiny85
[06:19:25] <clixxIO_> This will build a basic Event-framework program that you
[06:19:35] <clixxIO_> can then customise to suit your needs.
[06:19:47] <clixxIO_> A Makefile and project base will be created for the attiny85 platform
[06:19:58] <clixxIO_> and the project directory will be : /home/dlyon/IoT/seriallinehander
[06:20:15] <clixxIO_> Does the program need a setup function (y,n,i) ? y
[06:20:33] <clixxIO_> Does the program need to handle Pin Changes (hardware-pinchange-interrupts) (y,n,i) ? n
[06:20:50] <clixxIO_> Does the program need periodic timers (hardware-timer-interrupts) (y,n,i) ?
[06:21:09] <clixxIO_> Does the program need a polling loop (y,n,i) ? n
[06:21:37] <clixxIO_> Does the program need to handle incoming serial (hardware-serial-interrupts) (y,n,i) ? y
[06:21:59] <clixxIO_> An Event for a complete line of serial text (y,n,i) ?y
[06:22:17] <clixxIO_> An Event for when the serial port is opened (y,n,i) ?n
[06:22:33] <clixxIO_> An Event for when the serial port is closed (y,n,i) ?n
[06:22:56] <clixxIO_> An Event for every serial character (y,n,i) ?n
[06:23:22] <clixxIO_> Target platform is attiny85
[06:23:33] <clixxIO_> ('Selections are :', ['program_setup', 'program_serial', 'serial_line'])
[06:23:48] <clixxIO_> Project files successfully rendered to /home/dlyon/IoT/seriallinehander
[06:24:08] <clixxIO_> That's what was used to create that program
[06:25:24] <clixxIO_> On a serial terminal:
[06:25:38] <clixxIO_> Serial Line Handler Example running at 19200 baud
[06:25:54] <clixxIO_> Turn On instruction was received
[06:26:04] <clixxIO_> off
[06:26:15] <clixxIO_> Serial line was:off
[06:26:36] <clixxIO_> yes it worked !
[11:29:39] <Lambda_Aurigae> muahaha...
[11:29:52] <Lambda_Aurigae> 32bit hardware counter on an 8bit AVR,,,kindasorta,,,
[11:30:38] <Lambda_Aurigae> tied the OC1A output to the T3 input...every time timer 1 overflows I get one increment on timer 3...
[11:32:54] <Lambda_Aurigae> giving me 214.74(approximately) seconds at 20MHz,,,I think, if my math fu is working this morning.
[11:35:19] <Lambda_Aurigae> by playing with prescaler, I think I can get longer delays too!
[11:36:02] <Lambda_Aurigae> hmmm....maybe not...might not be a prescaler in line with the Tn input.
[11:36:23] <Lambda_Aurigae> but there is one for the first stage, so, kinda.
[11:39:07] <Kev> why not simply use an uint16_t that you'd increment every overflow ?
[11:50:25] <Lambda_Aurigae> this way I can do it without software intervention.
[11:50:49] <Lambda_Aurigae> then I only get one interrupt on the overflow of the high counter.
[11:51:06] <Lambda_Aurigae> and, I have timers to spare on the atmega1284p.
[11:54:20] <Lambda_Aurigae> and, looks like I can turn on prescaler for timer 1, so, at 20MHz I can get some 60 days max delay,,I think.
[11:54:47] <Lambda_Aurigae> oops
[11:54:48] <Lambda_Aurigae> 60 hours
[11:54:50] <Lambda_Aurigae> still.
[11:55:27] <Lambda_Aurigae> 2.5ish days...
[11:56:28] <NooM> hm!
[11:56:44] <Lambda_Aurigae> and the timers will run in certain sleep modes.
[11:56:58] <Lambda_Aurigae> no need to wake up to increment a variable..
[11:57:12] <NooM> you could use a rtc where you can program alarms and connect it to hardware interrupt to wake up :D
[11:57:19] <Lambda_Aurigae> I could, yes.
[11:57:26] <Lambda_Aurigae> that adds an extra chip.
[11:57:38] <Lambda_Aurigae> this just requires a wire between two pins.
[13:22:15] <hetii> HI :)
[13:23:11] <hetii> I have a char array(string that is terminated by \0) and then i use (strcmp_P(res, PSTR("OK")) == 0) and its not true,
[13:26:38] <dxtr> okay
[13:26:53] <hetii> http://pastebin.com/KnK7C3ED
[13:48:30] <Kev> hetii erm does if(strcmp_P(dupa, PSTR("OK")) == 0) { work ?
[13:49:23] <Kev> at least we'd know if it comes from the uart_getln() or something else
[13:55:01] <megal0maniac_afk> fuzzybugkilla: Oi!
[13:55:12] <fuzzybugkilla> Hallo there
[13:55:41] <hetii> I will shoot myself :(/
[13:56:15] <hetii> Now i have this code: http://pastebin.com/cA7hcTQ3
[13:56:27] <fuzzybugkilla> megal0maniac: Is this better?
[13:56:45] <hetii> When i just send 'O' then its print back that all is fine :/
[13:57:48] <megal0maniac_afk> fuzzybugkilla: Is what better? You didn't do anything. I just said "Oi" because you arrived and I wasn't expecting that :)
[13:58:08] <megal0maniac_afk> "That username looks very famil... WAIT A SECOND!"
[13:59:27] <hetii> Kev: if(strcmp_P(dupa, PSTR("OK")) == 0) yes its true
[14:00:52] <fuzzybugkilla> megal0maniac: Both. I'm still trying to figure out how to send a message to as specific person
[14:05:13] <Lambda_Aurigae> hetii try strncmp and just compare the first 2 characters?
[14:06:52] <Lambda_Aurigae> specially as you are only getting 2 characters, if I read that uart_getln line right.
[14:22:19] <hetii> Lambda_Aurigae: http://pastebin.com/8ranXd8t
[14:50:58] <hetii> Lambda_Aurigae: in uart_getln i have maxlen-1 in while condition
[14:51:37] <hetii> and because of that i receive always one character less then i define.
[16:28:57] <hetii> Could someone test for me this library ? http://homepage.hispeed.ch/peterfleury/uartlibrary.zip
[16:30:02] <NooM> iam quite sure i tested it allready
[16:30:03] <Lambda_Aurigae> fleury's libs work great.
[16:30:06] <NooM> yes
[16:30:15] <NooM> iam using his i2c one right now
[16:30:55] <Lambda_Aurigae> I combined his i2c lib with his lcd lib and a pcf8574 chip and an LCD some years ago and made an i2c interfaced LCD display.
[16:31:02] <hetii> I have huge trouble with getting multiple uart byte, as I discover when i compile test_uart.c even when I don`t have connecter RXD pin i get all the time '\x00\x00\x00'
[16:31:37] <Lambda_Aurigae> if you don't have anything connected it will float and oscillate.
[16:31:44] <NooM> mhm
[16:31:55] <Lambda_Aurigae> and give you noise.
[16:33:25] <hetii> Yes I can agree but even when i pull it to +5v or gnd then still get the same result
[16:33:26] <NooM> Lambda_Aurigae i have some of them too, but i switched quickly to 74hc595 for outputs, and mpc23s17 (?) for in/out
[16:33:51] <NooM> hetii did you cross rx and tx ?
[16:34:09] <NooM> means rx from a to tx device b
[16:34:19] <hetii> sure
[16:34:22] <NooM> hm.
[16:35:38] <NooM> wanna try my uart lib ?
[16:37:56] <hetii> why not
[16:38:02] <tzanger> does anyone here have access to IEEE articles?
[16:38:06] <tzanger> looking at http://ieeexplore.ieee.org/xpl/login.jsp?tp=&arnumber=252759&url=http%3A%2F%2Fieeexplore.ieee.org%2Fxpls%2Fabs_all.jsp%3Farnumber%3D252759
[16:38:29] <NooM> http://pastebin.com/fRzaAu1p
[16:39:05] <NooM> its for a 1284p, so you have to change some register names (remove the 0)
[16:39:09] <Kev> hetii do you have a schematic ?
[16:39:10] <NooM> oh i forgot the ringbuffer
[16:39:57] <NooM> http://pastebin.com/jrsPvByL
[16:40:01] <NooM> that should di it
[16:42:42] <NooM> it is a tad slower than arduinos uart tho :(
[16:43:14] <hetii> Kev: Its just atmega8 +crystal with two capacitor and 10k pulled to +5v from reset.
[16:43:19] <NooM> (not the baudrate, but the time between each byte sent)
[16:43:31] <Kev> hetii no max232 ?
[16:43:33] <hetii> Interesting, now this efect gone
[16:43:38] <hetii> Kev no
[16:43:57] <NooM> guess hes using a usb-uart thingy
[16:44:00] <hetii> I use another atmega with v-USB and CDC
[16:44:48] <hetii> Hmm i notice that now this ugly efect gone, maybe the reason in my prototype board
[16:45:27] <hetii> I use similar like this one http://www.doctronics.co.uk/DDE/Images_jpg/PB%2001.jpg
[16:45:34] <Kev> NooM i hope so :D
[16:45:42] <NooM> :D
[16:46:18] <Kev> hetii do you use something like this : http://img.dxcdn.com/productimages/sku_81872_1.jpg
[16:46:53] <NooM> good time to show off mine *g* https://www.dropbox.com/s/djn3wkxq5ikvuqm/Bild150.jpg
[16:47:06] <hetii> kev http://www.recursion.jp/avrcdc/
[16:47:54] <Kev> NooM diy ?
[16:47:59] <NooM> yes
[16:48:27] <Kev> NooM nice !
[16:48:36] <NooM> but honestly it doesent work, i mean, the usb part does (gets detected and all) but i forgot to connect the vcc io for the rx/tx pins, so they are 0v
[16:48:37] <NooM> :D
[16:48:43] <NooM> and micro usb is crap
[16:48:50] <NooM> its so hard to pull out
[16:49:09] <NooM> Kev thx :D
[16:49:27] <NooM> https://www.dropbox.com/s/uvcr01mhtwk3fla/Bild148.jpg
[16:49:36] <NooM> thats my enc 28j60 :D that one is perfect
[16:50:55] <hetii> Here is my board: http://www.fotosik.pl/pokaz_obrazek/1003015b67700a45.html
[16:51:05] <NooM> :D
[16:51:25] <NooM> https://www.dropbox.com/s/s5rj4ef6cj1gcm9/IMGP2437.JPG
[16:51:27] <NooM> :P
[16:51:28] <Kev> i made that pcb too, but in the end it was cheaper to just order one of ebay, so it's laying in a drawer, without components on it :D
[16:51:52] <Kev> (the enc28 that is)
[16:51:58] <NooM> nice
[16:52:05] <NooM> i wanted a breadboard compatible
[16:53:06] <NooM> sadly its collecting dust right now, iam to stupid to write an ethernet stack, iam stuck after the udp part
[16:53:18] <NooM> (means tcp not working :D)
[16:53:25] <NooM> tp/ip
[16:53:29] <NooM> c
[16:53:45] <Lambda_Aurigae> so steal one.
[16:53:49] <Lambda_Aurigae> there are several out there.
[16:53:52] <Kev> i got a wiznet 5500 or something for free
[16:53:52] <NooM> i know
[16:54:03] <NooM> but thats boring @ Lambda_Aurigae :P
[16:54:04] <Kev> everything is on board
[16:54:19] <Lambda_Aurigae> http://tuxgraphics.org/electronics/200606/article06061.shtml
[16:54:22] <Lambda_Aurigae> I love this one.
[16:54:41] <Kev> http://www.wiznet.co.kr/sub_modules/en/product/Product_Detail.asp?cate1=5&cate2=42&cate3=0&pid=1196
[16:54:53] <Kev> they where giving these away a while back
[16:54:59] <NooM> nice
[16:56:03] <NooM> https://www.dropbox.com/s/u19xpk76x6mtnua/Bild133.jpg my 1284p :D
[16:56:25] <NooM> with rtc
[16:57:58] <NooM> meh i miss making that stuff :(
[16:59:02] <Kev> do you make those pcbs yourself or have them done by some manufacturer ?
[16:59:14] <NooM> ill let em make by itead studio
[16:59:18] <NooM> its damn cheap
[16:59:27] <NooM> i design the circuits with diptrace
[16:59:45] <NooM> and solder myself, with a hotair station -.-
[17:00:52] <Kev> how cheap is cheap ? :D
[17:01:06] <NooM> 10$ for 10 5cm x 5cm pcb's
[17:01:25] <Kev> I make mine myself but it takes time
[17:01:36] <NooM> shipping from china takes time too :D
[17:01:46] <Kev> yeah that's true
[17:02:13] <NooM> i thought about making them myself, but iam sure i could never do it as good as they do, also iam sure if it good if _i_ handle dangerous chemicals :P
[17:02:40] <NooM> https://www.dropbox.com/s/gnxq96oi6th6uy6/Bild128.jpg
[17:02:43] <Kev> also my problem with manufacturing is that i usually only need 1 piece
[17:03:29] <NooM> yeah, i also mostly need only one, but i add other stuff and breakouts too
[17:03:36] <NooM> like soic8 to dip8
[17:05:02] <Kev> I'm gonna make 2 pcbs tomorow, usually I can achieve almost the same result, down to the green finish
[17:05:13] <NooM> wow thats nice
[17:05:17] <Kev> but i can't do the white print
[17:05:27] <Kev> or nice vias
[17:06:00] <Kev> i gotta put a lead in the hole and solder on both sides
[17:06:06] <NooM> mhm
[17:06:21] <NooM> you gote some pretty expensive equip right?
[17:06:34] <hetii> I found the reason
[17:06:36] <Kev> nah
[17:06:39] <NooM> hmm
[17:06:47] <NooM> hetii what was the reson ?
[17:06:51] <NooM> *a
[17:07:25] <Kev> an Uv thingy (don't know the actual english word)
[17:07:37] <NooM> :D
[17:07:53] <hetii> in my uart_getln() had unsigned char temp; temp = uart_getc(); and when i change it to unsigned int temp; then seams to work
[17:07:53] <NooM> so you print with laserjet?
[17:08:38] <NooM> hetii hm
[17:08:40] <Kev> yeah laser printer on transparent sheet
[17:08:49] <NooM> ic
[17:09:17] <Kev> than uv the presensitized board with the printed sheet on top
[17:09:21] <NooM> hetii use my lib :P its like printf :P
[17:10:18] <NooM> Kev didnt knew that works for fine traces, nice
[17:11:20] <Kev> depends on the printer resolution I guess, i go with 2400dpi I think, the highest setting on the printer i have
[17:11:35] <NooM> haha, i dont even have a printer :D
[17:11:55] <Kev> it's pretty dark so it works even with fine traces
[17:12:01] <NooM> mhm
[17:12:27] <Kev> I got it from work, it "wasn't working anymore", so I took it and fixed it
[17:12:37] <NooM> hehe
[17:12:45] <NooM> good deal than
[17:13:33] <NooM> i need to go afk a bit, later
[17:13:42] <Kev> yeah, the toner and the drum or whatever they call it inside were new
[17:13:57] <Kev> so it'll work for a while for 0€
[17:14:02] <Kev> later :)
[17:24:01] <NooM> back
[17:24:08] <NooM> Kev and how you etch it ?
[17:25:53] <Kev> in a tank with warm iron chloride
[17:26:13] <Kev> an aquarium pump that makes bubbles
[17:26:38] <NooM> ok
[17:27:15] <NooM> meh i want that too :(
[17:29:04] <NooM> building stuff is fun :D
[17:29:11] <Kev> diy :)
[17:29:22] <NooM> but i have to focus on my pc now for a few more months
[17:29:48] <NooM> i even have dave jones like u-currents here (on pcb) but no parts :(
[17:29:53] <NooM> the eev-blog guy
[17:30:03] <Kev> except the uv thingy, i got that cheap of a french second hand website
[17:30:27] <NooM> iam also a tad afraid of the chemicals
[17:30:54] <NooM> iron chloride doesent sound healthy
[17:31:02] <Lambda_Aurigae> it's poison if you drink it.
[17:31:14] <Tom_itx> sodium persulplate
[17:31:15] <NooM> :D
[17:31:18] <Lambda_Aurigae> I have had it on my hands many times over the years.
[17:31:19] <Tom_itx> or ammonium persulphate
[17:31:42] <NooM> Lambda_Aurigae did it etch your skin ?
[17:31:45] <Kev> iron chloride is not very dangerous as it in won't burn through your skin right away
[17:31:50] <Lambda_Aurigae> just stains it.
[17:31:54] <NooM> i see, hmm
[17:31:56] <Kev> yeah
[17:32:12] <Lambda_Aurigae> wear rubber gloves and you are good to go.
[17:32:19] <Kev> dirty orange stains of shame that last forever
[17:32:20] <Lambda_Aurigae> even with persulfates.
[17:32:29] <Tom_itx> in a bubbler tank: http://tom-itx.no-ip.biz:81/~webpage/etching/etch5.jpg
[17:32:56] <NooM> that looks like it tastes good :D
[17:33:07] <Lambda_Aurigae> I use a wobbly table for mine.
[17:33:17] <Lambda_Aurigae> tips side to side with a little motor and a cam.
[17:34:33] <Kev> Tom_itx how dangerous is sodium persulfate anyway ?
[17:34:56] <Tom_itx> i used a ventilated area and have a lid for my tank
[17:34:56] <Lambda_Aurigae> don't drink it.
[17:35:00] <Tom_itx> but i don't really know
[17:35:12] <Tom_itx> i wasn't 'stupid' with it
[17:35:26] <Kev> yeah but I meant the fumes and all
[17:35:40] <Tom_itx> i didn't stand over it
[17:36:07] <Kev> that's always a good idea :)
[17:36:21] <Lambda_Aurigae> basically it is an irritant.
[17:42:06] <NooM> do you guys actually build usefull things or just for fun and "toys" ? i only made one "usefull" thingy for me, rest just playing around -.-
[17:42:45] <Lambda_Aurigae> I've built a few toys for me and others.
[17:42:51] <Tom_itx> http://tom-itx.no-ip.biz:81/~webpage/boards/USBTiny_Mkii/USBTiny_Mkii_index.php
[17:42:56] <Tom_itx> some thought that was useful
[17:43:07] <Lambda_Aurigae> I did I did!
[17:43:09] <Lambda_Aurigae> I have one.
[17:43:17] <NooM> does it work with atmel studio ?
[17:43:28] <NooM> it looks well done
[17:43:29] <Tom_itx> well of course it does
[17:43:33] <NooM> nice
[17:44:01] <NooM> and even a box
[17:44:12] <Tom_itx> aiming to please.
[17:44:23] <Tom_itx> not everyone cared but some wanted a box
[17:45:13] <NooM> you totally win :D
[17:45:25] <NooM> thats mine: a temerature/humidity sensor
[17:45:26] <NooM> https://www.dropbox.com/s/i3c3m3ncgtf464w/Bild162.jpg
[17:45:38] <NooM> battery lasts 1 year and is rechargeable
[17:46:14] <Tom_itx> logging?
[17:46:27] <NooM> no it just sends data to a "master" device
[17:46:47] <NooM> i can connect it to pc with usb - serial or use a lcd to display
[17:46:57] <Tom_itx> is that an antenna on the right?
[17:46:58] <NooM> the master is just on breadboard tho
[17:47:07] <NooM> yeah, an nrf 24l01+
[17:47:19] <NooM> so around 10 meters range with a wall in between
[17:47:26] <NooM> (enough for my apartment)
[17:47:34] <NooM> dht22 sensor
[17:50:17] <NooM> hmpf, i wish i had the endurance to make something really cool and usefull
[17:50:39] <NooM> but idk, i get bored so fast and than i just make another thingy. -.-
[17:51:26] <Tom_itx> i made a few hundred
[17:51:33] <NooM> nice
[17:51:48] <NooM> soldered by hand or reflow oven ?
[17:52:03] <Tom_itx> started by hand but then i made an oven
[17:52:18] <NooM> hehe
[17:53:26] <Kev> i'm going to use those nrf24l01+ with pa/lna to put an altimeter on my quadcopter and use a few adcs to know how much juice is left in my lipo pack
[17:53:40] <NooM> oh sweet quad
[17:53:48] <Kev> that's the next project
[17:53:59] <NooM> i made some sensors too
[17:54:10] <NooM> well breakouts
[17:54:13] <Lambda_Aurigae> you should put a 6dof sensor pack onboard too and send back rotation/pitch/tilt data along with acceleration.
[17:54:18] <Kev> after my "hey the mailman put something in the box" thing
[17:54:30] <NooM> https://www.dropbox.com/s/a7wzlbk7didsle8/Bild131.jpg accelerometer, but i cant remember wich one
[17:54:35] <Kev> with regular nrf24l01+
[17:55:10] <NooM> https://www.dropbox.com/s/oqqhr8owe972tvz/Bild161.jpg
[17:55:16] <NooM> bottom left is my version of nrf
[17:55:19] <NooM> :D
[18:00:51] <NooM> wonder if it will even work, its made after iirc adafruit's schematics
[18:01:14] <NooM> but my design and parts are a bit different, and i have no test equip for that radio stuff *g*
[18:03:15] <NooM> well iam off, night \o
[19:16:55] <hjohnson> hrmm.. does anyone know of a prexisting library to parse AT commands on an atmel?
[19:19:05] <Lambda_Aurigae> not I.
[19:19:19] <Lambda_Aurigae> you mean, to make an AVR act like a hayes modem in response to AT commands?
[19:19:23] <antto> the NSA knows everything
[19:19:45] <hjohnson> no other way around
[19:19:53] <Lambda_Aurigae> then you aren't parsing AT commands.
[19:19:55] <hjohnson> I need to talk to a couple of devices that use AT commands...
[19:19:59] <Lambda_Aurigae> perhaps parsing responses.
[19:20:01] <hjohnson> sorry parsing responses
[19:20:17] <Lambda_Aurigae> they are very simple and straightforward though.
[19:20:28] <Lambda_Aurigae> if the devices uses the true AT command set and resonses.
[19:20:36] <hjohnson> Lambda_Aurigae: yeah, but it would be nice if someone has already done the heavy lifting. :)
[19:23:02] <Lambda_Aurigae> https://github.com/GROUNDLAB/GSM---AVR
[19:23:37] <Lambda_Aurigae> http://www.atmel.com/Images/doc8016.pdf
[19:24:43] <Lambda_Aurigae> first and third hits on a google search for avr AT commands
[19:25:09] <hjohnson> yeah, looked at those already, not quite doing what I'd want... was just wondering if others had experience with one that they liked
[19:27:58] <Lambda_Aurigae> you could use the command interface of the procyon avrlib to build a parser for it.