SOFTWARE GUIDE FOR BEGINNERS MIOIO AppInventor 2

SOFTWARE GUIDE FOR BEGINNERS

Well, if you're reading this I guess you've already practiced the hardware guide for beginners. In this second part what we are going to carry out step by step is the basic program to connect and disconnect the LED STATUS of the MIOIO card.

The first thing that we will need is a computer with an internet connection and a Google email account, those that end at @ gmail.com. If you do not have it, and you do not know how to get it you can ask someone to help you create a new one for you, or to lend yours.

The second thing we need to do is check that our Android device has an App to read bar codes, if you can not find it in GOOGLE PLAY STORE by putting "QR Code Reader”.

And third, and not least, is to prepare our device to accept applications that are not in the Play Store, as is the case that we are going to create.
To do this, in the Android device, we go into Settings-> Security and activate the box where you put Unknown Origins.

Great, if you already have the email account and the code reader, we can start.

  1. We open a web browser, other than Internet Explorer, and we put in the address bar http://mioio-appinventor.appspot.com this is the moment in which we will ask for the email and GMAIL key. This is done so that no one but us can access the applications we make.
  2. Once we have accepted, we will enter the application MIOIO App Inventor 2.
  3. Now we will click on the button "Start a new project ..." and we put the name that we want to our first project. Press OK. We see that we are opening a window with a little window in the middle of a mobile and a lot of buttons and controls on the left, do not panic, you can take some time seeing that it is all pressing on them. Simply indicate that there are components that will necessarily appear on the screen of our Android device, such as a button, and others that will not be seen, such as GPS, or the blocks of the MIOIO card. Once you have become familiar A little with the things you have seen in the menu on the left, note as above to the left there are two buttons, which puts "Designer" and "Blocks". These buttons indicate the two parts of the application that we need to make the Android application. Let's try it with our example.
  4. In the Designer window we will select the category on the left that says "User Interface" and drag with the mouse a "Button" to the screen of the mobile that we have seen in the middle.
    Then we will click on the category MIOIO-AppInventor-DigitalOut, and the control below, "Led_", we will also drag it to the screen of the mobile. We already have the necessary controls to be able to turn on and turn off the led STATUS of the MIOIO card .
    Diseñador
  5. Okay, now what we are going to do is to determine the behavior of what we want to happen when we click on the button or we release it, in our case, what we want it to do is for the LED of the MIOIO card to turn on or off .
    To do this we now move to the second part of the program, the part of the "Blocks".
    It's time to click on the "Blocks" button in the upper left part of the screen of our computer. In this new window, we will work on a bigger canvas than the previous one. We see that on the left there are some blocks in the category "integrated", and others that are under the category "Screen1", the latter are those that we added. Now take some time getting to know them, as you did with the Components of the "Designer" part.
  6. Great, now you're ready.
    Click on the block Button1. In the window that opens select "when Button1.Press" and drag it to the canvas. Do the same with the block "when Button1.Sold".
  7. Now click on Led_1 and drag the block "call MioioLed1.ledoff" into the block "when Button1.Press" that we used before. Like a puzzle.
    Do the same with the block "call MioioLed2.ledon" but this time drag it into the other block of Button1, the one that says "when Button1.Soltar" we used before.
    That is all, we already have the program done, now it only remains to "compile" it.

    Bloques
  8. In the top menu of the whole, where you put Generate, click with the mouse, and where you put App (generate QR code for the .apk file) press again.Bloques2
  9. We will generate a QR code that we will scan with the program that we downloaded from the Play Store.

Bloques3

 

You can rip the example compiled from here: LED.apk

8 thoughts on “SOFTWARE GUIDE FOR BEGINNERS MIOIO AppInventor 2

  1. Hola:
    Estoy desempolvando mi tarjeta mioio para aplicarla en un proyecto y cuando escaneo el código qr me dice que la aplicación companion no es la versión adecuada (no es la última) y que cambie pronto de versión. Me pdeis decir cual es la última app ?
    gracias.

  2. Hola Daniel, pues mira, está versión de AppInventor no soporta companion, esto es debido a que los bloques de MIOIO no están implementados. Lo mismo pasa con el emulador.
    Con lo que para descargar la aplicación escaneada con cualquier lector de código de barras con el enlace que te proporciona.

    Un saludo.

  3. Ok gracias. Ya he conseguido pasar el programa de ejemplo que mostrais arriba (encender el led naranja al presionar y apagar al soltar) pero no va fino. en cuanto abre la aplicación y sinpulsar ya se enciende el led y aunque lo pulses y/o lo sueltes se queda fijo, como si se bloqueara la tarjeta. He revisado el programa y está bien. Cuando boton1 presionarer ejecutar llamar mioioled1 enciende led naranja y otro bloque cuando boton1 soltar ejecutar mioioled1 apaga led naranja. Voy a seguir experimentando.
    Gracias.

  4. Vale. es como si se hubiera quedado el primer ejemplo que he hecho y en el que me he equivocado en el comportamiento (poniendo en ambos casos encender, al pulsar y al soltar) y no hubiese forma de borrar el código de la placa porque responde igual aunque el programa que he hecho ahora fuera para activar otros pines. Hay alguna forma de resetear la mioio?
    Salu2

  5. Cuando programas con AppInventor la MIOIO, está preparado para que el led se encienda cuando conecte la MIOIO con el dispositivo Android. De esa forma sabes que está conectada.

  6. Esto no termina de ir bien. Cuando ejecuto la app de prueba ioio hardware el led naranja el led naranja en principio esta apagado y con el movil lo enciendo y apago. Cuando ejecuto la aplicación del ejemplo de arriba, nada más abrir la aplicación ya se queda encendido, además el led del usb bluetooth se queda fija y ja no responde. A veces incluso la luz del usb se apaga. He mirado la versión de la placa y es la 1.0. Puede que en esta versión no funcione bien el entorno del app inventor?.es que con la app de prueba ioio hardware funciona de lujo. lo malo es cuando le paso un programa hecho por mi. Ya no se que puede ser. He probado con otro usb bluetoth pero no debe de ser compatible y no lo detecto. 🙁 Qué versión estais usando con app inventor?

  7. Es muy importante que diferencies entre AppInventor y Eclipse.
    Con AppInventor en cuanto la tarjeta se conecta a la aplicación del móvil, el led se debe encender, con Eclipse no.

    La tarjeta no se programa, sólo se hace una aplicación para el móvil que se encarga de comunicar con la tarjeta.
    Si te funcionó apagar el led, realmente todo va bien.
    Intentaré colgar el ejemplo del led está semana para que lo descargues y lo pruebes.

Leave a Reply

Your email address will not be published.