Sensores Analógicos y Digitales con la placa Icaro

Los sensores digitales son los más simples. Un interruptor es un sensor digtal. Simple: Apagado o encendido. Un interruptor de paro o un botón de pulso es lo mismo.

Tomamos un interruptor y conectamos sus extremos a la bornera sn_d1 justo al lado del boton de reset en la placa NP-06.
interuptor de paro
Hacemos unos bloques simples a como se muestra a continuacion:
sensor-digital
El resultado será que cuando se cierra el circuito, es decir el interruptor esta encendido el led primero se encenderá. Cuando el interruptor se apague, el led hara lo mismo.

Los sensores analógicos son un poco más complicados. Su respuesta es un valor que varia segund determinadas condiciones. Para ilustrar esto usaremos un potenciometro. La forma más simple de potenciometros son los controles de volumen. Es bien fácil comprar uno o rescatar uno de un aparato que ya no sirve.
potenciometro
Vamos a encontrar clasicamente tres patitas. La primera es tierra (GND) , la segunda es la salida del sensor (sens_analog) y la tercera es voltaje (VCC). Realmente es una resistencia variable. Si invertimos el orden, no será un problema. Siempre tendremos un voltaje que varia en el centro en relación al voltaje existente entre la alimentación y tierra.

Lo que hay que hacer es conectar los cables en los puertos que se encuentran al lado del led rojo en la placa NP-06. Los tres primeros pines, los mas cerca al extremo de la barra de leds corresponden al primer sensor analógico. En la placa NP-06 estan claramente identificados.
sensor analogico
Ahora hacemos unos bloques a como se muestran a continuación.
sensor_analogico
El resultado es que al mover el valor del control de volumen, la barra de led incrementara o reducirá el valor binario representado por los leds.

Conexión serial a la placa Icaro

La placa Icaro nos ofrece una gran cantidad de beneficios como una placa autónoma. Pero también podemos sacar provecho de su conexión serial. Tortucaro es la herramienta que nos permite esto.

Para ello debemos ubicar el icono de tortucaro en la ventana de icaro y hacer click en él. Luego hacemos click en compilar. Finalmente hacemos click en Cargar. Oprimimos el botón de reset en la placa y nos debe decir que la carga fue exitosa. En la versión de desarrollo, todo esto es más breve, varios pasos redundante se eliminan, pero la lógica es la misma.
botones_icaro
Si este es el primer intento usando tortucaro, podemos querer hacer algunas pruebas. El primer paso es confirmar que existe la conexión con la placa. Desde la terminal usamos el comando ls /dev/ttyA* nosotros esperamos que la respuesta incluya que dentro de los dispositivos existe /dev/ttyACM0

Posiblemente el programa de comunicación serial más simple de usar es cutecom. Lo mas seguro es que no lo tengan instalado, asi que pueden usar la interfaz gráfica o un comando como
su -c «yum install cutecom»

Al iniciar cutecom enviará un aviso que no logro conectar con el puerto /dev/ttyS0, lo cual es lógico porque seguramente no tienen nada conectado a un puerto serial o incluso no tiene puerto seriales en la computadora. Asi que en la parte superior debemos configurar dispositivo o device a /dev/ttyACM0 y luego hacer click en el botón abrir dispositivo o open device. Si no hay malas noticias, son buenas noticias.
cutecom
El programa tiene tres áreas de texto, de arriba hacia abajo, respuesta del dispositivo, historico de comandos enviados al dispositivo y entrada o input. Nos colocamos en input y escribimos «b» y damos enter. En la ventana de respuesta dirá «icaro USB 02»

Si tenemos un servo podemos usar comando como m1! (mover servo del puerto uno al valor ascii 33) o bien puede escribir m1Ñ (mover servo del puerto uno al valor ascii 126) Puede buscar una guia de valores ascii

