quarta-feira, 1 de fevereiro de 2012
Arduino
Em breve alguns posts.
Segue o link do site oficial http://www.arduino.cc/
sexta-feira, 8 de abril de 2011
sexta-feira, 25 de junho de 2010
Tutorial : PyQt no Windows
- Qt - 4.6.2
- Qt Creator - 1.3.1
- Python - 2.6.5
- MinGW
- SIP-4.10.2
- PyQt-win-gpl-4.7.3
Qt -------------------------------------------------------
Caso você não tenha o Qt, você pode baixar o SDK (QtCreator + Qt) em http://qt.nokia.com/downloads na aba LGPL.
Após o download, faça a instalação típica do windows (.exe) e escolha a versão com MinGW, caso você não tenha.
O Qt será intalado em C:\Qt\
Python -------------------------------------------------
Caso você não tenha o Python, você pode baixar o binário em http://python.org/download/ e instalar.
O python será intalado em C:\Python26
Path ----------------------------------------------------
Agora você precisa sertar a PATH do sistema para realizar os próximos passos.
Siga os Passos: INICIAR>>Painel de Controle>>Sistema>>Configurações Avançadas do Sistema(Lateral direita - Windows Vista)>>Variáveis de Ambiente.
Vá em Váriaveis de Sistema (parte de baixo) e edite a varável "Path" incluindo a linha:
- ;C:\Qt\2010.02.1\qt\bin;C:\Qt\2010.02.1\mingw\bin
Para que a PATH tenha validade, reinicie seu computador.
Após reiniciar, vá no prompt de comando: INICIAR>>cmd.exe para verificar se a path foi digitada corretamente. Verifique se os proximos dois comandos são ativados:
g++ -v
qmake -v
Caso aconteça algum erro, a path não foi digitada correatemnte, ou o programa naum se encontra no lugar especificado.
SIP -----------------------------------------------------
Faça o download do SIP em http://www.riverbankcomputing.co.uk/software/sip/download , faça o unzip e siga os próximos passos para instalação:
INICIAR >> cme.exe
C:\Desktop\sip-4.10.2\ > C:\Python26\python configure.py -p win32-g++
C:\Desktop\sip-4.10.2\ > mingw32-make
C:\Desktop\sip-4.10.2\ > mingw32-make install
Verifique se os arquivos foram adicionados corretamente:
C:\Python26\include\sip.h
C:\Python25\Lib\site-packages\sip.pyd
Faça o download do PyQt em http://www.riverbankcomputing.co.uk/software/pyqt/download faça o unzip e siga os próximos passos:
INICIAR >> cme.exe
C:\Desktop\PyQt-win-gpl-4.7.3\ > C:\Python26\python configure.py -w
C:\Desktop\PyQt-win-gpl-4.7.3\ > ..........Configurando............
C:\Desktop\PyQt-win-gpl-4.7.3\ > Do you accept the terms of the license? yes
C:\Desktop\PyQt-win-gpl-4.7.3\ > ..........Configurando............
C:\Desktop\PyQt-win-gpl-4.7.3\ > mingw32-make
C:\Desktop\PyQt-win-gpl-4.7.3\ > ..........Configurando............
C:\Desktop\PyQt-win-gpl-4.7.3\ > mingw32-make install
Após a instalção, verifique os arquivos:
C:/Python25/Lib/site-packages/PyQt4
C:/Python25/Lib/site-packages/PyQt4/pyqtconfig.py
C:/Python25/Lib/site-packages/PyQt4/Qt.pyd
C:/Python25/Lib/site-packages/PyQt4/QtAssistant.pyd
C:/Python25/Lib/site-packages/PyQt4/QtCore.pyd
C:/Python25/Lib/site-packages/PyQt4/QtDesigner.pyd
C:/Python25/Lib/site-packages/PyQt4/QtGui.pyd
C:/Python25/Lib/site-packages/PyQt4/QtNetwork.pyd
C:/Python25/Lib/site-packages/PyQt4/QtOpenGL.pyd
C:/Python25/Lib/site-packages/PyQt4/QtScript.pyd
C:/Python25/Lib/site-packages/PyQt4/QtSql.pyd
C:/Python25/Lib/site-packages/PyQt4/QtSvg.pyd
C:/Python25/Lib/site-packages/PyQt4/etc..........
C:/Python25/pylupdate4.exe
C:/Python25/pyrcc4.exe
C:/Python25/pyuic4.bat
C:/Python25/sip
C:/Python25/sip/PyQt4
C:/Python25/sip/PyQt4/Qt
C:/Python25/sip/PyQt4/Qt/Qtmod.sip
C:/Python25/sip/PyQt4/QtAssistant
C:/Python25/sip/PyQt4/QtCore
C:/Python25/sip/PyQt4/QtDesigner
C:/Python25/sip/PyQt4/QtGui
C:/Python25/sip/PyQt4/QtNetwork
C:/Python25/sip/PyQt4/etc..........
Pronto, PyQt Foi intalado com sucesso !!!!!!!!!!!!!!
Abra o pythone faça o teste:
>>> from PyQt4.Qt import *
>>> from sip import *
>>> print SIP_VERSION_STR, QT_VERSION_STR, PYQT_VERSION_STR
4.10.2 4.6.2 4.7.3
>>>
Agora você pode ver alguns exemplos dentro da pasta do PyQt.
Bom Trabalho.
sexta-feira, 23 de abril de 2010
FLISoL 2010
No dia 24 de Abril de 2010(sábado), será realizado, em toda a América-latina, o Festival Latino-Americano de Instalação de Software, FLISoL.
Evento de tradição em manaus contará com palestras, oficinas, mesa redonda e mini-cursos relacionados ao mundo do Software Livre. Para você que gosta, curte ou qquer aprender sobre esse outro mundo do software, não perca esta oportunidade.
O prazo para inscrições do FLISoL 2010 vai até o dia 23/04/2010 às 23:59.O Cadastro pode ser realizado no link http://am.softwarelivre.org/flisol/?page_id=3.
Não esqueça de no dia do evento levar os 2kg de alimento não perecível que serão doados a casa dos portadores de hanseníase no bairro da Alvorada.
Para maiores informações consulte http://am.softwarelivre.org/flisol/
O que vai acontecer ? consulte o cronograma
quinta-feira, 18 de março de 2010
RS232 Cabo Serial Espião
Ultimamente tenho trabalhado com "C" pra captura de dados via serial de máquinas. Bom, nunca tinha trabalhado nessa área, estou gostanto me saindo muito bem.
Como havia dito, preciso capturar dados de máquinas via serial, no qual eu e o bruno conseguimos tranquilamente, pra isso precisamos montar alguns cabos, exemplo:
DB9(Fêmea) -> DB9(Fêmea)
DB9(Macho) -> DB9(Macho)
DB9 -> DB25
entre outros...
sendo o normal DB9(Fêmea) -> DB9(Macho), aquele que todo mundo conhece.
No entanto nos deparamos com uma máquina no qual o cabo serial está comunicando-se com um outro computador e não pode ser desplugado, pra isso precisavamos criar um cabo serial espião, onde passamos uns 4 dias tentando., até acharmos o modelo abaixo:

