Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > sci.electronics.design > #545211 > unrolled thread

Arduino code sources?

Started byTerry Pinnell <me@somewhere.invalid>
First post2019-05-31 11:48 +0100
Last post2019-06-02 23:40 -0400
Articles 20 on this page of 116 — 24 participants

Back to article view | Back to sci.electronics.design


Contents

  Arduino code sources? Terry Pinnell <me@somewhere.invalid> - 2019-05-31 11:48 +0100
    Re: Arduino code sources? Cursitor Doom <curd@notformail.com> - 2019-05-31 11:40 +0000
      Re: Arduino code sources? Lasse Langwadt Christensen <langwadt@fonz.dk> - 2019-05-31 05:32 -0700
        Re: Arduino code sources? Winfield Hill <hill@rowland.harvard.edu> - 2019-05-31 06:54 -0700
          Re: Arduino code sources? bitrex <user@example.net> - 2019-05-31 10:46 -0400
            Re: Arduino code sources? bitrex <user@example.net> - 2019-05-31 10:47 -0400
          Re: Arduino code sources? Lasse Langwadt Christensen <langwadt@fonz.dk> - 2019-05-31 07:49 -0700
      Re: Arduino code sources? Peter Percival <peterxpercival@hotmail.com> - 2019-06-12 13:41 +0100
        Re: Arduino code sources? Phil Hobbs <pcdhSpamMeSenseless@electrooptical.net> - 2019-06-12 21:48 -0400
          Re: Arduino code sources? Peter Percival <peterxpercival@hotmail.com> - 2019-06-13 17:46 +0100
    Re: Arduino code sources? George Herold <gherold@teachspin.com> - 2019-05-31 07:45 -0700
    Re: Arduino code sources? bitrex <user@example.net> - 2019-05-31 11:37 -0400
      Re: Arduino code sources? bitrex <user@example.net> - 2019-05-31 11:39 -0400
        Re: Arduino code sources? Terry Pinnell <me@somewhere.invalid> - 2019-05-31 18:13 +0100
    Re: Arduino code sources? Ralph Mowery <rmowery28146@earthlink.net> - 2019-05-31 15:07 -0400
    Re: Arduino code sources? "John Miles, KE5FX" <jmiles@gmail.com> - 2019-05-31 17:02 -0700
      Re: Arduino code sources? Jan Panteltje <pNaOnStPeAlMtje@yahoo.com> - 2019-06-01 04:57 +0000
        Re: Arduino code sources? bitrex <user@example.net> - 2019-06-01 01:11 -0400
          Re: Arduino code sources? Jan Panteltje <pNaOnStPeAlMtje@yahoo.com> - 2019-06-01 05:56 +0000
        Re: Arduino code sources? "John Miles, KE5FX" <jmiles@gmail.com> - 2019-05-31 23:34 -0700
          Re: Arduino code sources? Jan Panteltje <pNaOnStPeAlMtje@yahoo.com> - 2019-06-01 07:34 +0000
          Re: Arduino code sources? Phil Hobbs <pcdhSpamMeSenseless@electrooptical.net> - 2019-06-01 06:39 -0400
        Re: Arduino code sources? Tom Gardner <spamjunk@blueyonder.co.uk> - 2019-06-01 07:50 +0100
          Re: Arduino code sources? Jan Panteltje <pNaOnStPeAlMtje@yahoo.com> - 2019-06-01 07:17 +0000
          Re: Arduino code sources? Phil Hobbs <pcdhSpamMeSenseless@electrooptical.net> - 2019-06-01 06:45 -0400
            Re: Arduino code sources? DecadentLinuxUserNumeroUno@decadence.org - 2019-06-01 11:13 +0000
          Re: Arduino code sources? Clifford Heath <no.spam@please.net> - 2019-06-01 21:06 +1000
            Re: Arduino code sources? Tom Gardner <spamjunk@blueyonder.co.uk> - 2019-06-01 12:33 +0100
              Re: Arduino code sources? DecadentLinuxUserNumeroUno@decadence.org - 2019-06-01 12:03 +0000
                Re: Arduino code sources? Lasse Langwadt Christensen <langwadt@fonz.dk> - 2019-06-01 05:15 -0700
                  Re: Arduino code sources? DecadentLinuxUserNumeroUno@decadence.org - 2019-06-02 01:48 +0000
              Re: Arduino code sources? Phil Hobbs <pcdhSpamMeSenseless@electrooptical.net> - 2019-06-01 11:26 -0400
                Re: Arduino code sources? Tom Gardner <spamjunk@blueyonder.co.uk> - 2019-06-01 19:03 +0100
                  Re: Arduino code sources? Phil Hobbs <pcdhSpamMeSenseless@electrooptical.net> - 2019-06-01 19:56 -0400
                    Re: Arduino code sources? Tom Gardner <spamjunk@blueyonder.co.uk> - 2019-06-02 01:13 +0100
                      Re: Arduino code sources? bitrex <user@example.net> - 2019-06-02 20:09 -0400
                        Re: Arduino code sources? bitrex <user@example.net> - 2019-06-02 20:16 -0400
                        Re: Arduino code sources? Clifford Heath <no.spam@please.net> - 2019-06-03 11:10 +1000
                          Re: Arduino code sources? bitrex <user@example.net> - 2019-06-02 22:26 -0400
                            Re: Arduino code sources? Clifford Heath <no.spam@please.net> - 2019-06-03 12:37 +1000
                              Re: Arduino code sources? bitrex <user@example.net> - 2019-06-02 23:14 -0400
                                Re: Arduino code sources? Clifford Heath <no.spam@please.net> - 2019-06-03 14:30 +1000
                                  Re: Arduino code sources? Tom Gardner <spamjunk@blueyonder.co.uk> - 2019-06-03 08:46 +0100
                                    Re: Arduino code sources? DecadentLinuxUserNumeroUno@decadence.org - 2019-06-03 11:58 +0000
                Re: Arduino code sources? bitrex <user@example.net> - 2019-06-01 17:18 -0400
                  Re: Arduino code sources? bitrex <user@example.net> - 2019-06-01 17:24 -0400
                    Re: Arduino code sources? Phil Hobbs <pcdhSpamMeSenseless@electrooptical.net> - 2019-06-01 20:08 -0400
                      Re: Arduino code sources? Lasse Langwadt Christensen <langwadt@fonz.dk> - 2019-06-01 17:14 -0700
                      Re: Arduino code sources? bitrex <user@example.net> - 2019-06-01 20:26 -0400
            Re: Arduino code sources? "Rodney Pont" <mlist4@infohit.me.uk> - 2019-06-01 15:19 +0100
              Re: Arduino code sources? Clifford Heath <no.spam@please.net> - 2019-06-02 17:42 +1000
                Re: Arduino code sources? "John Miles, KE5FX" <jmiles@gmail.com> - 2019-06-02 01:53 -0700
                  Re: Arduino code sources? Clifford Heath <no.spam@please.net> - 2019-06-02 22:46 +1000
            Re: Arduino code sources? Dennis <dennis@none.none> - 2019-06-01 09:43 -0500
              Re: Arduino code sources? Phil Hobbs <pcdhSpamMeSenseless@electrooptical.net> - 2019-06-01 11:30 -0400
                Re: Arduino code sources? bitrex <user@example.net> - 2019-06-03 00:00 -0400
                  Re: Arduino code sources? Jan Panteltje <pNaOnStPeAlMtje@yahoo.com> - 2019-06-03 05:52 +0000
                    Re: Arduino code sources? bitrex <user@example.net> - 2019-06-03 11:33 -0400
                      Re: Arduino code sources? bitrex <user@example.net> - 2019-06-03 11:41 -0400
                        Re: Arduino code sources? pcdhobbs@gmail.com - 2019-06-03 16:29 -0700
                          Re: Arduino code sources? bitrex <user@example.net> - 2019-06-04 02:14 -0400
                          Re: Arduino code sources? bitrex <user@example.net> - 2019-06-04 02:27 -0400
                  Re: Arduino code sources? Tom Gardner <spamjunk@blueyonder.co.uk> - 2019-06-03 08:50 +0100
                  Re: Arduino code sources? krw@notreal.com - 2019-06-03 19:12 -0400
                Spot the app note error   was    Arduino code sources? Don Kuenz, KB7RPU <g@crcomp.net> - 2019-06-04 16:03 +0000
                  Re: Spot the app note error was Arduino code sources? Phil Hobbs <pcdhSpamMeSenseless@electrooptical.net> - 2019-06-04 13:17 -0400
                    Re: Spot the app note error Don Kuenz <g@crcomp.net> - 2019-06-04 21:47 +0000
                    Re: Spot the app note error was Arduino code sources? Don Kuenz <g@crcomp.net> - 2019-06-08 18:34 +0000
                  Re: Spot the app note error was Arduino code sources? bitrex <user@example.net> - 2019-06-04 15:30 -0400
                    Re: Spot the app note error Don Kuenz, KB7RPU <g@crcomp.net> - 2019-06-04 21:48 +0000
                      Re: Spot the app note error Winfield Hill <winfieldhill@yahoo.com> - 2019-06-04 15:51 -0700
                        Re: Spot the app note error Don Kuenz, KB7RPU <g@crcomp.net> - 2019-06-04 23:28 +0000
                        Re: Spot the app note error Don Kuenz, KB7RPU <g@crcomp.net> - 2019-06-04 23:40 +0000
                          Re: Spot the app note error Winfield Hill <winfieldhill@yahoo.com> - 2019-06-04 17:21 -0700
                            Re: Spot the app note error Don Kuenz, KB7RPU <g@crcomp.net> - 2019-06-05 01:13 +0000
                              Re: Spot the app note error bitrex <user@example.net> - 2019-06-04 23:02 -0400
                                Re: Spot the app note error bitrex <user@example.net> - 2019-06-04 23:05 -0400
                                  Re: Spot the app note error Winfield Hill <winfieldhill@yahoo.com> - 2019-06-05 01:08 -0700
                                    Re: Spot the app note error bitrex <user@example.net> - 2019-06-06 00:22 -0400
                                      Re: Spot the app note error bitrex <user@example.net> - 2019-06-06 00:27 -0400
                            Re: Spot the app note error Phil Hobbs <pcdhSpamMeSenseless@electrooptical.net> - 2019-06-05 22:48 -0400
                              Re: Spot the app note error Winfield Hill <winfieldhill@yahoo.com> - 2019-06-07 13:35 -0700
                                Re: Spot the app note error Phil Hobbs <pcdhSpamMeSenseless@electrooptical.net> - 2019-06-07 20:44 -0400
        Re: Arduino code sources? Cursitor Doom <curd@notformail.com> - 2019-06-01 09:57 +0000
      Re: Arduino code sources? Cursitor Doom <curd@notformail.com> - 2019-06-01 10:06 +0000
        Re: Arduino code sources? "John Miles, KE5FX" <jmiles@gmail.com> - 2019-06-01 15:06 -0700
          Re: Arduino code sources? Jan Panteltje <pNaOnStPeAlMtje@yahoo.com> - 2019-06-02 03:26 +0000
          Re: Arduino code sources? Clifford Heath <no.spam@please.net> - 2019-06-02 17:55 +1000
            Re: Arduino code sources? Jan Panteltje <pNaOnStPeAlMtje@yahoo.com> - 2019-06-02 09:39 +0000
              Re: Arduino code sources? DecadentLinuxUserNumeroUno@decadence.org - 2019-06-02 11:02 +0000
              Re: Arduino code sources? Cursitor Doom <curd@notformail.com> - 2019-06-02 11:43 +0000
              Re: Arduino code sources? Clifford Heath <no.spam@please.net> - 2019-06-02 22:57 +1000
                Re: Arduino code sources? Jan Panteltje <pNaOnStPeAlMtje@yahoo.com> - 2019-06-02 15:05 +0000
                  Re: Arduino code sources? Cursitor Doom <curd@notformail.com> - 2019-06-02 17:00 +0000
                  Re: Arduino code sources? Clifford Heath <no.spam@please.net> - 2019-06-03 10:07 +1000
                    Re: Arduino code sources? Jasen Betts <jasen@xnet.co.nz> - 2019-06-03 00:55 +0000
                    Re: Arduino code sources? Jan Panteltje <pNaOnStPeAlMtje@yahoo.com> - 2019-06-03 05:22 +0000
                  Re: Arduino code sources? Clifford Heath <no.spam@please.net> - 2019-06-03 11:00 +1000
                    Re: Arduino code sources? Jan Panteltje <pNaOnStPeAlMtje@yahoo.com> - 2019-06-03 05:21 +0000
                      Re: Arduino code sources? Clifford Heath <no.spam@please.net> - 2019-06-03 17:15 +1000
                Re: Arduino code sources? Cursitor Doom <curd@notformail.com> - 2019-06-02 15:23 +0000
    Re: Arduino code sources? Rheilly Phoull <rheilly@bigslong.com> - 2019-06-01 08:13 +0800
    Re: Arduino code sources? sdy <sdeyoreo@hotmail.com> - 2019-05-31 18:38 -0700
    Re: Arduino code sources? Terry Pinnell <me@somewhere.invalid> - 2019-06-01 11:45 +0100
      Re: Arduino code sources? Tom Gardner <spamjunk@blueyonder.co.uk> - 2019-06-01 12:36 +0100
        Re: Arduino code sources? Terry Pinnell <me@somewhere.invalid> - 2019-06-01 16:04 +0100
      Re: Arduino code sources? Lasse Langwadt Christensen <langwadt@fonz.dk> - 2019-06-01 04:38 -0700
        Re: Arduino code sources? Phil Hobbs <pcdhSpamMeSenseless@electrooptical.net> - 2019-06-01 11:32 -0400
          Re: Arduino code sources? Tom Gardner <spamjunk@blueyonder.co.uk> - 2019-06-01 19:05 +0100
          Re: Arduino code sources? bitrex <user@example.net> - 2019-06-02 23:52 -0400
            Re: Arduino code sources? Tom Gardner <spamjunk@blueyonder.co.uk> - 2019-06-03 08:53 +0100
      Re: Arduino code sources? Ralph Mowery <rmowery28146@earthlink.net> - 2019-06-01 11:26 -0400
    Re: Arduino code sources? "Rodney Pont" <mlist4@infohit.me.uk> - 2019-06-01 15:11 +0100
      Re: Arduino code sources? Terry Pinnell <me@somewhere.invalid> - 2019-06-01 16:20 +0100
    Re: Arduino code sources? bitrex <user@example.net> - 2019-06-02 23:08 -0400
      Re: Arduino code sources? bitrex <user@example.net> - 2019-06-02 23:40 -0400