Ahora que ya saben como es el asunto de la comunicación serial y han comprobado que funciona, pueden hacer algunas cosas más intersantes. Por ejemplo les comparto un pequeño programa de python escrito por Valentin Basel

#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# servo.py
#
# Copyright 2014 valentin basel
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
# MA 02110-1301, USA.
#
#

import apicaro
import time
icaro=apicaro.puerto()

icaro.iniciar()
for a in range(3):
icaro.activar_servo(1,1)
time.sleep(1)
icaro.activar_servo(1,255)
time.sleep(1)

Icaro y la version devel

Cuando estamos probando las ultimas cosas de un programa puede ser que tengamos deseo de ir al paso del desarrollo de ese programa. La versión en desarrollo o devel es un espacio para experimentar, encontrar que cosas no están funcionando y hacer sugerencias. Icaro tiene esta versión y quiero compartir como echarla a andar. No estoy siendo muy explicito, porque si están buscando la versión de desarrollo, supongo que ya tienen alguna experiencia en Fedora

Lo primero a saber, es que el repositorio nos va a presentar la versión estable. Nosotros tenemos que navegar en busca de la versión de desarrollo.

La pueden encontrar aqui: https://github.com/valentinbasel/icaro/tree/devel

Eso les dará acceso a hacer una descarga de un archivo zip. Deben descomprimirlo manteniendo la estructura interna de directorios. Usualmente yo descomprimo en la misma carpeta de Descargas y obtengo una carpeta llamada icaro-devel. Luego muevo esta carpeta hacia mi directorio Home. Lo hago así porque un error de descomprimir cosas en Home, puede ser algo tedioso de limpiar, mientras que si ocurre en Descargas no será la gran cosa.

Voy a usar la palabra USUARIO que ustedes deberan cambiar por el nombre de su propio usuario. Hasta el momento tenemos /home/USUARIO/icaro-devel/ y posiblemente han usado los beneficios de las herramientas gráficas.

Si no han instalado la version estable, ustedes deben hacer algunas configuraciones, las cuales las realicé desde la terminal

su -c «group add microchip»
su -c «usermod -a -G microchip USUARIO»
su -c «usermod -a -G dialout USUARIO»

Lo siguiente es poner algunos archivos en su sitio, lo mismo esto lo hago desde la terminal

mkdir ~/.icaro
cp -r ~/icaro-devel/hardware/icaro/micro/firmware ~/.icaro/
cp -r ~/icaro-devel/hardware/icaro/micro/conf ~/.icaro/
su -c «mkdir /usr/share/icaro»
su -c «cp -r ~/icarodevel/hardware /usr/share/icaro/»

Para correr la version de desarrollo la ejecutan desde la terminal ubicandose en el directorio de desarrollo:

cd ~/icaro-devel
python lanzador.py

Correr el programa desde la terminal nos permite ver los comentarios que va generando y en caso de error nos puede dar idea de que se trata ese error.

HPLIP configurar impresoras HP en fedora 21

Tengo una impresora o printer multifuncional HP LaserJet 1536 dnf MFP conectada en red a mi nueva instalación de Fedora 21 Work Station.

Esto siempre es un dilema, puesto que añadir impresora desde el panel de administración de impresoras no siempre me deja los resultados deseados. Por ejemplo no tengo acceso al scaner de la impresora multifuncional. Por otra parte desinstalar hplip de fedora e instalarlo desde el sitio del fabricante es una opción válida pero bastante lenta. Inicia por borrar la cache de yum, luego instala paquete por paquete, lo que incluye los paquetes de compilación gcc entre otros. Además incluye la herramienta de scaner xsane, muy poderosa pero mucha gente prefiere la herramienta simple scan. Luego pasa a compilar y finalmente uno debe ejecutar hp-setup.

Para evitarse tanto complicación, la forma fácil de instalar una impresora multifuncional HP en fedora es irse a la terminal y ejecutar de una vez como administrador (root o superusuario) el comando :