Após feito o cabo, conseguimos capturar os dados enviado.
Fonte:
quinta-feira, 4 de fevereiro de 2010
Twittando via linha de comando com TTYtter
Primeiramente vamos baixar o TTYtter:
sudo wget http://www.floodgap.com/software/ttytter/ttytter.txt -O /usr/local/bin/ttytter
Permissão de Execução:
sudo chmod +x /usr/local/bin/ttytter
Criar um Alias:
cd /~
echo -e alias ttytter=\"ttytter -user=rodrigochiquito -ansi\" >> .profile
source .profile
Pronto, agora so eh iniciar o TTYtter:
ttytter
Comandos:
- /help (/?)
- Displays mad-k001 ASCII art. Oh, and a quick list of commands, secondarily speaking.
- /refresh (/r)
- Thumps the background process to do another update for new tweets right away instead of waiting for the next one scheduled. Remember, Twitter only gives us the last twenty tweets, so you will therefore only get the last twenty too (important if you're watching the public timeline, or have a lot of friends). If nothing new is available, the background process will politely tell you so. (/thump is a synonym since I keep typing it.)
- /again (/a)
- Displays the last twenty tweets from your timeline, even old ones, along with refreshing the most recent results from keywords and hashtags you may be tracking (if any).
- /again [username] (/a [username])
- Displays the last twenty tweets for user username (sans braces, of course). If the user doesn't exist, or is protected/otherwise not available to you, you will get an error message instead. This command is synchronous and the foreground process will pause until the tweets are received or timed out.
- /whois [username] (/w [username])
- Displays the Twitter "vital statistics" for the specified user, including number of people they follow and are followed by (f:), number of updates (u:), real name, location, description, URL and image/picture, along with (if you are not anonymous) if you already follow this user and if this user follows you. Their URL, if they have one, is loaded into the variable %URL% so you can substitute it in a tweet (see command history and substitution below), /shorten it, or open it with /url.
If you specify a filter with -avatar, then the URL for the user's picture is passed to the specified shell command to operate upon it, including saving it, opening it in a window somewhere else, or even converting it to ASCII art. See Command-line options for more. This command is synchronous and the foreground process will pause until the data is received or timed out.
- /wagain [username] (/wa [username])
- Combines /again followed by /whois (yes, the name is out of order, but it sounded better than /againw).
- /dmrefresh (/dm)
- Thumps the background process to do another check for direct messages right away instead of waiting for the next one scheduled. Again, this is limited to the last twenty, if you are a particularly popular person to whisper to. See the section on direct messaging below.
- /dmagain (/dma)
- /again:/refresh::/dmagain:/dmrefresh
- /replies (/re)
- Displays your last twenty @ replies. This may be affected by your Twitter account notifications settings. This command is synchronous and the foreground process will pause until the replies are received or timed out.
- /reply [menu code] [tweet] (/re), /vreply [menu code] [tweet] (/vre), /thread [menu code] (/th)
- This set of commands respectively replies directly to a tweet or direct message using threading if possible (the first using conventional replies; the second using a publicly visible reply a la "r @al3x Twitter API roxx"), and the last displays the thread a tweet is part of (if any). See the sections on tweet selection and DM selection below.
- /delete [menu code] (/del)
- Deletes a tweet (only your own tweet -- nice try) or a direct message. See the sections on tweet and DM selection below.
- /favourite [menu code] (/fave, /f), /unfavourite [menu code] (/unfave, /unf)
- Favourites or unfavourites a tweet, respectively. See the section on tweet selection below.
- /favourites (/faves, /fl)
- Displays your most recent favourite tweets. This command is synchronous and the foreground process will pause until the data is received or timed out.
- /favourites [username] (/faves [username], /fl [username])
- Displays someone else's most recent favourite tweets. This command is synchronous and the foreground process will pause until the data is received or timed out.
- /retweet [menu code] (/rt), /eretweet [menu code] (/ert), /fretweet [menu code] (/frt)
- Retweets a tweet (direct messages, wisely, not allowed). /eretweet loads the tweet into the special substitution variable %RT% which you can use at the beginning or end of your next tweet; regular /retweet just sticks on RT @username: and sends it right away. If you really like the tweet, then /fretweet will favourite it for you at the same time as you retweet it. See the sections on tweet selection and command history/substitution below.
- /search [query] (/se)
- Queries the Twitter Search API, as if you had typed it into the box on search.twitter.com, and displays the most recent results. See the section on Search API integration below. This command is synchronous and the foreground process will pause until the data is received or timed out.
- /track [keywords] and /tron [keywords], /troff [keywords], /#[hashtag], /notrack
- Keyword and hashtag tracking (respectively: set your keywords, add a keyword, remove a keyword, shortcut for adding a hashtag, and cancel all tracking keywords). See the section on Search API integration below.
- /trends (/tre)
- Asks the Twitter Search API for the most current trending topics. Displays them as /search and /tron commands (qq.v.) you can simply cut and paste to execute. See the section on Search API integration below. This command is synchronous and the foreground process will pause until the data is received or timed out.
- /versioncheck (/vcheck)
- Pings the floodgap.com server (this one!) to see if you are using the most current version.
- /short (/sh)
- Shortens a supplied URL (by default using the is.gd service, but may be compatible with others). The new shortened URL is displayed and you can substitute it at the beginning or end of subsequent tweets using %URL% (see command history and substitution). If you don't specify a URL, then the current value of %URL% is substituted.
- /url [menu code]
- Opens the URL(s) specified in the tweet or direct message indicated by the selected menu code, according to the current -urlopen option. See the sections on tweet and DM selection below. If you don't specify a menu code, then the current value of %URL% is substituted (you can also use an arbitrary URL if you like). (Nota bene: While /url will accept UTF-8 characters as valid parts of a URL (damn you tinyarro.ws), that doesn't mean your underlying browser will.)
- /dump [menu code] (/du)
- Dumps out the internal structure for the tweet referenced by the specified menu code (which, if only stored in TTYtter's backing store, may omit fields irrelevant to TTYtter). This is mostly for debugging, but useful for people who want to grab URLs to individual tweets, as the URL for this particular tweet is placed into %URL% for additional use.
- /!
- Allows you to enter a shell command from within TTYtter. This is run with whatever Perl thinks your shell is (inside system()); for example, /!ls displays the contents of the current working directory. Remember that this opens up subshells (on purpose), so you can't change, say, an environment variable this way and expect the Perl running TTYtter to see it.
- /history (/h)
- Displays the last set of commands entered (see Command history and substitution below).
- /set [key] [value] (/s) and /print [key] (/p)
- Allow setting and printing of command line options at runtime. Not all command line options can be changed. For more about this, see Command-line options.
If you type /print by itself with no key, the (visible) settable values are displayed.
- /me
- For the IRC freaks. Simply echoed as a tweet, /me included.
- /ruler (/ru)
- Prints a "ruler," 140 characters wide plus the size of the prompt, as a convenient visual aid.
- /quit (/q)
- Leaves ttytter. Pressing CTRL-D or CTRL-C will also do this. It's preferable to use this command (or those keysequences) to exit ttytter because if you kill the console process outside of ttytter, the background process may not get cleaned up and will have to be killed separately. /exit and /bye are synonyms by popular request.
/quit immediately stops anything running in the background, including pending requests for new tweets or DMs. If you want to wait for these to complete, use /end (/e).
Para maiores informações:
http://www.floodgap.com/software/ttytter/
terça-feira, 2 de fevereiro de 2010
Twittando via linha de comando
Primeiro é necessário instalar o pacote:
sudo apt-get install curl
Em seguida crie um script em /bin:
sudo vim /bin/twitter.sh
Digite as seguintes linhas:
#!/bin/bash
curl -u USUARIO:SENHA -d status="$*" http://twitter.com/statuses/update.xml > /dev/null
echo "Mensagem Enviada!"
Trocando as palavras USUARIO:SENHA pelos seus respectivos valores referentes ao twitter.
em seguida dê permissão:
sudo chmod 755 /bin/twitter.sh
Caso /bin não esteja incluso no seu $PATH, inclua da seguinte forma:
sudo vim /.bashrc
e digite no final do arquivo:
export PATH=/home/USER/bin/:$PATH
salve o arquivo e por fim, no terminal:
source /.bashrc
Pronto! basta testar. Abra o terminal e digite:
twitter.sh Testando twitter via linha de comando
Espero que tenha ajudado alguem.
Fonte
