We have upgraded the community system as part of the upgrade a password reset is required for all users before login in.

Omega 2 and Arduino dock.



  • I am beginner and I funded for Omega 2 and dock but by mistake I order Arduino dock under impression that I omega 2 plus is coming with basic dock by default. Now I have only omega 2+ and Arduino. I attached omega 2 on docker and trying to connect wifi but unable to do anything. Not sure if O2+and Arduino make any sense. Do still need omega2 dock?



  • @Aditya-Kumar said in Omega 2 and Arduino dock.:

    Do still need omega2 dock?

    Only you can answer that, no one else can tell you whether you need one or not. Do you need a dock for your Omega2+? If you have a 3.3.V power-supply then, technically, you don't need one -- I am using my Omega2+ by simply connecting it to a cheap-as-chips adjustable SMPS set at 3.3V, with no docks or anything else -- but a dock would certainly make it easier to use the GPIO-pins and the USB-port, if you're not able to fashion connectors of your own.



  • @Aditya-Kumar Unless you need the Arduino functionality you don't really need the Arduino dock.
    The Arduino dock basically gives you the equivalent of an Arduino Uno to which the Omega is connected and can communicate with
    That said, you should still be able to use your Omega in the Arduino dock and get WIFI access - just need to plug the Omega into the Arduino dock and power in to the micro USB connector.
    As per separate reply, it is possible to use the Omega without a dock (but you then still need to hook up a reliable regulated 3.3v power supply to it). Life is a lot simpler if you have a dock - the Mini Dock is fine if you don't need any additional connectivity/functionality and can be easily powered off any pretty standard phone charger with a micro USB connector



  • So I did the same thing, but on purpose. I chose the arduino dock as a way to learn arduino programming and i liked the idea of being able to flash remotely.

    That said, I have no other dock, and the documentation is very lite on the arduino dock 2. But I did manage to get my Omega2+ set up and on wifi no problem.

    I just docked the omega on the Arduino Dock 2 (AD2) and powered both via micro USB connection on the AD2. wifi connection showed up and went through setup. I recommend creating your cloud account and verifying (via confirmation email) before going though setup if you plan on using the cloud console.

    Also, when flashing the update the web interface showed a progress bar and said it all went though ok, but the Omega2 didn't reboot afterwards (LED stayed off) so i simply unplugged and replugged the power and it came up fine, working normally.


    Now, I need to figure out if the arduino dock 2 comes ready to use out of the box or if I need to flash the bootloader on it. Doesn't seem to be much info on v2 of the dock.

    Anyone know if I can us the Ω2 pin breakouts on the AD2 and follow these instructions to flash the dock?



  • @Cesar-Vargas Congratulations 🙂

    Regarding your questions:

    Now, I need to figure out if the arduino dock 2 comes ready to use out of the box or if I need to flash the bootloader on it. Doesn't seem to be much info on v2 of the dock.

    Anyone know if I can us the Ω2 pin breakouts on the AD2 and follow these instructions to flash the dock?

    I don't know but I certainly hope so (would be nice if we got up to date Omega 2 and Arduino Dock V2 documentation). I currently have the original Omega and Arduino dock and am awaiting my Omega 2+ and Arduino Dock V2 - on their way, I have tracking info but not here yet. I will be trying it all out when they arrive - let us know how you get on.

    I would suspect that the Arduino Dock V2 will need flashing before use - presumably using the same (or similar) process as in the documentation you reference.

    However, note that the documentation you reference really only relates to using the Arduino Dock to drive Neopixels from the Omega. That said, the techniques used therein can be adapted for more generic use of the Arduino Dock from the Omega.
    For the original Omega and Arduino Dock, I have produced some generic code that can be found at https://github.com/KitBishop/Omega-GPIO-I2C-Arduino/tree/master/libarduino (for the Omega side) and https://github.com/KitBishop/Omega-GPIO-I2C-Arduino/tree/master/arduino_omega (for the Arduino side). These all make use of some of the other components in https://github.com/KitBishop/Omega-GPIO-I2C-Arduino and come complete with detailed documentation in the .pdf files.

    As soon as my Omega 2+ and Arduino Dock V2 arrive I will be checking that my code works with them too



  • @Kit-Bishop Thank you so much! I'm really excited to get this thing going and start on some projects!

    So I was going to give it a try earlier but I hit a snag.

    In comparing the pins from the table to the expansion headers (pin diagrams) of both the Arduino Dock 2 and the Expansion Docks, pin 19 is missing from the Arduino Dock 2.

    1_1483073225308_Pasted_Image_12_29_16__7_56_PM.png 0_1483073225304_Pasted_Image_12_29_16__7_52_PM.png

    Hopefully someone from Onion can chime in or update the guide like you mentioned. But until then i think I'm going to have to breadboard it out.

    I'll report back if I have any success.

    Cheers.



  • @Cesar-Vargas This looks odd to me - I would have hoped that the GPIO connector on the Arduino Dock matched that on the expansion dock.

    However:

    1. There are some small differences in pin out on the latest Expansion Dock compared to the original one though pin 19 wasn't one of the ones in question (see here: https://community.onion.io/topic/1036/mini-dock-vs-roiginal-dock/8 for discussion on pin differences)
    2. The original Arduino Dock did not have a GPIO connector - one of its flaws which at least seems to be (partially) addressed with Arduino Dock V2 - but since mine hasn't arrived yet, I can't really investigate yet.

    Hopefully the Omega admins can clarify on the issue with pin 19 - but they have been noticeably very silent recently



  • @Kit-Bishop You're right, that table on that link you posted pins 19 appear identical on both omega and omega2.
    Therefore the discrepancy must be just on the expansion headers that the docks include?

    Hopefully you get yours soon since I'm just hitting roadblock after roadblock. I dont have any breadboards that are the correct size for the omega2 so that end up going nowhere unless I buy and wait for the breadboard dock.

    I did some digging around and when running the command opkg install arduino-dock I picked up the url, http://repo.onion.io/omega2/packages/onion/ on that page are some references to arduino-dock-2.

    So i tried pulling some of those files down and seeing if I saw anything useful, but it's still all pretty new to me so i got no where. Can those pin numbers just be changed to use a different pin on the ArDock2 that isn't a ground pin?

    Also quite a longshot, but I though that maybe there was a chance that the onion peeps may have hidden the ability to just flash the bootloader, so I opkg install arduino-dock-2 and tried the flash bootloader script, and pretty much errorred out saying:

    Can't export GPIO 19, already exported/busy?: Invalid argument

    Anyways, I'm still tinkering away, hoping i don't brick something lol.

    Happy New Years
    🍻



  • Re: Omega 2 and Arduino dock.

    I have exactly the same behavour. Both via wifi using the Arduino IDE or local from the Omega2:

    root@Omega-5923:~# sh /usr/bin/arduino-dock flash /root/blink2.ino.hex
    > Flashing application '/root/blink2.ino.hex' ...
    device         : /dev/i2c-0       (address: 0x29)
    version        : �������� (sig: 0xff 0xff 0xff => unknown)
    flash size     : 0xffff / 65535   (0xff bytes/page)
    eeprom size    : 0xffff / 65535
    writing flash  : [                                                  w�Z] (0)
    failed to write to device
    > Done
    


  • Ok, got it to work !

    cd /root
    opkg remove arduino-dock
    opkg remove arduino-dock-2
    opkg remove avrdude
    wget http://repo.onion.io/omega2/packages/onion/avrdude_6.1-1_mipsel_24kc.ipk
    opkg install avrdude_6.1-1_mipsel_24kc.ipk
    opkg install arduino-dock-2
    

    Then you can use the sh /usr/bin/arduino-dock flash my_file.hex

    Do not use avrdude v6.3-1 as there is a known issue (https://savannah.nongnu.org/bugs/?func=detailitem&item_id=49450)



  • @Andre-Courchesne Awesome!! Thanks for your update!

    edit: sweet, looks like the dock does work out of the box, once I run through your steps to downgrade avrdude things go a bit more smoothly.

    Though flashing the bootloader still fails, but at least I can start flashing other things to it. Thanks again!

     root@Omega-76C7:~# sh /usr/bin/arduino-dock flash bootloader
     > Flashing application 'bootloader' ...
    
     avrdude: AVR device initialized and ready to accept instructions
    
     Reading | ################################################## | 100% 0.01s
    
     avrdude: Device signature = 0x1e950f
     avrdude: erasing chip
     avrdude: reading input file "0x3f"
     avrdude: writing lock (1 bytes):
    
     Writing | ################################################## | 100% 0.00s
    
     avrdude: 1 bytes of lock written
     avrdude: verifying lock memory against 0x3f:
     avrdude: load data lock data from input file 0x3f:
     avrdude: input file 0x3f contains 1 bytes
     avrdude: reading on-chip lock data:
    
     Reading | ################################################## | 100% 0.00s
    
     avrdude: verifying ...
     avrdude: 1 bytes of lock verified
     avrdude: reading input file "0x05"
     avrdude: writing efuse (1 bytes):
    
     Writing | ################################################## | 100% 0.00s
    
     avrdude: 1 bytes of efuse written
     avrdude: verifying efuse memory against 0x05:
     avrdude: load data efuse data from input file 0x05:
     avrdude: input file 0x05 contains 1 bytes
     avrdude: reading on-chip efuse data:
    
     Reading | ################################################## | 100% 0.00s
    
     avrdude: verifying ...
     avrdude: 1 bytes of efuse verified
     avrdude: reading input file "0xDA"
     avrdude: writing hfuse (1 bytes):
     
     Writing | ################################################## | 100% 0.00s
    
     avrdude: 1 bytes of hfuse written
     avrdude: verifying hfuse memory against 0xDA:
     avrdude: load data hfuse data from input file 0xDA:
     avrdude: input file 0xDA contains 1 bytes
     avrdude: reading on-chip hfuse data:
    
     Reading | ################################################## | 100% 0.00s
    
     avrdude: verifying ...
     avrdude: 1 bytes of hfuse verified
     avrdude: reading input file "0xFF"
     avrdude: writing lfuse (1 bytes):
    
     Writing | ################################################## | 100% 0.00s
    
     avrdude: 1 bytes of lfuse written
     avrdude: verifying lfuse memory against 0xFF:
     avrdude: load data lfuse data from input file 0xFF:
     avrdude: input file 0xFF contains 1 bytes
     avrdude: reading on-chip lfuse data:
    
     Reading | ################################################## | 100% 0.00s
    
     avrdude: verifying ...
     avrdude: 1 bytes of lfuse verified
    
     avrdude done.  Thank you.
    
    
     avrdude: AVR device initialized and ready to accept instructions
    
     Reading | ################################################## | 100% 0.00s
    
     avrdude: Device signature = 0x1e950f
     avrdude: NOTE: "flash" memory has been specified, an erase cycle will be performed
         To disable this feature, specify the -D option.
     avrdude: erasing chip
     avrdude: reading input file "bootloader"
     avrdude: error opening bootloader: No such file or directory
     avrdude: input file bootloader auto detected as invalid format
     avrdude: cant open input file bootloader: No such file or directory
     avrdude: read from file 'bootloader' failed
    
     avrdude: safemode: Fuses OK (E:05, H:DA, L:FF)
    
     avrdude done.  Thank you.
    
     > ERROR, flash NOT successful`


  • @Cesar-Vargas Glad it helped.

    One note, do not update opkg, doing so seems to make it loose the repo.onion.io/omega2 repo. I have to confirm but looks like it.

    I'll add this to my review blog of the Omega2: http://net-forces.blogspot.ca/2017/01/omega2-with-arduino-dock2-review.html



  • @Cesar-Vargas Looking at the code of /usr/bin/arduino-dock in the arduino-dock-2 package it looks like the flash bootloader command is not supported. The code actually tried to open a file called bootloader as your hex file to upload.



  • Is there any progress on serial-port-bridge for arduino dock 2 ?
    Edit: found some info in the wiki page https://docs.onion.io/omega2-docs/arduino-dock.html



  • @Andre-Courchesne I kinda wish I'd gotten my later as I have already done the opkg update when I was trying to get things running.

    Maybe I'll need to do a factory reset and start fresh.

    BTW, nice review! I was under the impression I had to flash onion's bootloader in order for it to be seen by the Arduino IDE wirelessly, but it seems like that isn't the case?



  • @Cesar-Vargas I did not have to flash the bootloader in my case.



  • @Kostiantyn-Tarasenko

    It's probably possible to do it using socat. Probably something simitar to this: http://www.acmesystems.it/socat

    I have done this in the past on other system, I'll try to think on trying it out.



  • @Andre-Courchesne it's even more simple, I used pyserial and this tutorial to start up http://playground.arduino.cc/interfacing/python
    Port is /dev/ttyS1 for me



  • Even better, Blynk server runs smooth on Omega2 with socat - blynk widgets on the phone could access adruino pins.



  • Hi all,

    There will be an official guide for using the Arduino Dock 2 coming soon.

    For now, flashing the Arduino Dock 2 can done simply by installing the arduino-dock-2 package on the Omega2:

    opkg update
    opkg install arduino-dock-2

    Now you can flash the ATmega on the Arduino Dock 2 with the Omega and Arduino IDE similar to an UNO (You DON'T need to flash any bootloader or include any Onion library):

    1. Have the Omega2 plugged into the Dock
    2. Install the Arduino IDE: https://www.arduino.cc/en/main/software
    3. On the Arduino IDE: set Tools > Boards: Arduino/Genuino Uno
      Tools > Port: "Omega-XXXX at 192.168.3.1 (Arduino/Genuino Uno)"
    4. Upload your program

    If you don't see your Omega2 on the port try:

    1. Restarting the avahi-daemon on your Omega2

      /etc/init.d/avahi-daemon restart

    2. Restart the Arduino IDE

    • You can use communicate between the Omega2 and ATmega through UART1 /dev/ttyS1
      The Omega2 can be used as the Serial Monitor by:
      cat < /dev/ttyS1


Looks like your connection to Community was lost, please wait while we try to reconnect.