Page 1 of 6  [1] 2 3 4 5 6  Next page →


#545211 — Arduino code sources?

FromTerry Pinnell <me@somewhere.invalid>
Date2019-05-31 11:48 +0100
SubjectArduino code sources?
Message-ID<pg02fept12fd4h872f8jq590libopp4201@4ax.com>
I bought my first Arduino UNO R3 kit two weeks ago (the Elegoo Super Starter kit)
and am stepping through its tutorials. In parallel I'm trying to learn the basics of
its C++ based programming language, but that's proving a struggle. I'm impatient to
use Arduino on my own projects so I will take a 'copy/paste/edit' approach. It then
becomes a matter of finding sketches that cover a particular subject and then
tailoring.

I'd therefore appreciate recommendations on Arduino sketch sources that others have
found useful please. 

Terry, East Grinstead, UK

[toc] | [next] | [standalone]


#545214

FromCursitor Doom <curd@notformail.com>
Date2019-05-31 11:40 +0000
Message-ID<qcr3ru$c53$1@dont-email.me>
In reply to#545211
On Fri, 31 May 2019 11:48:07 +0100, Terry Pinnell wrote:

> I bought my first Arduino UNO R3 kit two weeks ago (the Elegoo Super
> Starter kit) and am stepping through its tutorials. In parallel I'm
> trying to learn the basics of its C++ based programming language, but
> that's proving a struggle.