hp-setup

Bueno no es tan fácil, eso les va a dar un error porque hay un paquete que no esta instalado. Si leen con atención les va a decir cual es el problema. Pero nadie lee la salida del sistema para encontrar la solución. La computadora no te odia, solo no sabe que hacer y te dice que no te entiende. Muchas veces al decir que no entiende te das cuenta que te falto. Asi que de nuevo como administrador:

yum install hplip-gui

Luego de instalar ese paquete y sus dependencias, entonces si estamos listos para la mágia. Intentamos de nuevo como administrador

hp-septup

Eso les llevara a un panel de configuración que es bien sencillo de seguir. Como resultado tendrán su impresora HP multifuncional instalada en Fedora 21 en el panel de impresoras y además el scaner funcionando. Yo desactive la opción de fax, pero tendrían esa opción también si lo desean.

En fin, normalmente las impresoras o printers se configuran automaticamente en Fedora, pero algunos modelos necesitan un pequeño paso adicional.

UPDATE he tenido problemas en Fedora 22 con el instalador gráfico. Una opción alternativa es usar como administrador el comando:

hp-setup -i

Esto hace la secuencia de instalación en la terminal.

I have found my place within Fedora Project

As a Fedora Ambassador I should help people find a place to collaborate with the Fedora Project. I have been around for long time doing different things in Fedora Project. I feel that I have failed myself because I did find my place before. I have been doing for so long events, recruiting collaborators and helping people. I failed my self to help me doing things that I really enjoy doing for the project.

FUDCon Managua 2014 was a major challenge and at some points I was considering quit. People like Lila, Cristhian, Samuel and Fernando keep me going. At the same time, Fedora Council was taking shape and FamSCo was starting to change. Probably I was involved in to many things.

Some time ago I was asked if I will keep up with marketing activities. I accepted to be dismiss from Marketing Team. I am not doing anything, it is fair to step aside. It felt right, I can be back any time when I want. Later on I unsubscribe myself from the marketing mailing list as it was no longer related to marketing, but to Fedora Magazine.

I quit to freemedia, I was dealing with membership management which I stepped aside long ago, and recently I quit completely as I haven’t sent media in months. Again, it felt right as I can came back anytime.

The transition from Fedora Board to Fedora Council made me take a choice. Did I wanted to keep in that level of commitment? I honestly I was not following the mailing list and not following the trac. Much of this was because of FUDCon, but also I lack energy.

I really wanted to FAmSCo to change, when that become a reality, then I felt that I did not need to keep involved. Againg I lack energy, motivation or both. So I quit.

Even I have organize 9 Fedora Release Parties in a row. I got a hotdog cart to release Beefy Miracle. I also helped to organize release party in El Salvador, Guatemala and Costa Rica. I am not doing it now. Lila has said to do it, and I am glad to someone else take charge of that.

I came to Fedora because I wanted to have a stable platform for Amateur Radio. I like electronics and experimenting. I needed to ask help and end up helping people. It was a great ride, but it was a side track.

So what I am going to do? I want to thanks Valentin and Icaro Project for helping me find my place in Fedora. I love the electronic experimenting. It is a wonderful project aiming to education, but you can get on board and keep growing and learning with it.

This is what I was looking for. A place to collaborate with something that challenge me to learn things that I want. A thing to talk about and do presentation about things that I am passionate about.

Don’t get me wrong, I love Fedora Project. But I am not passionate about talking about features that I am not using and most of the time I am not fully understand. I did it because I fell it was something to be done.

Since I get in touch with Icaro I am thinking how I going to use Icaro boards with Amateur Radio. Switching equipment, satellite tracking, too many possibilities.

Since FUDCon Managua 2014 I was been asked about robotics. From the science committee of the vice presidency office, from RUPAP degree in system, there is a department of research and development of RUPAP that also asked about, the ministry of education also asked about. I event got a request for a pilot experience with a school. My answer has been, Icaro project will happen in Nicaragua, you can be part of it or just watch it happen.

