tag:blogger.com,1999:blog-544202929520927871.post8096794020940544709..comments2024-03-22T14:44:43.488+02:00Comments on Nicu FLORICA (niq_ro): Joc de lumini (lumina dinamica) cu 10 canaleniq_rohttp://www.blogger.com/profile/04136575519459756942noreply@blogger.comBlogger11125tag:blogger.com,1999:blog-544202929520927871.post-16568773866916757292021-02-02T21:03:38.980+02:002021-02-02T21:03:38.980+02:00yes, I saw.. but is my sketch not with library... ...yes, I saw.. but is my sketch not with library... niq_rohttps://www.blogger.com/profile/04136575519459756942noreply@blogger.comtag:blogger.com,1999:blog-544202929520927871.post-14392071901742277012021-02-01T23:37:24.251+02:002021-02-01T23:37:24.251+02:00I'm on phone now and I not see animated dimula...I'm on phone now and I not see animated dimulation, but I'll try tomorrow using PC... thank youniq_rohttps://www.blogger.com/profile/04136575519459756942noreply@blogger.comtag:blogger.com,1999:blog-544202929520927871.post-32031410482188176562021-02-01T21:21:50.694+02:002021-02-01T21:21:50.694+02:00and here is a simulation where I changed it for up...and here is a simulation where I changed it for uplst and golst<br /><br />https://www.tinkercad.com/things/lnCbqVXviUh<br />Pete on S/V Regina Oceanihttps://www.blogger.com/profile/04193896278571234441noreply@blogger.comtag:blogger.com,1999:blog-544202929520927871.post-53061578885220647812021-02-01T21:21:20.986+02:002021-02-01T21:21:20.986+02:00I made some mistakes. Let me try again...
create...I made some mistakes. Let me try again...<br /><br />create a sequences.h file and put this in it<br />[code]<br />#ifndef _SEQUENCES_H_<br />#define _SEQUENCES_H_<br /><br />uint8_t umplst_Array [][2] {<br />// joc de umplere de la stanga<br />{ B00001000 , B00000000 }<br />{ B00000100 , B00000000 }<br />{ B00000010 , B00000000 }<br />{ B00000001 , B00000000 }<br />{ B00000000 , B10000000 }<br />{ B00000000 , B01000000 }<br />{ B00000000 , B00100000 }<br />{ B00000000 , B00010000 }<br />{ B00000000 , B00001000 }<br />{ B00000000 , B00000100 }<br />{ B00001000 , B00000100 }<br />{ B00000100 , B00000100 }<br />{ B00000010 , B00000100 }<br />{ B00000001 , B00000100 }<br />{ B00000000 , B10000100 }<br />{ B00000000 , B01000100 }<br />{ B00000000 , B00100100 }<br />{ B00000000 , B00010100 }<br />{ B00000000 , B00001100 }<br />{ B00001000 , B00001100 }<br />{ B00000100 , B00001100 }<br />{ B00000010 , B00001100 }<br />{ B00000001 , B00001100 }<br />{ B00000000 , B10001100 }<br />{ B00000000 , B01001100 }<br />{ B00000000 , B00101100 }<br />{ B00000000 , B00011100 }<br />{ B00001000 , B00011100 }<br />{ B00000100 , B00011100 }<br />{ B00000010 , B00011100 }<br />{ B00000001 , B00011100 }<br />{ B00000000 , B10011100 }<br />{ B00000000 , B01011100 }<br />{ B00000000 , B00111100 }<br />{ B00001000 , B00111100 }<br />{ B00000100 , B00111100 }<br />{ B00000010 , B00111100 }<br />{ B00000001 , B00111100 }<br />{ B00000000 , B10111100 }<br />{ B00000000 , B01111100 }<br />{ B00001000 , B01111100 }<br />{ B00000100 , B01111100 }<br />{ B00000010 , B01111100 }<br />{ B00000001 , B01111100 }<br />{ B00000000 , B11111100 }<br />{ B00000000 , B11111100 }<br />{ B00001000 , B11111100 }<br />{ B00000100 , B11111100 }<br />{ B00000010 , B11111100 }<br />{ B00000001 , B11111100 }<br />{ B00001001 , B11111100 }<br />{ B00000101 , B11111100 }<br />{ B00000011 , B11111100 }<br />{ B00001011 , B11111100 }<br />{ B00000111 , B11111100 }<br />{ B00001111 , B11111100 }<br />};<br /><br />uint8_t umplstArray_numberOfFields = sizeof( umplst_Array ) / sizeof( umplst_Array[0] );<br /><br />#endif //_SEQUENCES_H_<br />[/CODE]<br /><br />Then, in your main.cpp...<br /><br />[CODE}<br />void umplst(void)<br />{<br />for(uint8_t i=0; i< umplstArray_numberOfFields; i++)<br />{<br />PORTB = umplstArray[i][0] ; PORTD = umplstArray[i][1];<br />delay(t);<br />}<br />[/CODE]Pete on S/V Regina Oceanihttps://www.blogger.com/profile/04193896278571234441noreply@blogger.comtag:blogger.com,1999:blog-544202929520927871.post-66004946057794323742021-02-01T19:47:15.590+02:002021-02-01T19:47:15.590+02:00thank you ! the project is very old for me (6 year...thank you ! the project is very old for me (6 years old)... but I'll study your comment ... thanks againniq_rohttps://www.blogger.com/profile/04136575519459756942noreply@blogger.comtag:blogger.com,1999:blog-544202929520927871.post-65035044231924238342021-02-01T19:38:23.776+02:002021-02-01T19:38:23.776+02:00Very nice. Perhaps you might try a "DRY"...Very nice. Perhaps you might try a "DRY" (don't repeat yourself) approach like this...<br /><br />create a sequences.h file and put this in it<br />[code]<br />#ifndef _SEQUENCES_H_<br />#define _SEQUENCES_H_<br /><br />uint8_t umplst_Array [][] {<br />// joc de umplere de la stanga<br />{ B00001000 , B00000000 }<br />{ B00000100 , B00000000 }<br />{ B00000010 , B00000000 }<br />{ B00000001 , B00000000 }<br />{ B00000000 , B10000000 }<br />{ B00000000 , B01000000 }<br />{ B00000000 , B00100000 }<br />{ B00000000 , B00010000 }<br />{ B00000000 , B00001000 }<br />{ B00000000 , B00000100 }<br />{ B00001000 , B00000100 }<br />{ B00000100 , B00000100 }<br />{ B00000010 , B00000100 }<br />{ B00000001 , B00000100 }<br />{ B00000000 , B10000100 }<br />{ B00000000 , B01000100 }<br />{ B00000000 , B00100100 }<br />{ B00000000 , B00010100 }<br />{ B00000000 , B00001100 }<br />{ B00001000 , B00001100 }<br />{ B00000100 , B00001100 }<br />{ B00000010 , B00001100 }<br />{ B00000001 , B00001100 }<br />{ B00000000 , B10001100 }<br />{ B00000000 , B01001100 }<br />{ B00000000 , B00101100 }<br />{ B00000000 , B00011100 }<br />{ B00001000 , B00011100 }<br />{ B00000100 , B00011100 }<br />{ B00000010 , B00011100 }<br />{ B00000001 , B00011100 }<br />{ B00000000 , B10011100 }<br />{ B00000000 , B01011100 }<br />{ B00000000 , B00111100 }<br />{ B00001000 , B00111100 }<br />{ B00000100 , B00111100 }<br />{ B00000010 , B00111100 }<br />{ B00000001 , B00111100 }<br />{ B00000000 , B10111100 }<br />{ B00000000 , B01111100 }<br />{ B00001000 , B01111100 }<br />{ B00000100 , B01111100 }<br />{ B00000010 , B01111100 }<br />{ B00000001 , B01111100 }<br />{ B00000000 , B11111100 }<br />{ B00000000 , B11111100 }<br />{ B00001000 , B11111100 }<br />{ B00000100 , B11111100 }<br />{ B00000010 , B11111100 }<br />{ B00000001 , B11111100 }<br />{ B00001001 , B11111100 }<br />{ B00000101 , B11111100 }<br />{ B00000011 , B11111100 }<br />{ B00001011 , B11111100 }<br />{ B00000111 , B11111100 }<br />{ B00001111 , B11111100 }<br />};<br /><br />uint8_t umplstArray_numberOfFields = sizeof( umplst_Array ) / sizeof( umplst_Array[0] );<br /><br />#endif //_SEQUENCES_H_<br />[/CODE]<br /><br />Then, in your main.cpp...<br /><br />[CODE}<br />void umplst(void)<br />{<br /> for(uint8_t i=0; i< umplstArray_numberOfFields; i++)<br />{<br /> PORTB = umplstArray[i,0] ; PORTD = umplstArray[i,1];<br /> delay(t);<br />} <br />[/CODE]Pete on S/V Regina Oceanihttps://www.blogger.com/profile/04193896278571234441noreply@blogger.comtag:blogger.com,1999:blog-544202929520927871.post-52125208697665921952019-06-01T12:45:27.939+03:002019-06-01T12:45:27.939+03:00Se poate, în loc de LED folosesti tranzistori, dup...Se poate, în loc de LED folosesti tranzistori, după tranzistori pui releuClaudiu Dincahttps://www.blogger.com/profile/06416579544499013506noreply@blogger.comtag:blogger.com,1999:blog-544202929520927871.post-47413837144822078682017-11-04T11:30:20.862+02:002017-11-04T11:30:20.862+02:00Bună ziua. Va urmăresc de foarte mult timp și apre...Bună ziua. Va urmăresc de foarte mult timp și apreciez proiectele dumneavoastră. Bravo. Am și eu o întrebare dacă se poate: Doresc sa realizez acest montaj dar în loc de rezistenta și led sa pun un releu pentru a comanda benzi cu leduri de 220v? Se poate? MerciAnonymoushttps://www.blogger.com/profile/13460368746824674862noreply@blogger.comtag:blogger.com,1999:blog-544202929520927871.post-30917905689997292932016-11-16T19:29:40.484+02:002016-11-16T19:29:40.484+02:00super! mersisuper! mersiAnonymoushttps://www.blogger.com/profile/04829951347778283091noreply@blogger.comtag:blogger.com,1999:blog-544202929520927871.post-69359036519789804852015-04-16T10:08:01.711+03:002015-04-16T10:08:01.711+03:00thx... yes we love electronics :Dthx... yes we love electronics :Dniq_rohttps://www.blogger.com/profile/04136575519459756942noreply@blogger.comtag:blogger.com,1999:blog-544202929520927871.post-11575003563595195722015-04-09T00:00:25.936+03:002015-04-09T00:00:25.936+03:00Great post! We love electronics!Great post! We love electronics!The Linux Terminalhttp://www.thelinuxterminal.com/noreply@blogger.com