I wouldn't even bother with C++ in this instance. Get yourself a copy of 
Kernighan & Ritchie's the C Programming Language - the best book ever 
written on C.



-- 
This message may be freely reproduced without limit or charge only via 
the Usenet protocol. Reproduction in whole or part through other 
protocols, whether for profit or not, is conditional upon a charge of 
GBP10.00 per reproduction. Publication in this manner via non-Usenet 
protocols constitutes acceptance of this condition.

[toc] | [prev] | [next] | [standalone]


#545215

FromLasse Langwadt Christensen <langwadt@fonz.dk>
Date2019-05-31 05:32 -0700
Message-ID<756d429c-1af4-40e8-9753-c57959c9f260@googlegroups.com>
In reply to#545214
fredag den 31. maj 2019 kl. 13.40.52 UTC+2 skrev Cursitor Doom:
> On Fri, 31 May 2019 11:48:07 +0100, Terry Pinnell wrote:
> 
> > I bought my first Arduino UNO R3 kit two weeks ago (the Elegoo Super
> > Starter kit) and am stepping through its tutorials. In parallel I'm
> > trying to learn the basics of its C++ based programming language, but
> > that's proving a struggle.
> 
> I wouldn't even bother with C++ in this instance. Get yourself a copy of 
> Kernighan & Ritchie's the C Programming Language - the best book ever 
> written on C.

sure if you just want to program AVR mcus 

