Arduino &c for dinosaurs

Advert

Arduino &c for dinosaurs

Home Forums Electronics in the Workshop Arduino &c for dinosaurs

Viewing 25 posts - 1 through 25 (of 31 total)
  • Author
    Posts
  • #31893
    Robin Graham
    Participant
      @robingraham42208
      Advert
      #309680
      Robin Graham
      Participant
        @robingraham42208

        I've been wondering about these things for some time, and think I should take the plunge. But where to start?

        I've been reading on t'internet, including the first 5 pages of the topic here, started early 2016, but I get defeated by the jargon. What is a 'shield' – looks like what I'd call an interface board. What is a scheme or sketch or whatever – from what I've seen they look like C++ functions. How does all this hang together? Does one write a C/C++ function calling Arduino library functions? Where is main()? My mental model of how these things work is – well, foggy.

        I'd be happy if someone could recommend a book which explains the basics in language which a dinosaur like me, brought up on 8086 machine code/assembler and low level C programming could understand. Or maybe I should just buy a 'starter kit' and figure it out from there? But if so which of the many offerings?

        Bewildered, Rob.

        #309689
        Colin Whittaker
        Participant
          @colinwhittaker20544

          Rob,

          With your machine code grounding you should find it all pretty straightforward. As for the kit, is this too expensive, https://store.arduino.cc/usa/arduino-starter-kit?

          Cheers, Colin

          #309696
          I.M. OUTAHERE
          Participant
            @i-m-outahere

            Try Paul Mcworter on youtube or his website toptechboy.com

            The only bad thing with that tutorial he made is he had an allergy so you have to put up with him coughing which can be a little irritating but if you can put up with it the tutorial series is well worth watching .

            I would also check out the arduino website as it has loads of useful info as well.

            Ian.

            #309702
            Brian Oldford
            Participant
              @brianoldford70365
              Posted by XD 351 on 01/08/2017 05:51:56:

              Try Paul Mcworter on youtube or his website toptechboy.com

              The only bad thing with that tutorial he made is he had an allergy so you have to put up with him coughing which can be a little irritating but if you can put up with it the tutorial series is well worth watching .

              I would also check out the arduino website as it has loads of useful info as well.

              Ian.

              +1 Definitely worth a read.

              #309703
              Journeyman
              Participant
                @journeyman

                I bought a starter kit from Amazon to get into using the Arduino. I did a quick ***Review Here*** some useful bits and pieces and the manual is just about OK. As you say a "Shield" is a plug in interface board and the "Sketch" is just a program in a cut down version of C++

                John

                #309705
                Waldorf
                Participant
                  @waldorf

                  Hi Rob

                  As Ian has suggested, Paul McWorter is to be recommended. He's a professional teacher & trainer which makes all the difference. I can also highly recommend Peter Dalmaris over at udemy.com:

                  https://www.udemy.com/arduino-sbs/

                  For a (very) few £/€/$ you get 23 hours of video instruction, handouts, and support. I think it offers amazing value for money.

                  Starter kits are convenient, but not always good value.If you're comfortable with a soldering iron and veroboard you don't have to spend very much at all.

                  #309707
                  John Haine
                  Participant
                    @johnhaine32865

                    I've just gone the starter kit route with a Uno. Building my own shield on strip board (beware the pin spacing issue if you try this!). Started writing sketches based on the examples, having done quite a lot of programming over the years (I wouldn't call it software in my case) I'm finding it fairly straightforward.

                    #309723
                    Roger Woollett
                    Participant
                      @rogerwoollett53105

                      I think I can shed some light on the programming aspect. The Arduino IDE tries to make programming easier for beginners but can be confusing if you have some experience.

                      The language used is often said to be C but is in fact C++ . A sketch is essentially a source code file. When you compile the IDE generates a header file so you do not have to provide prototypes for functions. There is a main function but it is in the library – it just calls setup and then loop repeatedly.

                      Let me know if I can help with other confusions.

                      #309730
                      Rick Kirkland 1
                      Participant
                        @rickkirkland1

                        Dear bewildered Rob, , don’t feel bad about not having a grasp of this. Quite simply, I don’t even understand what your original post is saying or asking. Seriously. No joke. I’m clueless. I know what most of the words mean,but in this context I’m blind. However, if this is connected with CNC then I’m hoping to learn and widen my knowledge. Presently to me CNC is as alien as a mobile phone would be to a medieval wheelwright. Onward and upward.

                        Edited By Rick Kirkland 1 on 01/08/2017 11:07:53

                        #309732
                        Gordon W
                        Participant
                          @gordonw

                          Go for it -buy the thing and a book or two, not much money and you will learn something. My problem is I have to learn a complete new language, words don't mean what I think they mean. But you will get past this eventually. I bought one and when the winter comes hope to make progress.

                          #309733
                          duncan webster 1
                          Participant
                            @duncanwebster1

                            I bought a book called '30 Arduino projects for the Evil Genius'. I find it very much easier working from a book than continually switching screens. If you're in the North West you can borrow it, it would hardly be worth postage both ways to send it. Once you are familiar with Arduino language, you can delve deeper and do things like writing to ports, which is much more powerful, you can do in one line of code what would take many. The beauty is that once you've got a basic understanding, and starting from a knowledge of C it won't take long, everything you need to know is on the interweb, with downloadable code for many things.

                            You don't have a main(), it does setup() first, then does loop() endlessly. Bit odd at first, I have actually had sketches which did it all in setup()

                            #309769
                            Andy Carruthers
                            Participant
                              @andycarruthers33275

                              I too am about to dive into Arduino and have a few books on the subject, I have a locksmith project which needs 3D printing, stepper motors and Arduino and just this week have started an introduction to AutoCAD course

                              A couple of additional resources I found useful

                              Humble Book Bundles – I bought several e-books for a pittance on various Arduino / 3D printing projects

                              MakerFaire Newcastle – Two days of hacking, making and inspiration, next event is April 2018 and I shall spend both days immersed

                              Dive in, life is too short not to

                              #309781
                              Neil Wyatt
                              Moderator
                                @neilwyatt

                                Hello Robin, this looks agood resource, especially for someone who already has some programming skills:

                                http://www.element14.com/community/community/arduino/arduino-tutorials/blog/2014/06/09/fast-track-to-arduino-programming

                                Might even follow it myself…

                                (I imagine main() exists at level above the sketch, along with various #include and #define statements etc. to suit the arduino you are using)

                                Neil

                                Edited By Neil Wyatt on 01/08/2017 15:35:15

                                #309798
                                SillyOldDuffer
                                Moderator
                                  @sillyoldduffer

                                  Posted by Neil Wyatt on 01/08/2017 15:32:29:

                                  I imagine main() exists at level above the sketch, along with various #include and #define statements etc. to suit the arduino you are using

                                  Neil

                                  Edited By Neil Wyatt on 01/08/2017 15:35:15

                                  Correct. The code is in main.cpp . The exciting part looks like this:

                                  main.jpg

                                  It can be seen that main.cpp does some private setting up, calls setup() once, and then calls loop() forever, checking the serial interface each time round. As expected on a microcontroller, main() never returns. The built-in main() just makes life a bit simpler for Arduino programmers by hiding a few details.

                                  It's possible to substitute your own main() if there's a need. But that's advanced stuff, making it likely that you are providing your own hardware as well. In that case, something like avrdude would be more suitable for development than the Arduino tool-set.

                                  #309801
                                  Neil Wyatt
                                  Moderator
                                    @neilwyatt

                                    Posted by SillyOldDuffer on 01/08/2017 17:13:55:

                                    In that case, something like avrdude would be more suitable for development than the Arduino tool-set.

                                    Atmel Studio 6 is an excellent IDE, if you have the time to learn it! Supports for GNUCC and assembler built in and provides for various other languages.

                                    Neil

                                    #309878
                                    Robin Graham
                                    Participant
                                      @robingraham42208

                                      Thanks for the helpful and encouraging replies. I now have a clearer mental picture of how it all works. My trouble is that my mental model of how computers work as controllers is founded in my 1970'/80s experiences as a PhD student – part of my project involved bringing spectrometers under computer control, the computer being a PET with two IEEE-488 ports – which was pretty swish at the time. Programmed in BASIC as I recall. Eventually it was replaced by an IBM PC, hence the 8086 experience.

                                      As computing has evolved, layers upon layers of abstraction have covered up what's 'actually' going on. That makes it easier for some folk, but harder for a dinosaur like me.

                                      Thanks again for replies, &pointers to further info which I shall follow up, and digest *contents.

                                      Rob

                                      Edited By Robin Graham on 01/08/2017 23:27:14

                                      #309999
                                      Thomas Staubo
                                      Participant
                                        @thomasstaubo12021

                                        The programming is the hard part for me. You can say it's greek to me.

                                        Electronics I can manage far better. I searched for "Arduino GUI" to see if there's an easier way. And there seems to be several GUI based programs, but I don't know if it's something for serious use, or if it's just for kids use.

                                        Anybody tried something like that??

                                        #310010
                                        Neil Wyatt
                                        Moderator
                                          @neilwyatt
                                          Posted by Robin Graham on 01/08/2017 23:17:20:

                                          As computing has evolved, layers upon layers of abstraction have covered up what's 'actually' going on. That makes it easier for some folk, but harder for a dinosaur like me.

                                          In that case, you might enjoy programming arduinos (well the AVR chips on them) in AVR assembler. No nasty abstractions to spoil the experience and hugely powerful chips!

                                          Neil

                                          #310096
                                          Waldorf
                                          Participant
                                            @waldorf
                                            Posted by Thomas Staubo on 02/08/2017 15:44:57:

                                            The programming is the hard part for me. You can say it's greek to me.

                                            Electronics I can manage far better. I searched for "Arduino GUI" to see if there's an easier way. And there seems to be several GUI based programs, but I don't know if it's something for serious use, or if it's just for kids use.

                                            Anybody tried something like that??

                                            I've had limited success with Ardublock in a training environment. Are you familiar with ladder logic and PLC programming? If so, Soapbox SNAP might be more suitable for your needs.

                                            **LINK**

                                            **LINK**

                                            **LINK**

                                            **LINK**

                                            #310106
                                            James Alford
                                            Participant
                                              @jamesalford67616

                                              I was given an Uno for Christmas and took some while to get any idea what to do: I have previously programmed in Visual Basics and VBA,but not for a long time. I found the reference section on the Arduino website **LINK** and the forum on the same site to be really helpful.

                                              I finally managed to progamme a clock to operate on the seconds, minutes, hours, strike the quarters and hours and turn the chimes on and off at night. All it needs now is the mechanics of the clock to display the time on a dial……….

                                              Regards,

                                              James.

                                              #310133
                                              Mike Poole
                                              Participant
                                                @mikepoole82104

                                                It might make an interesting project to decode the atomic clock slow code time signal, it will require the construction of a receiver but then you will have a BCD code to decode store and display. I decoded this in a PLC many years ago when accurate time for PLCs was hard to get, there is even the opportunity to implement a parity check.

                                                Mike

                                                #310146
                                                I.M. OUTAHERE
                                                Participant
                                                  @i-m-outahere

                                                  I just want to add something for anyone who comes along looking for arduino info , one of the books that i used is arduino workshop – a good starting point but not sure if available in all countries .

                                                  One of the best things about arduino is if you have a pc , an internet connection and a few dollars you are in business !

                                                  One of the things Paul Mcworter keeps harping on about is keeping your sketch neat and tidy , if you look around on youtube or the internet you will find many sketches are difficult to read many don't work or won't compile and if your lucky the IDE will tell you whats wrong .

                                                  Ian.

                                                  #310148
                                                  Andy Holdaway
                                                  Participant
                                                    @andyholdaway

                                                    +1 for XD 351

                                                    I started with Arduino a few years ago, and used the example sketches bundled with the IDE to get an initial understanding of what's going on. Start with 'Blink', you can't go wrong.

                                                    I would also add that neat code is far easier to debug and understand – break operations down into blocks so that it's not a continuous stream of lines, and comment every line to start with. It's surprising how you know what you meant when you wrote it, but it can be a complete mystery when you go back to it days later!

                                                    Andy

                                                    #310153
                                                    Brian Oldford
                                                    Participant
                                                      @brianoldford70365

                                                      I'm also a relative newcomer to Arduino along with its C/C++. As someone who has only played with BASIC at very much a novice level I can understand the difficulty some people may find.

                                                      Before even attempting to write code I think the real solution is to draw up a robust flow chart of what you are trying to achieve. This way you are likely to cover all eventualities and thus lead towards robust code.

                                                    Viewing 25 posts - 1 through 25 (of 31 total)
                                                    • Please log in to reply to this topic. Registering is free and easy using the links on the menu at the top of this page.

                                                    Advert

                                                    Latest Replies

                                                    Viewing 25 topics - 1 through 25 (of 25 total)
                                                    Viewing 25 topics - 1 through 25 (of 25 total)

                                                    View full reply list.

                                                    Advert

                                                    Newsletter Sign-up