- Arduino Uno
- Arduino Nano v3
- Arduino Mega 2560
- CAN-Bus Shield
- Motor Driver Shield
- Sensor Shield
- Bluetooth Module
- GPIO Level Converter (для комунікаціЇ Ардуіно з Распбері Пай)
- 3-Axis Acceleration Gyroscope
- 5-Channel Tracking Module Board
- Line Hunting Sensor
- Ultrasonic Sensor
- Prototype boards
- Jumpers
- Купка радіодеталей (резистори, діоди, конденсатори, світлодіоди, мікроконтролери PIC та AVR і т.п.)
- Паяльник
- Мультиметр
пʼятниця, 30 серпня 2013 р.
Список залізяк
Trello
Створив борд на трелло: https://trello.com/b/NZR13B6a/diy-group
Пишіть свої мила в приват кого додати.
1 вересня
З вересня хочу почати наші заняття з Arduino.
Тому маю кілька запитань для учасників:
Create your free online surveys with SurveyMonkey , the world's leading questionnaire tool.
пʼятниця, 9 серпня 2013 р.
"Годі сину. Повертаймось до роботи"
CHANGES:
TODO:
- From now on this blog will be in ukrainian (Відтепер блог вестиметься українською)
- Більшість постів буде присвячена експериментам з Ардуіно (Arduino)
- Старатимусь (але не обіцяю) писати звіт про кожен проведений дослід
TODO:
- В планах заснувати щотижневі зустрічі тривалістю не більше години для колективних експериментів з Ардуіно (не раніше вересня).
- Ці зустрічі я також буду анонсувати тут, а також намагатимусь звітувати про зроблене.
четвер, 21 квітня 2011 р.
Me learning Java.
Recently I've started learning some new webdev tricks in Java.
The guy in charge of Java competency group at Lohika — Zenyk Matchyshyn, has gave me a task
— to create a simple Ajax blog with REST API and JSON as data transfer format — and a set of technologies to use on that task: Maven2, Servlet API 2.5, Hibernate, Spring IoC.
Though I had some experience of using Hibernate and Spring container in some distant past, I was really impressed by Maven2.
So I've finished the task a while (about two or three months) ago
...and got a new one — do the same but using Spring MVC.
I've been trying to find some Maven2 project archetype for Spring MVC, but nothing good was out there, until Zenyk gave me a hint to dig into Spring Roo — which is another great tool from Java world I've got acquainted with.
Btw, if anyone needs to use an entity name that has a plural different than -s — use @RooPlural annotation, e.g.:
@RooPlural("BlogEntries")class BlogEntry ...
So after two month of work I've finally got some time to get back to Java.
To be continued...
пʼятниця, 5 березня 2010 р.
Using monit to watch delayed_job on rails
I've been fighting for some time to successfully start/stop the delayed_job deamon ('daemons' gem) via monit from under another user and this is what I've ended up with:
check process delayed_job with pidfile /home/me/myapp/shared/pids/job_runner.pid
start program = "/usr/bin/env HOME=/home/me RAILS_ENV=staging /home/me/myapp/current/script/delayed_job start" as uid me and gid mygroup
stop program = "/usr/bin/env HOME=/home/me RAILS_ENV=staging /home/me/myapp/current/script/delayed_job stop" as uid me and gid mygroup
check process delayed_job with pidfile /home/me/myapp/shared/pids/job_runner.pid
start program = "/usr/bin/env HOME=/home/me RAILS_ENV=staging /home/me/myapp/current/script/delayed_job start" as uid me and gid mygroup
stop program = "/usr/bin/env HOME=/home/me RAILS_ENV=staging /home/me/myapp/current/script/delayed_job stop" as uid me and gid mygroup
четвер, 11 лютого 2010 р.
bash_history
history | awk {'print $2'} | sort | uniq -c | sort -rn | head
59 sudo
58 ls
41 svn
23 cd
18 cap
17 pyramid_dir
16 rake
16 nano
14 rm
13 script/plugin
59 sudo
58 ls
41 svn
23 cd
18 cap
17 pyramid_dir
16 rake
16 nano
14 rm
13 script/plugin
пʼятниця, 27 березня 2009 р.
useful links on pxe netbooting
http://unattended.sourceforge.net/advanced.php#netboot
http://gparted.sourceforge.net/livepxe.php
http://www.debian-administration.org/articles/478
https://help.ubuntu.com/community/Installation/QuickNetboot
by "compiling" together these 4 articles above - I've got a netboot server that allows to install Ubuntu or run it in rescue mode (used it twice to restore grub), install WinXP-SP3, run gparted live "cd"
packages installed: dhcp3-server, pxe, tftpd-hpa
netboot image: http://archive.ubuntu.com/ubuntu/dists/intrepid/main/installer-i386/current/images/netboot/netboot.tar.gz
ubuntu netboot menu from image above modified to contain items from "unattended" and "gparted"
and this one, of course http://syslinux.zytor.com/wiki/index.php/PXELINUX
http://gparted.sourceforge.net/livepxe.php
http://www.debian-administration.org/articles/478
https://help.ubuntu.com/community/Installation/QuickNetboot
by "compiling" together these 4 articles above - I've got a netboot server that allows to install Ubuntu or run it in rescue mode (used it twice to restore grub), install WinXP-SP3, run gparted live "cd"
packages installed: dhcp3-server, pxe, tftpd-hpa
netboot image: http://archive.ubuntu.com/ubuntu/dists/intrepid/main/installer-i386/current/images/netboot/netboot.tar.gz
ubuntu netboot menu from image above modified to contain items from "unattended" and "gparted"
and this one, of course http://syslinux.zytor.com/wiki/index.php/PXELINUX
пʼятниця, 6 березня 2009 р.
How to use your city map to add streets to openstreetmap
1. we need a scanned hi-res bitmap image of a map
2. go to http://labs.metacarta.com/rectifier/ and upload your map
3. you will see two map viewers: left - your image; right - reference map
4. click "+" sign at the right side of reference map viewer and pick a map provider (I've chosen google satellite)
5. set 5-6 control markers on both maps (I've added seven)
6. from a drop-down menu below reference map select linear or quadratic fit (seems to me that linear is faster but less accurate)
7. click "warp!"
8. download and install josm or "sudo apt-get install josm"
9. start josm. go to "edit"->"preferences"->"plugins" (fifth tab from top, the one with a plug)
10. find and check "wmsplugin". apply settings. restart josm.
(if everything is fine, next time you start josm it has to have "WMS" menu item in main menu)
11. go to openstreetmap and find the place you want to add streets to and copy the "permalink" url, e.g.
http://www.openstreetmap.org/?lat=49.54782&lon=25.59045&zoom=15&layers=B000FTF
(don't forget to sign up at OSM otherwise you won't be able to save your edits online)
11a. in josm go to "edit"->"preferences"->"network" (second tab) and enter your OSM username and password.
12. in josm go to "file"->"download from OSM"->"Bounding Box" and paste the above url into text box signed "URL from www.openstreetmap.org"->"ok"
13. you will get a "Data Layer" containing streets (make sure the "layers" pane is visible and use "select tool" to check out street names)
14. go to "WMS"->"Rectified Image...". enter your metacarta image id (just the number, e.g. if your map is located at http://labs.metacarta.com/rectifier/map/74, you enter 74)
15. now you get a new layer called "rectifier id=74". click "Data Layer" to see it on top of image layer.
16. add some streets.
17. "file"->"upload to OSM"
18. according to osm wiki - results will show up in a few days
and that's it.
2. go to http://labs.metacarta.com/rectifier/ and upload your map
3. you will see two map viewers: left - your image; right - reference map
4. click "+" sign at the right side of reference map viewer and pick a map provider (I've chosen google satellite)
5. set 5-6 control markers on both maps (I've added seven)
6. from a drop-down menu below reference map select linear or quadratic fit (seems to me that linear is faster but less accurate)
7. click "warp!"
8. download and install josm or "sudo apt-get install josm"
9. start josm. go to "edit"->"preferences"->"plugins" (fifth tab from top, the one with a plug)
10. find and check "wmsplugin". apply settings. restart josm.
(if everything is fine, next time you start josm it has to have "WMS" menu item in main menu)
11. go to openstreetmap and find the place you want to add streets to and copy the "permalink" url, e.g.
http://www.openstreetmap.org/?lat=49.54782&lon=25.59045&zoom=15&layers=B000FTF
(don't forget to sign up at OSM otherwise you won't be able to save your edits online)
11a. in josm go to "edit"->"preferences"->"network" (second tab) and enter your OSM username and password.
12. in josm go to "file"->"download from OSM"->"Bounding Box" and paste the above url into text box signed "URL from www.openstreetmap.org"->"ok"
13. you will get a "Data Layer" containing streets (make sure the "layers" pane is visible and use "select tool" to check out street names)
14. go to "WMS"->"Rectified Image...". enter your metacarta image id (just the number, e.g. if your map is located at http://labs.metacarta.com/rectifier/map/74, you enter 74)
15. now you get a new layer called "rectifier id=74". click "Data Layer" to see it on top of image layer.
16. add some streets.
17. "file"->"upload to OSM"
18. according to osm wiki - results will show up in a few days
and that's it.
четвер, 22 січня 2009 р.
Flash Switcher Ubuntu Issues
There's a really useful firefox extension for flash/flex developers called Flash Switcher there are win, mac and linux version of it so I decided to try it in Ubuntu.
The way it works is really simple:
- after installing the extension you get a flash icon in status bar with a menu listing your current flash plugin version and two more from the plugin's local repository - those are 7.0 and 9.0 by default. You set the "Firefox plugins directory" in settings to tell the extensions where is your flash plugin located. Each time you change flash plugin version - it gets rewrited by the version you chose from extension's menu.
First thing I decided to do is to add a few more:
1) current ubuntu's "flashplugin-nonfree" lib (that's the one playing sound through pulseaudio so I really need it)
2) and flashplugin developer version (the one that allows debugging you know)
for that I've created two more folders at extension's path:
~/.mozilla/firefox/.default/extensions/flash_switcher@sephiroth.it/plugins/linux/ (the folder containing linux flash plugins of different versions)
10.0 dev and 10.0 ubuntu
and copied the libflashplugin.so to each one (debug version is at adobe's site and the ubuntu's is in /usr/lib/flashplugin-nonfree)
Next thing I've been confused by was that the extension didn't switch anything according to about:plugins flash plugin was still version 10:
By default, the extension uses ~/.mozilla/plugins dir to write the flash plugin lib to, but... there is a symbolic link to /usr/lib/flashplugin-nonfree/libflashplugin.so named @flashplugin-nonfree or something like that which overrides the lib placed into .mozilla/plugins dir by the flash switcher extension... so I decided to fix it in a bit inappropriate way - I made /usr/lib/flashplugin-nonfree writable and set it a "Firefox Plugins Directory" in flash switcher's settings. That fixed the issue.
The way it works is really simple:
- after installing the extension you get a flash icon in status bar with a menu listing your current flash plugin version and two more from the plugin's local repository - those are 7.0 and 9.0 by default. You set the "Firefox plugins directory" in settings to tell the extensions where is your flash plugin located. Each time you change flash plugin version - it gets rewrited by the version you chose from extension's menu.
First thing I decided to do is to add a few more:
1) current ubuntu's "flashplugin-nonfree" lib (that's the one playing sound through pulseaudio so I really need it)
2) and flashplugin developer version (the one that allows debugging you know)
for that I've created two more folders at extension's path:
~/.mozilla/firefox/
10.0 dev and 10.0 ubuntu
and copied the libflashplugin.so to each one (debug version is at adobe's site and the ubuntu's is in /usr/lib/flashplugin-nonfree)
Next thing I've been confused by was that the extension didn't switch anything according to about:plugins flash plugin was still version 10:
By default, the extension uses ~/.mozilla/plugins dir to write the flash plugin lib to, but... there is a symbolic link to /usr/lib/flashplugin-nonfree/libflashplugin.so named @flashplugin-nonfree or something like that which overrides the lib placed into .mozilla/plugins dir by the flash switcher extension... so I decided to fix it in a bit inappropriate way - I made /usr/lib/flashplugin-nonfree writable and set it a "Firefox Plugins Directory" in flash switcher's settings. That fixed the issue.
пʼятниця, 9 січня 2009 р.
середа, 3 грудня 2008 р.
automatic keyboard layout convertion tool
kxneur (gxneur)
useful for those who often forgets to switch keyboard layout.
useful for those who often forgets to switch keyboard layout.
вівторок, 9 вересня 2008 р.
host lookup problems and hacky solutions
I got this really weird problem today: x apps couldn't connect XMing host saying "cannot connect to X server".
After some trials & errors - I defined that linux box can't resolve "localhost" host and its own local hostname "ninja"...
/etc/nsswitch.conf shows:
hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4
(files go first)
/etc/hosts is all right too...
nslookup shows that it tries to resolve localhost and ninja using dsl isp nameservers
ping shows "unknown host 'localhost'" or something like that - why doesn't it use hosts file? I still don't know... after some time on linux community forums I've decided to fix it my way and here is how I did it:
1) first of all, I turned off some pppoe up and down scripts that rewrite /etc/resolv.conf:
# these must be chmoded to non-executables
# ip-up script uses run-parts that runs all the executable files
sudo chmod -x /etc/ppp/ip-up.d/0000usepeerdns
sudo chmod -x /etc/ppp/ip-up.d/0dns-up
sudo chmod -x /etc/ppp/ip-up.d/dns-totd
# I think these can be left executable, but just to be sure...
sudo chmod -x /etc/ppp/ip-down.d/0000usepeerdns
sudo chmod -x /etc/ppp/ip-down.d/0dns-up
sudo chmod -x /etc/ppp/ip-down.d/dns-totd
# after poff and pon dsl-provider resolv conf remains the same (see 2) so it worked
2) /etc/resolv.conf was looking this way before:
nameserver 195.5.46.12
nameserver 195.5.46.10
search local.lan
these values were set automatically on dsl link up
I changed it to this:
nameserver 192.168.1.2
#nameserver 195.5.46.12
#nameserver 195.5.46.10
#search local.lan
I have to mention that I have bind9 up and running successfully as a local dns server for a few months (so I won't be describing bind9 setup here)
3) bind9 has a "localhost" zone already configured so at this point I could already ping localhost alright. I needed to be able to ping "ninja" hostname, so here's what I did:
- opened bind config file in editor
sudo nano /etc/bind/named.conf
- added "ninja" zone to it
zone "ninja" {
type master;
file "/etc/bind/db.ninja";
};
- added zone definition file /etc/bind/db.ninja mentioned above
sudo nano /etc/bind/db.ninja
;
; BIND data file for local loopback interface
;
$TTL 604800
@ IN SOA ninja. root.ninja. (
2 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
@ IN NS ninja.
@ IN A 192.168.1.2
and it pings.
P.S. XMing is alive again
After some trials & errors - I defined that linux box can't resolve "localhost" host and its own local hostname "ninja"...
/etc/nsswitch.conf shows:
hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4
(files go first)
/etc/hosts is all right too...
nslookup shows that it tries to resolve localhost and ninja using dsl isp nameservers
ping shows "unknown host 'localhost'" or something like that - why doesn't it use hosts file? I still don't know... after some time on linux community forums I've decided to fix it my way and here is how I did it:
1) first of all, I turned off some pppoe up and down scripts that rewrite /etc/resolv.conf:
# these must be chmoded to non-executables
# ip-up script uses run-parts that runs all the executable files
sudo chmod -x /etc/ppp/ip-up.d/0000usepeerdns
sudo chmod -x /etc/ppp/ip-up.d/0dns-up
sudo chmod -x /etc/ppp/ip-up.d/dns-totd
# I think these can be left executable, but just to be sure...
sudo chmod -x /etc/ppp/ip-down.d/0000usepeerdns
sudo chmod -x /etc/ppp/ip-down.d/0dns-up
sudo chmod -x /etc/ppp/ip-down.d/dns-totd
# after poff and pon dsl-provider resolv conf remains the same (see 2) so it worked
2) /etc/resolv.conf was looking this way before:
nameserver 195.5.46.12
nameserver 195.5.46.10
search local.lan
these values were set automatically on dsl link up
I changed it to this:
nameserver 192.168.1.2
#nameserver 195.5.46.12
#nameserver 195.5.46.10
#search local.lan
I have to mention that I have bind9 up and running successfully as a local dns server for a few months (so I won't be describing bind9 setup here)
3) bind9 has a "localhost" zone already configured so at this point I could already ping localhost alright. I needed to be able to ping "ninja" hostname, so here's what I did:
- opened bind config file in editor
sudo nano /etc/bind/named.conf
- added "ninja" zone to it
zone "ninja" {
type master;
file "/etc/bind/db.ninja";
};
- added zone definition file /etc/bind/db.ninja mentioned above
sudo nano /etc/bind/db.ninja
;
; BIND data file for local loopback interface
;
$TTL 604800
@ IN SOA ninja. root.ninja. (
2 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
@ IN NS ninja.
@ IN A 192.168.1.2
and it pings.
P.S. XMing is alive again
понеділок, 8 вересня 2008 р.
"global" domain name with dynamic ip
Recently, I've started to want a globally-accessible, dedicated domain name for my linux box, instead of the one dyndns services give, e.g. yourhost.dyndnsservice.domain etc - so I've registered an .info domain for 2 bucks (there was some promotion so I got lucky) at godaddy and began to look for a way to bind it my linux box - it turned out that my current dyndns service wants about $25 for that (a bit too much I guess).
finally I've found http://www.dnsexit.com/ which does it for free. you need to sign up, add your domain, set their nameservers in domain control panel as registrar's website, setup dynamic ip client to update and that's it
finally I've found http://www.dnsexit.com/ which does it for free. you need to sign up, add your domain, set their nameservers in domain control panel as registrar's website, setup dynamic ip client to update and that's it
понеділок, 18 серпня 2008 р.
Sending sound from Windows to Linux
After fighting with ALSA for some time to make sound from two sound cards work
1) built-in NVidia HDA
2) M-Audio Delta (Audiophile) 2496
I almost gave it all up and removed M2496 hoping that built-in will work fine - I was wrong.
As I can see it now - There is no "simple" solutions in Linux, like reboot and see what happens :)
So I've decided to setup and run system-wide pulseaudio daemon - after trying and reading forums it helped - I have sound from apps that use ALSA, I have volume control from pa applet and support for esd/pulseaudio network clients.
Next thing I've decided to try is passing sound from windows to linux - so I could walk around with my laptop and playing winamp or foobar or anything and the sound went from speakers plugged into my linux box.
First success was to run paplay on windows connected to pulseaudio server on linux - that was fun, but not useful.
Next, I've search for some kind of pa client audio output driver for Win, nothing of that kind yet exists (I will learn programming windows drivers some day, but until then I use google search ;) but there are ESD clients for windows:
1. WinESD 0.3 which is claimed to be a pre-ALPHA so be afraid :) I've installed it, but it requires reboot which I haven't done yet (I use hibernation in windows, because I don't like to start all those useful apps over and over again every day - so I guess I will reboot it later)
2. ESD output plugin for Winamp 2/3 - which I use right at this moment to stream music from my winamp on windows to pulseaudio server on linux - sounds nice and smooth, no glitches, no delays.
here are my pulse configuration files
/etc/pulse/default.pa
run: sudo pulseaudio --system=1 --high-priority=1 -D
to start pulseaudio as a system-wide daemon.
in winamp:
1) select esd out plugin
2) in esd out plugin options enter:
host: ninja.local (my linux box host)
port: 16001 (it was there by default)
password: (nothing, auth-anonymous, remember?)
3) ok, close, play
Look ma, no wires :)))
p.s. I am going to put m2496 back in
1) built-in NVidia HDA
2) M-Audio Delta (Audiophile) 2496
I almost gave it all up and removed M2496 hoping that built-in will work fine - I was wrong.
As I can see it now - There is no "simple" solutions in Linux, like reboot and see what happens :)
So I've decided to setup and run system-wide pulseaudio daemon - after trying and reading forums it helped - I have sound from apps that use ALSA, I have volume control from pa applet and support for esd/pulseaudio network clients.
Next thing I've decided to try is passing sound from windows to linux - so I could walk around with my laptop and playing winamp or foobar or anything and the sound went from speakers plugged into my linux box.
First success was to run paplay on windows connected to pulseaudio server on linux - that was fun, but not useful.
Next, I've search for some kind of pa client audio output driver for Win, nothing of that kind yet exists (I will learn programming windows drivers some day, but until then I use google search ;) but there are ESD clients for windows:
1. WinESD 0.3 which is claimed to be a pre-ALPHA so be afraid :) I've installed it, but it requires reboot which I haven't done yet (I use hibernation in windows, because I don't like to start all those useful apps over and over again every day - so I guess I will reboot it later)
2. ESD output plugin for Winamp 2/3 - which I use right at this moment to stream music from my winamp on windows to pulseaudio server on linux - sounds nice and smooth, no glitches, no delays.
here are my pulse configuration files
/etc/pulse/default.pa
#!/usr/bin/pulseaudio -nF
# NVidia
# ALSA
add-autoload-sink output module-alsa-sink sink_name=output device=hw:0
add-autoload-source input module-alsa-source source_name=input device=hw:0
# Load several protocols
load-module module-native-protocol-unix
load-module module-zeroconf-publish
#these two lines below allow ESD/PA clients to connect
# auth-anonymous=1 is not very safe,
# but firewall doesn't let strangers in
load-module module-esound-protocol-tcp auth-anonymous=1
load-module module-native-protocol-tcp auth-anonymous=1
# Make some devices default
set-default-sink output
set-default-source input
run: sudo pulseaudio --system=1 --high-priority=1 -D
to start pulseaudio as a system-wide daemon.
in winamp:
1) select esd out plugin
2) in esd out plugin options enter:
host: ninja.local (my linux box host)
port: 16001 (it was there by default)
password: (nothing, auth-anonymous, remember?)
3) ok, close, play
Look ma, no wires :)))
p.s. I am going to put m2496 back in
четвер, 14 серпня 2008 р.
How to open an URL in firefox running on another VT
I have a ubuntu linux box at home. It works as a router, firewall and a local server (web, dns, ntp, ssh)
But except that it's it has kde3.5 running - mostly, I listen music from it, while I work in windows xp. I use Xming to run kicker (kde3 "taskbar"). Sometimes I really need to open an URL in my linux box session (not in xming's session) and there's a funny way to do it.
I open konsole from kicker in windows and type:
who
me :0 2008-08-14 03:57
(which means my display in linux is :0)
export DISPLAY=:0
firefox http://whatever-url-i-need-to-open-in-linux/
and voila.
p.s. XMing's display is localhost:10.0 by default
But except that it's it has kde3.5 running - mostly, I listen music from it, while I work in windows xp. I use Xming to run kicker (kde3 "taskbar"). Sometimes I really need to open an URL in my linux box session (not in xming's session) and there's a funny way to do it.
I open konsole from kicker in windows and type:
who
me :0 2008-08-14 03:57
(which means my display in linux is :0)
export DISPLAY=:0
firefox http://whatever-url-i-need-to-open-in-linux/
and voila.
p.s. XMing's display is localhost:10.0 by default
Switching CLI input language in Ubuntu Linux
1. open ~/.bashrc for editing:
nano ~/.bashrc
2. add some aliases at the bottom of .bashrc file:
alias ua="setxkbmap ua"
alias сш="setxkbmap us"
3. save (Ctrl+o), exit nano (Ctrl+x) and reload .bashrc:
source ~/.bashrc
nano ~/.bashrc
2. add some aliases at the bottom of .bashrc file:
alias ua="setxkbmap ua"
alias сш="setxkbmap us"
3. save (Ctrl+o), exit nano (Ctrl+x) and reload .bashrc:
source ~/.bashrc
неділя, 10 серпня 2008 р.
blogspotting. camelspotting. etc
Caution! Don't get blind looking at the bright side of life all the time.
Підписатися на:
Дописи (Atom)