not if you want to use Arduino sketches in the Arduino IDE most of that is 
a subset of C++ 

[toc] | [prev] | [next] | [standalone]


#545227

FromWinfield Hill <hill@rowland.harvard.edu>
Date2019-05-31 06:54 -0700
Message-ID<qcrbmq09rt@drn.newsguy.com>
In reply to#545215
Lasse Langwadt Christensen wrote...
>
>fredag den 31. maj 2019 kl. 13.40.52 UTC+2 skrev Cursitor Doom:
>> On Fri, 31 May 2019 11:48:07 +0100, Terry Pinnell wrote:
>> 
>> > I bought my first Arduino UNO R3 kit two weeks ago (the Elegoo Super
>> > Starter kit) and am stepping through its tutorials. In parallel I'm
>> > trying to learn the basics of its C++ based programming language, but
>> > that's proving a struggle.
>> 
>> I wouldn't even bother with C++ in this instance. Get yourself a copy of 
>> Kernighan & Ritchie's the C Programming Language - the best book ever 
>> written on C.
>
> sure if you just want to program AVR mcus 
>
> not if you want to use Arduino sketches in the
> Arduino IDE most of that is a subset of C++ 

 I know the compiler is C++, but all the code
 everyone was writing seemed to be simply C.


-- 
 Thanks,
    - Win

[toc] | [prev] | [next] | [standalone]


#545244

Frombitrex <user@example.net>
Date2019-05-31 10:46 -0400
Message-ID<R6bIE.20868$NT5.14743@fx47.iad>
In reply to#545227
On 5/31/19 9:54 AM, Winfield Hill wrote:
> Lasse Langwadt Christensen wrote...
>>
>> fredag den 31. maj 2019 kl. 13.40.52 UTC+2 skrev Cursitor Doom:
>>> On Fri, 31 May 2019 11:48:07 +0100, Terry Pinnell wrote:
>>>
>>>> I bought my first Arduino UNO R3 kit two weeks ago (the Elegoo Super
>>>> Starter kit) and am stepping through its tutorials. In parallel I'm
>>>> trying to learn the basics of its C++ based programming language, but
>>>> that's proving a struggle.
>>>
>>> I wouldn't even bother with C++ in this instance. Get yourself a copy of
>>> Kernighan & Ritchie's the C Programming Language - the best book ever
>>> written on C.
>>
>> sure if you just want to program AVR mcus
>>
>> not if you want to use Arduino sketches in the
>> Arduino IDE most of that is a subset of C++
> 
>   I know the compiler is C++, but all the code
>   everyone was writing seemed to be simply C.
> 
> 

Which is a real shame considering the avr-gcc compiler is fully C++11 
standard compliant (you don't get most of the niceties or templates of 
the STL, though) but you almost never see people doing "real" C++, which 
the Arduino environment compiles just fine:

template <typename InputType, size_t BufSize>
class MyCompressionPolicy {}

//partial specialization for uint16_t

template <size_t BufSize>
class MyCompressionPolicy<BufSize, uint16_t> {}
  public:
   static const uint8_t* compress(const InputType& input_data) {
     // data compression logic etc.
     return compressed_data_buf_;
   }

  private:
   static uint8_t compressed_data_buf_[BufSize] = new uint8_t[BufSize];
};

//further specializations follow
...
...
//


//"typedef" but able to be template-ted

template <typename InputType>
using compressor_128_policy_t = MyCompressionPolicy<InputType, 128>;

//serial port wrapper with user-defined data compression policy

template <typename InterfaceType,
           template <typename> class DataCompressionPolicy>
class SerialWrapper {
  public:
   SerialWrapper(const InterfaceType& interface, const char* port, 
uint32_t baud)
       : interface_(&interface) {
     interface_->setup(port, baud);
   }

   ~SerialWrapper() {
     if (interface_) {
       interface_->flush();
       interface_->close();
     }
   }

   // hardware interface wrappers can't be copied

   SerialWrapper(const SerialWrapper&) = delete;
   SerialWrapper& operator=(const SerialWrapper) = delete;
   SerialWrapper(SerialWrapper&&) = default;
   SerialWrapper& operator=(SerialWrapper&&) = default;

   //compress data on the fly during the write out using the user-defined
   //compression policy plug-in

   template <typename InputType>
   bool write(const InputType& data) {
     enum { WRITE_FAIL, WRITE_SUCCESS };
     if (!interface_) return WRITE_FAIL;

     auto result =
 
interface_->write(DataCompressionPolicy<InputType>::compress(data));
     return result ? WRITE_SUCCESS : WRITE_FAIL;
   }

  private:
   InterfaceType* interface_ = nullptr;
};

[toc] | [prev] | [next] | [standalone]


#545245

Frombitrex <user@example.net>
Date2019-05-31 10:47 -0400
Message-ID<v8bIE.20869$NT5.5140@fx47.iad>
In reply to#545244
On 5/31/19 10:46 AM, bitrex wrote:

> Which is a real shame considering the avr-gcc compiler is fully C++11 
> standard compliant (you don't get most of the niceties or templates of 
> the STL, though) but you almost never see people doing "real" C++, which 
> the Arduino environment compiles just fine:
> 
> template <typename InputType, size_t BufSize>
> class MyCompressionPolicy {}
> 
> //partial specialization for uint16_t
> 
> template <size_t BufSize>
> class MyCompressionPolicy<BufSize, uint16_t> {}
>   public:
>    static const uint8_t* compress(const uint16_t& input_data) 

      whoops change that ;)

[toc] | [prev] | [next] | [standalone]


#545246

