1 2 Previous Next 20 Replies Latest reply on Jul 25, 2015 12:22 PM by iceowl

    breakout board pin assignments?

    onehorse

      I got the Arduino IDE to work and got the blink program to compile. I realized that I don't know how to make pin assignments in the sketch. For example, if I specify pin 13 as an LED as in the default blink example, is this GPIO13,  AKA JP18 Pin1? don't seems to get 1V8 out of this pin when I run the  blink sketch. What if I want to output a signal on GP84? How would I do this in the sketch using the breakout board?

        • 1. Re: breakout board pin assignments?
          intel_dan

          Am I correct that you are trying to write/run and Arduino sketch on the mini-breakout board?

           

          My guess is that that is not currently supported (I did a little digging in the code included with the arduino ide and could not find anything hinting at 'raw' gpio support). It would be nice if they added a new target board of 'EdisonMiniBreakout' or similar that supports GPIO/PWM/I2C/SPI using just the 'raw' module.

          • 2. Re: breakout board pin assignments?
            onehorse

            intel_dan wrote:

             

            Am I correct that you are trying to write/run and Arduino sketch on the mini-breakout board?

             

            My guess is that that is not currently supported (I did a little digging in the code included with the arduino ide and could not find anything hinting at 'raw' gpio support). It would be nice if they added a new target board of 'EdisonMiniBreakout' or similar that supports GPIO/PWM/I2C/SPI using just the 'raw' module.

            Yes, I want to write/run and Arduino sketch on the mini-breakout board. And on breakout boards I am designing.

             

            Nice yes. But how are we supposed to use the Edison module with our own breakout boards then? I was planning on using the Arduino IDE to compile programs to send PWM signals to FETs, receive data from sensors, light LEDs, receive and send Serial and USB output. If I can't define/set pins for control of these functions how can anyone use the Edison module for anything but playing on the Arduino breakout board?

            • 3. Re: breakout board pin assignments?
              faceplant

              I haven't used it on the Edison yet, but I assume you should be able to use the /sys interface to GPIO, SPI, etc.  And, of course, serial will be through /dev/tty?.  USB will depend on the device that you're connecting to.  I assume the Arduino interface is just a layer over /sys, etc.

               

              This is a Linux computer, and the "normal" way of interfacing devices to Linux is through device drivers, although you can do simple things like toggle GPIOs, etc through /sys.

              • 4. Re: breakout board pin assignments?
                MPayne

                Yes - Arduino uses sys interfaces anyway.  When using the breakout board, use these interfaces directly (no Arduino code needed, because you don't have to control Arduino specific IC's anymore).

                • 5. Re: breakout board pin assignments?
                  faceplant

                  I'm not sure I understand the motivation for supporting Arduino type sketches anyway.  Why have a powerful Linux-based device if you're going to program it like you would an 8 bit micro-controller.  I would think that 99% of the users developing for this would be just fine sshing in and developing just like you would on any other Linux system.  Having a standard library that could be used in any IDE would be more useful IMO.  I suspect you could even run Eclipse directly on the Edison.  Porting the Python library used on the RasPi and BBB would also be useful, and is very easy to use.

                  • 6. Re: breakout board pin assignments?
                    MPayne

                    Arduino is the bridge to get users past Arduino and into true embedded Linux programming.  If I remember right, we pulled it in later - it wasn't originally planned to be supported.

                     

                    In other words, I think it's good that you feel this way.  You've hit it on the head.

                    • 7. Re: breakout board pin assignments?
                      onehorse


                      It is true that for experienced computer programmers, using Linux to run the Edison will be fine. On the other hand, there are hundreds if not thousands of people who have built up a collection of useful Arduino (and Teensyduino) sketches for various projects that would like to easily port them to the Edison platform without having to learn Python or Linux. I'm one of them. So instead of being able to start with the blink sketch and easily add complexity, I would have to learn these new (for me) tools...or go back to using the 32-bit Teensy 3.1 Cortex M4 96 MHz ARM microcontroller that costs $17 and can be programmed through the USB with the Arduino IDE.

                      • 8. Re: breakout board pin assignments?
                        onehorse

                        Is there an example available in Linux for using /sys to toggle GPIO pins or do anything else that I can copy/learn from?

                        • 9. Re: breakout board pin assignments?
                          faceplant

                          What do you expect to do with the Edison using the Arduino IDE that you couldn't do on the Teensy?

                           

                          You can find a pretty good intro to user-mode GPIO on Linux here: Access GPIO from Linux user space | FalsinSoft

                          • 10. Re: breakout board pin assignments?
                            onehorse

                            Well, the Edison has built in wifi and bluetooth, peripherals I would have to add (and I am) to any Teensy project. It is also 5 times faster and has dual cores, so it can handle real time operating systems better than the Teensy although I don't currently use this. But you're right, for many things the Teensy 3.1 is just as capable.

                             

                            The Edison is new! And who knows what differences might turn out to be the most useful now. Some drawbacks of the Edison platform include: 0) it is expensive, 1) the hard-to-solder Hirose connector, 2) the 1V8 limit of GPIO which requires valuable real estate to be taken up for logic level converters, 3) it is difficult to program without a large or complex adapter board, 4) it gets real hot real fast, which means its an energy hog. The latter is not a good feature for portable/wearable applications. Still, I am willing to put in some effort to make the Edison useful to me (and maybe others), and maybe some of these apparent limitations will diminish in importance with use. I am only asking for a little help to get me going. Programming with the Arduino IDE would have been a significant boost up the learning-to-use-the-Edison curve. Oh well...

                             

                            Thanks for the link; I'll use it to start my Linux education!

                            • 11. Re: breakout board pin assignments?
                              MPayne

                              You can still use Arduino to prototype your project.  I only recommend learning Linux level programming with the breakout because not everything is exposed to the Arduino layer yet - you'll get more functionality that way.  The trade isn't free - there is a bit of a learning curve.  It's essentially just a deeper understanding of what Arduino actually is - an easier programming interface layer for the bare metal OS/FW.

                              • 12. Re: breakout board pin assignments?
                                faceplant

                                If Intel really wanted to make this device unique and easy to program, they should add a web-based development environment similar to mbed.  The user would simply bring up the board, configure it for their network, bring up a web page on the board and start coding.  The backend could be written in e.g. node.js with extensions to access the hardware, and the user could interact with the hardware via an in-built web server.

                                • 13. Re: breakout board pin assignments?
                                  onehorse

                                  I agree. I will use the Arduino breakout board to explore the Edison for now. I have others on my team who are Linux programmers so they will be able to help me make the transition to programming the Edison for custom prototype platforms.

                                   

                                  It might be too small a market (but then why all the work to cater to the Arduino user in the first place, one might ask?), but if one of Intel's goals is to help Arduino users transition to true embedded Linux programming, having a detailed tutorial about how to write one's first truly embedded Linux program for the Edison might be useful!

                                  • 14. Re: breakout board pin assignments?
                                    onehorse

                                    Also agree faceplant.

                                     

                                    I have used mbed's compiler and after some few days of hair pulling I got my Arduino sketches to run on ST's Nucleo board. So this mode of programming could work well. I will just note that I have not got everything on mbed to work as it "should" or does on an Arduino microprocessor and the help I have received from the mbed community leaves something to be desired.

                                    1 2 Previous Next