I have found my place within Fedora.

FUDCon Managua 2014 Numbers and Lessons

I would like to ponder some questions. To do so, there are some background to cover. You can spare with me in all the details or you can go straight to the bottom.

We spent $8,373.38 in air fares for 9 collaborators. Air travel is expensive, and it is more expensive in Latin America. There was the agreement to pay for the visa for the only persona that needed it, it was $50.  We are glad that we have 4 people traveling on their own budget. We end up we a team of 14 including the holder of the fedora scholarship. The expenses of the fedora scholarship are not taken into account, as that comes from another budget.

We spent $912 in food during the event and $ 772 in FUDPub. There was $77 in water and sodas for the team. The FUDPub was over the initial budget because there were more people that were supposed to attend than we estimated for this closure night of FUDCon.

We paid to the university $549.95 that consisted mostly in posters and booklets. The remainder were some minor charges for audio and projectors.

There were some expenses in promotion, like roller up banners and horizontal banners. This added up to $ 342. Part of this was to reciprocate our sponsors.

Lodging was $1895.40 not including those that were paid by the collaborators and also not including the room share of the fedora scholarship holder. This sum was at the discounted price offered for the convention. There was also the use of the meeting room for hacking during the nights that was $130. Transportation was $255 that were accounted for moving people to the university and back to the hotel. There were also some trips to the airport in this sum. Mostly all airport pick up was done personally, so it is not included. Driving people in my car from the hotel to the university was not included. This amount related to transportation does not include two tour trips organized before the event and after the event.

T-shirts cost $ 750. There were some minor cost for a web cam, security cords for laptops, toner for printing schedules that add up to $ 209.45

If you add up all this, you will get the amount of $14,266.18 That’s is what FUDCon Managua 2014 actually cost, at least to what is accountable.

The other part is were the money come from. For start we had the Fedora Premier event budget of $10,000. Then we had Bluehost collaboration of $1,000. Güegüe Comunicaciones paid all t-shirts, $750. Dotora Barreto’s dental clinic, paid part of the FUDPub $315. Monchito.net gave $300 and Sen Comunicaciones helped with other $300. Computer.net gave $160.

We have other sponsorship like Movistar that provided internet bandwidth at the university and Comtech that supplied one web cam and color ink printers used for badgeds, food tickets and other minors colorful printing needs. Those are non quantificable.

In the end we raised the amount of $12,825.00. So, there is a difference of $1,441.18

Mansión Teodolinda gave an extra discount of $229.73 over the lodging invoice, which already had a discount. There was also items that were not charged, like transport for $255 and meeting room use for $130. $77 related to water and sodas that were available at the university was also not charged. There were items that were paid for like banners $342. This makes a contribution of $1033.73. Again, this was an extra help, as the lodging already has a discount price.

We end short by $407.45 that I paid from my pocket. This is quantifiable, but there are non quantifiable expenses about doing errands, calling people, meeting people, and so on. This non quantifiable cost also is shared with the rest of the local team. Lot of time invested. I will not call on the fuel I expend going to the airport, as that was a personal choice as a host. I don’t think the local team will charge for transport fares going and coming for all the errands needed to organize the event.

Having the numbers in black and white, if not meant to show how much I invest in the project. It is not to claim for reimburse. I was absolutely clear during the planning and the execution of the event that my business and I will cover the difference.

My point is to raise the awareness of what doing FUDCon really means. There has been a lot of talks about this, but throw some fact and figures makes clear.

The  budget of $10K is short. We have been talking long about this issue. The reply is that extra money will be given if it is justify. There is no clear definition of how to justify extra budget. Historically, FUDCon LATAM has cost about $15K.