FromLasse Langwadt Christensen <langwadt@fonz.dk>
Date2019-05-31 07:49 -0700
Message-ID<75e12dd0-4334-484d-a284-ca647c3734a2@googlegroups.com>
In reply to#545227
fredag den 31. maj 2019 kl. 15.54.54 UTC+2 skrev Winfield Hill:
> Lasse Langwadt Christensen wrote...
> >
> >fredag den 31. maj 2019 kl. 13.40.52 UTC+2 skrev Cursitor Doom:
> >> On Fri, 31 May 2019 11:48:07 +0100, Terry Pinnell wrote:
> >> 
> >> > I bought my first Arduino UNO R3 kit two weeks ago (the Elegoo Super
> >> > Starter kit) and am stepping through its tutorials. In parallel I'm
> >> > trying to learn the basics of its C++ based programming language, but
> >> > that's proving a struggle.
> >> 
> >> I wouldn't even bother with C++ in this instance. Get yourself a copy of 
> >> Kernighan & Ritchie's the C Programming Language - the best book ever 
> >> written on C.
> >
> > sure if you just want to program AVR mcus 
> >
> > not if you want to use Arduino sketches in the
> > Arduino IDE most of that is a subset of C++ 
> 
>  I know the compiler is C++, but all the code
>  everyone was writing seemed to be simply C.

but many of the libraries are c++ 

[toc] | [prev] | [next] | [standalone]


#546895

FromPeter Percival <peterxpercival@hotmail.com>
Date2019-06-12 13:41 +0100
Message-ID<qdqrto$rtj$1@news.albasani.net>
In reply to#545214
Cursitor Doom wrote:
> On Fri, 31 May 2019 11:48:07 +0100, Terry Pinnell wrote:
> 
>> I bought my first Arduino UNO R3 kit two weeks ago (the Elegoo Super
>> Starter kit) and am stepping through its tutorials. In parallel I'm
>> trying to learn the basics of its C++ based programming language, but
>> that's proving a struggle.
> 
> I wouldn't even bother with C++ in this instance. Get yourself a copy of
> Kernighan & Ritchie's the C Programming Language - the best book ever
> written on C.

And Harbison and Steele as number two.


-- 
"He who will not reason is a bigot;
he who cannot is a fool;
he who dares not is a slave."
  - Sir William Drummond

[toc] | [prev] | [next] | [standalone]


#546968

FromPhil Hobbs <pcdhSpamMeSenseless@electrooptical.net>
Date2019-06-12 21:48 -0400
Message-ID<s4KdnVm8Vr_zNpzAnZ2dnUU7-IvNnZ2d@supernews.com>
In reply to#546895
On 6/12/19 8:41 AM, Peter Percival wrote:
> Cursitor Doom wrote:
>> On Fri, 31 May 2019 11:48:07 +0100, Terry Pinnell wrote:
>>
>>> I bought my first Arduino UNO R3 kit two weeks ago (the Elegoo Super
>>> Starter kit) and am stepping through its tutorials. In parallel I'm
>>> trying to learn the basics of its C++ based programming language, but
>>> that's proving a struggle.
>>
>> I wouldn't even bother with C++ in this instance. Get yourself a copy of
>> Kernighan & Ritchie's the C Programming Language - the best book ever
>> written on C.

Agreed.  My son taught himself C out of K&R just a few years back, and 
liked it very well.

> 
> And Harbison and Steele as number two.
> 
> 

H&S was an excellent book, and I used it for several years.  However, 
time has moved on, and the old-time C libraries are showing their age. 
I still used <cstdio>, but stuff like strdup() and realloc()?  Really?

Cheers

Phil Hobbs

-- 
Dr Philip C D Hobbs
Principal Consultant
ElectroOptical Innovations LLC / Hobbs ElectroOptics
Optics, Electro-optics, Photonics, Analog Electronics
Briarcliff Manor NY 10510

http://electrooptical.net
http://hobbs-eo.com

[toc] | [prev] | [next] | [standalone]


#547002

FromPeter Percival <peterxpercival@hotmail.com>
Date2019-06-13 17:46 +0100
Message-ID<qdtul4$jis$1@news.albasani.net>
In reply to#546968
Phil Hobbs wrote:
> On 6/12/19 8:41 AM, Peter Percival wrote:
>> Cursitor Doom wrote:
>>> On Fri, 31 May 2019 11:48:07 +0100, Terry Pinnell wrote:
>>>
>>>> I bought my first Arduino UNO R3 kit two weeks ago (the Elegoo Super
>>>> Starter kit) and am stepping through its tutorials. In parallel I'm
>>>> trying to learn the basics of its C++ based programming language, but
>>>> that's proving a struggle.
>>>
>>> I wouldn't even bother with C++ in this instance. Get yourself a copy of
>>> Kernighan & Ritchie's the C Programming Language - the best book ever
>>> written on C.
> 
> Agreed.  My son taught himself C out of K&R just a few years back, and 
> liked it very well.
> 
>>
>> And Harbison and Steele as number two.
>>
>>
> 
> H&S was an excellent book, and I used it for several years.  However, 
> time has moved on, and the old-time C libraries are showing their age. I 
> still used <cstdio>, but stuff like strdup() and realloc()?  Really?
> 
> Cheers
> 
> Phil Hobbs
> 

I confess, I haven't programmed in anger for thirteen years or more, so 
anything I say is probably well out of date!

-- 
"He who will not reason is a bigot;
he who cannot is a fool;
he who dares not is a slave."
  - Sir William Drummond

[toc] | [prev] | [next] | [standalone]


#545243

FromGeorge Herold <gherold@teachspin.com>
Date2019-05-31 07:45 -0700
Message-ID<e5ba2828-ea5d-4180-b5c9-59152a9cafe7@googlegroups.com>
In reply to#545211
On Friday, May 31, 2019 at 6:48:13 AM UTC-4, Terry Pinnell wrote:
> I bought my first Arduino UNO R3 kit two weeks ago (the Elegoo Super Starter kit)
> and am stepping through its tutorials. In parallel I'm trying to learn the basics of
> its C++ based programming language, but that's proving a struggle. I'm impatient to
> use Arduino on my own projects so I will take a 'copy/paste/edit' approach. It then
> becomes a matter of finding sketches that cover a particular subject and then
> tailoring.
> 
> I'd therefore appreciate recommendations on Arduino sketch sources that others have
> found useful please. 
> 
> Terry, East Grinstead, UK

