The Alert Tube

mikegwatson

The Alert Tube is an open source information appliance that connects wirelessly to the Internet of Things in the cloud. The user interface is dead simple, it communicates data via customized colored light sequences, sounds and text to speech. (Check out the video above.)

The idea for the Alert Tube came from something simple, a clock. You don’t have to turn it on, or boot it up and request information, it simply tells you the time, all the time, without you having to ask. That’s the idea behind the Alert Tube. You tell it what you want and then it continuously displays and/or emits audible information, without you having to ask. Simply walk by and take a glance at it or listen for any important alerts. Set it and forget it!

In the subsequent sections I provide detailed instructions on how to build your own Alert Tube information appliance…

Part…

View original post 65 more words

Advertisements
Posted in Uncategorized | Leave a comment

Raspian tips

Setup date

pi@raspberrypi:~$ date
Fri Jun 1 09:49:25 BST 2012
If you wish to change the date/time to June 21 13:45, you could use any of the following
commands (whichever is more suitable for you)
pi@raspberrypi:~$ sudo date 06211345
pi@raspberrypi:~$ sudo date –s “June 21 13:45”
pi@raspberrypi:~$ sudo date –s “21 June 13:45 2012”
pi@raspberrypi:~$ sudo date –s “13:45 June 21”
pi@raspberrypi:~$ sudo date –s “Jun 21 1:45pm”
pi@raspberrypi:~$ sudo date –s “Next Thursday 13:45”

Setub Time zone

sudo dpkg-reconfigure tzdata

startx ————————- If you are a bit nervous about the command line, this might be
your favourite. It gets you escape to a nice graphical interface.
free ————————— Show how much memory is available.
df / —————————- Show how much disk space is used.
hostname -I ——————Show your IP address. Try this command with your network cable
lsusb ————————— connected and disconnected to see the difference.
Show what is plugged into the USB port. Try this command with
your mouse connected and disconnected to see the difference.

(echo “Here is a list of your C
programs” ; sudo find / -name *.c ;
echo “End of list, have a nice day”) >
mylist

echo “There are ‘ls | wc -l’ files in
this directory”

grep -l “buffer” ‘sudo find / -name *.c’ —- To show the usefulness of this method, here is a
command to search for any C program which contains the word “buffer”. This can be very useful if you want to find which file uses a particular variable or function.

Posted in Uncategorized | Leave a comment

Unix useful tips

1. search specific word in all files in the system

grep -lir “something”  /path/to/dir

2. find and delete specific file in system {

1. find an save paths to the text file  —–> find  ./ -name “*.exe” > filestodelete.t

2. delete listed files —————————> xargs rm < filestodelete.t

}

3.

Posted in Unix | Leave a comment

Install python on ubuntu

1) download python stable from http://www.python.org/download/
2) extract from archive
3) open terminal and go to extracted file directory and simply type ./configure
it will configure your environment for python.
4) after configuration, type “make” on terminal and hit enter
5) when it ends type “sudo make altinstall
6) then you can try python simply type “python“, on the terminal will be apear
>>>” sign, it points that you can start progarming

Posted in Ubuntu | Tagged , | Leave a comment

How does it work in C#? – Part 1

Posted in Uncategorized | Leave a comment

C# Portable Exe File

Introduction

One of the disadvantages of C# is that when you want to run it, the computer must have .NET Framework installed on it. After this article, you will be able to make it runnable from any Windows without the must of .NET.

How to do it?

  1. Make a C# project.
  2. In Solution Explorer, inside your project, there is a line “Reference”. Click the plus near it. Now you can see all the dependencies of your project. Delete all references that aren’t used (delete, and try to run/build. If it is possible to do it, that it is unused. If there is an error, return it by adding it (right mouse click, “Add Reference”)).
  3. For each reference, go to Properties, and in the property “Copy Local” choose “True”. For each Image, Icon… make like to the referenced.
  4. Rebuild you project. Now in your Build/Release folder (inside bin) you will see many dll files. Those files have the information of every resource.
  5. Copy all the files in the folder (from step number 4) into a new folder.
  6. Go to the folder: “<windows folder>\Microsoft.Net\Framework\<latest version>” and copy the file “mscrolib.dll” to the new folder from step 5.  If you don’t find this file, you can always make a search in the Hard Drive which contains Windows folder.
  7. Now your app is portable (with the whole folder content).
  • All the referenced should be in the same folder as the .exe file.
  • If something is missing, there may be problems with the program.

Review

This solution is not the best. The whole program is heavy. But it is a solution! When you search the Internet, you will find such solutions like Portable Net, publish… But this one is quick, easy and does the right result.

http://www.codeproject.com/Tips/392308/Csharp-Portable-Exe-File

 

Posted in C# Programming, Links | Leave a comment

Invoking WPF Control for Thread-Safe Call

if(!timerBox.CheckAccess()) {                   Dispatcher.Invoke(                                                                             DispatcherPriority.Send,(Action)delegate {    //********Your Code goes Here*********                   });                                                                                                                                                                         }

//////////////////////////////////////////////////////////

//********* this mathod does not need new Thread ********

Main_grid.Dispatcher.Invoke(                                               DispatcherPriority.Background, new Action(() =>{  Main_grid.Children.Add(el);                                                                                                            }));

 

Posted in Snippets, Wpf | Leave a comment