We expect from the local team organize an event and at the same time raise  about $5K in sponsorship? Raise sponsorship is not something expected as expertise of the local team. This is a learning experience that is not transferable as it depends on the local context. Most likely all this work will not generate further benefits for the Project.

After doing all, the local team end being so busy hosting the event that they can not attend the talks and hacks. I am so glad that we agreed to have some of the key people organizing the event lodged in the hotel. At least they get some hacking time at night. Not much, as there was things to get ready for the next day. But it was some time for learning and sharing with the LATAM collaborators.

I have a income from a job, a car and contacts, and I struggled leading the organization of the event. So why doing it? Why a collaborator should want to organize FUDCon? You may get the sense of accomplishment, but where is the fun in it? I will not recommend to any friend to engage in organizing FUDCon in the current terms. There are some concern about loosing collaborators that undergo this challenge.

People worked hard to host the events. For most of them was their first Fedora Premier Event. Yet, they didn’t fully participate of it. They were hosting. They were taking care that things were running smoothly.

What do I think we should do? I do think that we need to clear what the Fedora Project expect as outcome and to provide budget according to objectives. It also means that can be evaluated if it was a success or not. It is need to clarify which may be justified for extra funds. Both side are busy, so a clear guide will help. I do think that people that gave so much time and effort organizing one Fedora Premier Event should be rewarded. Those that had not the opportunity to attend a Fedora Premier Event should be considered to be sponsored for the next event.

FUDCon Managua 2014 Clousure

Last day of FUDCon I tries to approach as many contributors to ask: What do you think was accomplished in this FUDCon? I used their input as part of the closure speech at the end of the convention. I improvised with a hand write notes. Here you have a more digested summary.

The most important thing was first hand experience, that was mention also as learning with practical examples.

The second most relevant issue was Networking. Not in the wires and OSI layers. Get in touch with people, to get acquaintance, to know what they do. That king of bonding tie together the community. It was also view as scouting. People see who is doing what and how they may engage in a team in the short future.

The view was that there was low attendance, but people there were really engaged. There were package reviewed. This is the first FUDCon that we have computer labs for practical sessions. There were restrictions, but we have it. All this activity lead to people sponsored in packaging and ambassadors. It also lead to candidates for packaging, web sites, ambassadors and documentation teams.

Electronics got a fair share of fans. People looking at Icaro Project become aware that it is possible to make from scratch robotics. People looking at Arduino view that Fedora (or Linux) is the way to get real into the edge of programming and electronics. By the way, Icaro package was migrated from Gtk2 to Gtk3 during this event.

Some people were more into the opportunity of give back part of all that we have gotten from Fedora and show the open source way. More concrete though were on looking as an opportunity to focus on what it is important.

From here the speech went to thanks the University and its staff, sponsors that contribute to the event, and specially the local team that made possible organize the event.

I save for last a brief comment with Robert Mayr about the potential that is hold back by the language barrier. This talk become a exchange of email. I often took for granted that if you are technology you better get into English. I have solve problems beyond my skills by just been able to read what the screen said. But Robert validate those people that claim to have technical skills and that have problems to engage with Fedora Project because of a language barrier. I felt dumb. I myself were talking a few months back in FLOCK about helping girls to apply to Woman Outreach Program, as a proof reader and translator if were needed. So, that is a real problem. We need to start looking to ways to mitigate this barrier.

FUDCon Managua 2014 The Facts

This is a quantitative summary of the things that happened on FUDCon Managua 2014. So cold data, not so much into feelings and ideas.

Four universities other than the venue were visited to promote the event, and also Fedora (UPOLI, RUPAP, UAM and UCA). There was presence in three TV interview at different channels to promote the event.

Our online registration at the website had 175 persons, our estimated peak attendance was 150. This was really under the shadow of last year 800 people audience in Cusco. The badge for FUDCon Managua 2014 was awarded 46 times, which give us an idea of how many FAS accounts were active. Last year were only 25. This shows that our low attendance was highly engaged.