I played with an arduino years ago... (with my son.)  But I don't 
know much... you might try asking at the stack exchange
https://arduino.stackexchange.com/

George H. 

[toc] | [prev] | [next] | [standalone]


#545252

Frombitrex <user@example.net>
Date2019-05-31 11:37 -0400
Message-ID<xSbIE.11877$h55.1449@fx41.iad>
In reply to#545211
On 5/31/19 6:48 AM, Terry Pinnell wrote:
> I bought my first Arduino UNO R3 kit two weeks ago (the Elegoo Super Starter kit)
> and am stepping through its tutorials. In parallel I'm trying to learn the basics of
> its C++ based programming language, but that's proving a struggle. I'm impatient to
> use Arduino on my own projects so I will take a 'copy/paste/edit' approach. It then
> becomes a matter of finding sketches that cover a particular subject and then
> tailoring.
> 
> I'd therefore appreciate recommendations on Arduino sketch sources that others have
> found useful please.
> 
> Terry, East Grinstead, UK
> 

Best place to start looking is the library search function from the IDE 
itself, Sketch -> Include Libraries -> Manage Libraries or control + 
shift + I.

 From there you can search for libraries covering a lot of common 
embedded hardware devices and software tasks. Most will have links to a 
repository of the source code for how they're implemented (some are more 
complicated than others.)

[toc] | [prev] | [next] | [standalone]


#545254

Frombitrex <user@example.net>
Date2019-05-31 11:39 -0400
Message-ID<xUbIE.11987$h55.4818@fx41.iad>
In reply to#545252
On 5/31/19 11:37 AM, bitrex wrote:
> On 5/31/19 6:48 AM, Terry Pinnell wrote:
>> I bought my first Arduino UNO R3 kit two weeks ago (the Elegoo Super 
>> Starter kit)
>> and am stepping through its tutorials. In parallel I'm trying to learn 
>> the basics of
>> its C++ based programming language, but that's proving a struggle. I'm 
>> impatient to
>> use Arduino on my own projects so I will take a 'copy/paste/edit' 
>> approach. It then
>> becomes a matter of finding sketches that cover a particular subject 
>> and then
>> tailoring.
>>
>> I'd therefore appreciate recommendations on Arduino sketch sources 
>> that others have
>> found useful please.
>>
>> Terry, East Grinstead, UK
>>
> 
> Best place to start looking is the library search function from the IDE 
> itself, Sketch -> Include Libraries -> Manage Libraries or control + 
> shift + I.
> 
>  From there you can search for libraries covering a lot of common 
> embedded hardware devices and software tasks. Most will have links to a 
> repository of the source code for how they're implemented (some are more 
> complicated than others.)

The repos for most libraries will also contain example code to show how 
they should be used in practice.

[toc] | [prev] | [next] | [standalone]


#545269

FromTerry Pinnell <me@somewhere.invalid>
Date2019-05-31 18:13 +0100
Message-ID<j5o2fe93cutk7a18o7jknqk9nk19cpq19i@4ax.com>
In reply to#545254
bitrex <user@example.net> wrote:

>On 5/31/19 11:37 AM, bitrex wrote:
>> On 5/31/19 6:48 AM, Terry Pinnell wrote:
>>> I bought my first Arduino UNO R3 kit two weeks ago (the Elegoo Super 
>>> Starter kit)
>>> and am stepping through its tutorials. In parallel I'm trying to learn 
>>> the basics of
>>> its C++ based programming language, but that's proving a struggle. I'm 
>>> impatient to
>>> use Arduino on my own projects so I will take a 'copy/paste/edit' 
>>> approach. It then
>>> becomes a matter of finding sketches that cover a particular subject 
>>> and then
>>> tailoring.
>>>
>>> I'd therefore appreciate recommendations on Arduino sketch sources 
>>> that others have
>>> found useful please.
>>>
>>> Terry, East Grinstead, UK
>>>
>> 
>> Best place to start looking is the library search function from the IDE 
>> itself, Sketch -> Include Libraries -> Manage Libraries or control + 
>> shift + I.
>> 
>>  From there you can search for libraries covering a lot of common 
>> embedded hardware devices and software tasks. Most will have links to a 
>> repository of the source code for how they're implemented (some are more 
>> complicated than others.)
>
>The repos for most libraries will also contain example code to show how 
>they should be used in practice.

Thanks, I'll start there.

Terry, East Grinstead, UK

[toc] | [prev] | [next] | [standalone]


#545284

FromRalph Mowery <rmowery28146@earthlink.net>
Date2019-05-31 15:07 -0400
Message-ID<MPG.375b34366cd11b04989a2d@news.east.earthlink.net>
In reply to#545211
In article <pg02fept12fd4h872f8jq590libopp4201@4ax.com>, 
me@somewhere.invalid says...
> 
> I bought my first Arduino UNO R3 kit two weeks ago (the Elegoo Super Starter kit)
> and am stepping through its tutorials. In parallel I'm trying to learn the basics of
> its C++ based programming language, but that's proving a struggle. I'm impatient to
> use Arduino on my own projects so I will take a 'copy/paste/edit' approach. It then
> becomes a matter of finding sketches that cover a particular subject and then
> tailoring.
> 
> I'd therefore appreciate recommendations on Arduino sketch sources that others have
> found useful please. 
> 
> Terry, East Grinstead, UK
> 
> 

You may want to start here:
https://www.arduino.cc/en/Guide/HomePage

Here is another place that shows how to hook up many of the sensors.

https://www.sunfounder.com/learn/category/Sensor-Kit-v2-0-for-
Arduino.html

There are lots of people on youtube that have done many things with the 
Arduino.  I have been playing with them for about 2 years.  The language 
is simple, but I am not a programmer.  I do it like I do the game of 
chess.  I know how each piece moves on the board, but playing someone 
that has a basic understanding of the game will beat me in a very short 
time.  I can make simple changes to other's programs but that is it.

[toc] | [prev] | [next] | [standalone]


#545315

From"John Miles, KE5FX" <jmiles@gmail.com>
Date2019-05-31 17:02 -0700
Message-ID<2bc464da-5bdc-4606-846b-a07b2b35e34e@googlegroups.com>
In reply to#545211
On Friday, May 31, 2019 at 3:48:13 AM UTC-7, Terry Pinnell wrote:
> I'd therefore appreciate recommendations on Arduino sketch 
> sources that others have found useful please. 

I don't know much about the Arduino environment, but their boards 
are handy for working with the AVR 8-bit chips.  If you are climbing the 
learning curves for both C/C++ and embedded development at the same time, 
you have some challenging work ahead.  

C++ is a moving target, especially these days.  Many people who learned it
20 years ago would barely recognize the C++ code now being written under 
the "Modern C++" rubric.  Fortunately it's still true that you only need 
to use the C++ features you want to use, along with the converse (you only 
want to use the features you actually need.)  

The advice to start with K&R C is OK as far as it goes, but it's akin to
telling an electronics novice to start with vacuum tubes.  I have to believe
that there are better tutorials by now that start you out with a good C++ 
foundation.  It is safe to say the best C++ tutorials will not be found on 
Arduino sites, but on desktop platforms.  If you run Windows, look for some 
introductory lessons with the "community edition" of MS Visual Studio.  
There will be tons.  If you run Linux or a related OS you will want to start
with tutorials that use GCC.

One advantage there is that the Arduino toolchain that you will be working 
with is GCC-based, so if you become familiar with GCC early on, those 
lessons will apply at more than just the core language level.  Arduino 
itself won't expose you directly to GCC, but you will eventually leave that
particular nest.

-- john, KE5FX

[toc] | [prev] | [next] | [standalone]


#545351

FromJan Panteltje <pNaOnStPeAlMtje@yahoo.com>
Date2019-06-01 04:57 +0000
Message-ID<qct0k0$n2p$1@dont-email.me>
In reply to#545315
On a sunny day (Fri, 31 May 2019 17:02:54 -0700 (PDT)) it happened "John
Miles, KE5FX" <jmiles@gmail.com> wrote in
<2bc464da-5bdc-4606-846b-a07b2b35e34e@googlegroups.com>:

>On Friday, May 31, 2019 at 3:48:13 AM UTC-7, Terry Pinnell wrote:
>> I'd therefore appreciate recommendations on Arduino sketch 
>> sources that others have found useful please. 
>
>I don't know much about the Arduino environment, but their boards 
>are handy for working with the AVR 8-bit chips.  If you are climbing the 
>learning curves for both C/C++ and embedded development at the same time, 
>you have some challenging work ahead.  
>
>C++ is a moving target, especially these days.  Many people who learned it
>20 years ago would barely recognize the C++ code now being written under 
>the "Modern C++" rubric.  Fortunately it's still true that you only need 
>to use the C++ features you want to use, along with the converse (you only 
>want to use the features you actually need.)  
>
>The advice to start with K&R C is OK as far as it goes, but it's akin to
>telling an electronics novice to start with vacuum tubes.

That is complete bullox
The Cplushplush I have seen for 'duinos is total insane.
Cplushplush is a crime against humanity.

Learning it is going back to the stone age making stone tools.
I do not use 'duinos and never will, just because of that Cplushplush.

For a bit more you have a Raspberry Pi with Linux and gcc and can program in C or any other language,
For single tasking computing stuff I use PICs, programmed in asm.
PICs with PIC asm is much easier and more logical than Cplushplush, faster, and takes less space.
Cplushplush is a crime against humanity.

I once needed a driver for some chip, 'duino had one in Cplushplush that consisted of 3 source files IIRC.
I rewrote it in C in less than 40 lines,., and run it on a Raspberry.

The basic flaw with that seeplushplush is that it claims to look at things from on 'object oriented' POV.

Unfortunately for those users computers just are sequential operating machines.
So their brains get damaged doing the silly switch from reality all the time.
And all that Cplushplush syntax is way to much typing work.
It is about as stupid as programming in Linux as non-root and using sudo at the start of any instructions.
Cpluplush is unreadable crap and should be forbidden by law and those that still use it banned to a deserted island on an other planet in an other solar system in an other galaxy in an other universe ruled by string theory.

I Have Spoken.
 

[toc] | [prev] | [next] | [standalone]


#545353

Frombitrex <user@example.net>
Date2019-06-01 01:11 -0400
Message-ID<vOnIE.14499$M55.13366@fx36.iad>
In reply to#545351
On 6/1/19 12:57 AM, Jan Panteltje wrote:
> On a sunny day (Fri, 31 May 2019 17:02:54 -0700 (PDT)) it happened "John
> Miles, KE5FX" <jmiles@gmail.com> wrote in
> <2bc464da-5bdc-4606-846b-a07b2b35e34e@googlegroups.com>:
> 
>> On Friday, May 31, 2019 at 3:48:13 AM UTC-7, Terry Pinnell wrote:
>>> I'd therefore appreciate recommendations on Arduino sketch
>>> sources that others have found useful please.
>>
>> I don't know much about the Arduino environment, but their boards
>> are handy for working with the AVR 8-bit chips.  If you are climbing the
>> learning curves for both C/C++ and embedded development at the same time,
>> you have some challenging work ahead.
>>
>> C++ is a moving target, especially these days.  Many people who learned it
>> 20 years ago would barely recognize the C++ code now being written under
>> the "Modern C++" rubric.  Fortunately it's still true that you only need
>> to use the C++ features you want to use, along with the converse (you only
>> want to use the features you actually need.)
>>
>> The advice to start with K&R C is OK as far as it goes, but it's akin to
>> telling an electronics novice to start with vacuum tubes.
> 
> That is complete bullox
> The Cplushplush I have seen for 'duinos is total insane.
> Cplushplush is a crime against humanity.
> 
> Learning it is going back to the stone age making stone tools.
> I do not use 'duinos and never will, just because of that Cplushplush.
> 
> For a bit more you have a Raspberry Pi with Linux and gcc and can program in C or any other language,
> For single tasking computing stuff I use PICs, programmed in asm.
> PICs with PIC asm is much easier and more logical than Cplushplush, faster, and takes less space.
> Cplushplush is a crime against humanity.