Ambassadors team got new 4 members (lilixx, searchsam, srkraken and creaturahpc) and one new candidate (menina).

Web sites team got one new team member (Echevemaster) that got involved during the preparations for FUDCon and two new candidates (lilixx and sophiekovalesky). By the time both candidates have alredy submited patches.

Packager is a bit mor difficult to describe. There is one approved memeber (williamjmorenor) and there are four people that submited packages (yaderv, franko92 magjogui and pynash). franko92 has 2 packages in review and yaderv did also the migration of icaro package from GTk2 to Gtk3.

Documentation got one candidates (searchsam) that by now is already approved.

This sum 12 people that moved from a non defined relationship with fedora to actual contributors. Many of them were in the borderline, but FUDCon did the last push to cross the line to engage wit actual teams.

Infraestructure got two person interested (mayorga and creaturehpc) but both need follow up to see if that interest become more than that.

First time that FUDCon LATAM had computer labs. There were two, we had limitations on the use of them, but we had them. We have a hacking at night, a meeting room at the hotel was available from Tuesday 21st to Friday 24th which was convenient.

We got some news hits as follow:
Printed
El Nuevo Diario Róbotica Educativa
El Nuevo Diario FUDCon

Online
La prensa TV FUDCon
Revista Help Desk TIC FUDCon

FUDCon Managua 2014 The rough edges

We have a paradox. We are equally fedora contributors and members of the fedora project but we are not equal. There are two variables that I will like to point, income and confidence. We have successful people very confident and with relative good income on one side and students with no job building their character. Some of the students depend on scholarship to keep them in college.

So, one extreme may get pushy to say we are equal, we have to chip in the same for food and drinks. That is unfair. We all not have the same resources and we all not drink alcohol. This is a rough edge that we should avoid. This kind of pressure is not trivial for some people.

In the other extreme, you get questions like: there will be something to pay for gas to help the ride? You may think that is because they don’t want to get ask for money that they don’t have. But I like to believe it is because they know the value of things and want to help is they can.

You find very nice contributors that take care of the whole bill, and most people think they do that because they can. But I firmly believe they do because they know that there are someones that can’t afford their share in that bill.

But sometimes somebody said that will take care of the bill and then collect later. Which is a way to spare those who can afford their share. Some times people that can cover their share don’t repay and is odd to be reminding people about that.

For me the worts of all is the sum . Those that overdue they excitement and end up short on money. They are usually the same who don’t repay, those who do not ask if a share is needed, those who do not thanks if the bill has been covered for them and also those who force others to chip equally.

But if we are not aware that we have diversity in income and in character, we will be hurting people when we get all together. Please pause and think. We should not hurt our friend just because our equality as contributors is overestimate .

FUDCon Managua 2014 The Regrets

I want to apologize to people that I hurt. I was on the edge having to deal with too many things, apparently it was a cutting edge and not in the good sense.

First, I want to apologize to a friend who usually bring the fun to the meetings. I was so desperate to get things done for the event that forgot that we needed fun. Even that I always said that fun is important. I miss him as part of our team, as a friend.

Second, I want to apologize to Eduardo Echeverria. We had a block in communication and I lost it. Before doing or saying anything regrettable, I left. This was not well understood. People do not believe that as amicable as I usually am, I can lost it. Usually it is not a good idea to put a finger into a spinning fan. I try to avoid people from the hazard of my spinning. Nothing said, nobody hurt, but it was an awkward moment at an inconvenient time an took me a while a regain my self control. This also should include apologies to Lila and Samuel who took my load during this time.

Third, I want to apologize to Fernando. He is a kind person and sometimes I feel that he look up to me. A trivial issue for me, that was important for him. I dismissed him harshly and rushy twice. Worst of all, second time in front of other people.

I think that most likely there are people that I am missing on this list, I am most sorry to have been hurting some one and not even noticing. I apologize to all.