It's a language for writing code that is 
extensible/modifiable/understandable by other people than oneself, which 
is a requirement for most real-world development projects.

[toc] | [prev] | [next] | [standalone]


#545356

FromJan Panteltje <pNaOnStPeAlMtje@yahoo.com>
Date2019-06-01 05:56 +0000
Message-ID<qct42p$60m$1@dont-email.me>
In reply to#545353
On a sunny day (Sat, 1 Jun 2019 01:11:55 -0400) it happened bitrex
<user@example.net> wrote in <vOnIE.14499$M55.13366@fx36.iad>:

>On 6/1/19 12:57 AM, Jan Panteltje wrote:
>> On a sunny day (Fri, 31 May 2019 17:02:54 -0700 (PDT)) it happened "John
>> Miles, KE5FX" <jmiles@gmail.com> wrote in
>> <2bc464da-5bdc-4606-846b-a07b2b35e34e@googlegroups.com>:
>> 
>>> On Friday, May 31, 2019 at 3:48:13 AM UTC-7, Terry Pinnell wrote:
>>>> I'd therefore appreciate recommendations on Arduino sketch
>>>> sources that others have found useful please.
>>>
>>> I don't know much about the Arduino environment, but their boards
>>> are handy for working with the AVR 8-bit chips.  If you are climbing the
>>> learning curves for both C/C++ and embedded development at the same time,
>>> you have some challenging work ahead.
>>>
>>> C++ is a moving target, especially these days.  Many people who learned it
>>> 20 years ago would barely recognize the C++ code now being written under
>>> the "Modern C++" rubric.  Fortunately it's still true that you only need
>>> to use the C++ features you want to use, along with the converse (you only
>>> want to use the features you actually need.)
>>>
>>> The advice to start with K&R C is OK as far as it goes, but it's akin to
>>> telling an electronics novice to start with vacuum tubes.
>> 
>> That is complete bullox
>> The Cplushplush I have seen for 'duinos is total insane.
>> Cplushplush is a crime against humanity.
>> 
>> Learning it is going back to the stone age making stone tools.
>> I do not use 'duinos and never will, just because of that Cplushplush.
>> 
>> For a bit more you have a Raspberry Pi with Linux and gcc and can program in C or any other language,
>> For single tasking computing stuff I use PICs, programmed in asm.
>> PICs with PIC asm is much easier and more logical than Cplushplush, faster, and takes less space.
>> Cplushplush is a crime against humanity.
>
>It's a language for writing code that is 
>extensible/modifiable/understandable by other people than oneself, which 
>is a requirement for most real-world development projects.

No it is not, it is a crime against humanity.
there is a REASON why Linus has forbidden the use of seeplushplush in the kernel.

Teaching people to understand reality from the wrong POV is leading to bloated crap for software.
Qt, MS widows... the list is probably endless.

There is this other thread, about what was it 'counter intuitive something',
and somebody pointed to (oh yes gravity) 'gravitons'.
OK, but that comes - or is related to string theory.
Last night I was making spaghetti, and once cooked you can bend those strings in any form you like
well and then I just realized this morning that that is what string theory IS.
Some mathemagician looked at spaghetti and realized that with those strings you can make any form you want,
even 'branes' (not brains).. repeat last sentence many times over.,.
Anyways, I have an other model that actually does predict and explain observed phenomena,
unlike string theory that fold any way you like...
Anyways, as long as you can get away with that string^H^H^H^H^H^H plushplush stuff is
like getting away with some crime against humanity, just do not do it to kids that are learning!
Else the world will be one worse.
Explain to them how a processor works, and then teach them asm, hey I started coding in binary, and then move on to some higher
language (maybe BASIC) and C as an interface to the hardware.
Many object(ional) oriented languages came, and went again, large IT projects failed, it is big business to sell bloated un-understandable crap.
That is one problem with the capitalist system.
But do not do it to newcomers in computing!


[toc] | [prev] | [next] | [standalone]


#545357

From"John Miles, KE5FX" <jmiles@gmail.com>
Date2019-05-31 23:34 -0700
Message-ID<6f705876-d6c3-4be8-a265-1157f020757d@googlegroups.com>
In reply to#545351
On Friday, May 31, 2019 at 9:57:40 PM UTC-7, Jan Panteltje wrote:
> The Cplushplush I have seen for 'duinos is total insane.
> Cplushplush is a crime against humanity.
> 
> Learning it is going back to the stone age making stone tools.

If someone is just getting started, it amounts to pedagogic malpractice to 
tell them to learn anything else.  The world still runs on C, and someone 
who has learned C++ will be equipped to write better code than someone 
who has not even if they never use 99% of the language.  The only question 
is where they should be looking for lessons.

Probably not here, would be my guess.

> I do not use 'duinos and never will, just because of that Cplushplush.

It's just another AVR board, irrespective of your personal prejudices.
If you have an 8-bit nail to pound, Arduinos make a good 8-bit hammer.  
You can program them in C, or Forth, or Brainfuck if that's your thing.

-- john, KE5FX

[toc] | [prev] | [next] | [standalone]


Page 1 of 6  [1] 2 3 4 5 6  Next page →

Back to top | Article view | sci.electronics.design


csiph-web