Re: Arduino and Python or gcc compiler?

2018-07-22 Thread cyaiplexys

On 07/22/2018 02:20 PM, Joe wrote:

...snip...


At the level of the Arduino, and what it is used for, the C required
isn't going to differ too much from Python. You're mostly going to
be bit-banging. If you know one modern procedural language, you can at
least potter around in others quite easily.


Judging by what others are saying plus what you say, it looks like 
sticking to C would actually be easier than trying to get it to work 
with Python.


...snip...


That's ok. I am getting good enough in Python (and have made my own
libraries at times) that if it's not there, I might be able to create
one. Thing is, Raspberry Pi seems more like a computer, rather than a
way to experiment controlling things (safely) like electronic
circuits on breadboards for the fun of it.


It is indeed. A Pi running a Debian desktop is painfully slow, but it
works. What it's surprisingly good at is running streaming software for
Internet TV, the system is optimised for high-definition HDMI output.
Google raspberry pi tv. You won't do that on an Arduino.


Good thing I don't have a need for running streaming software or 
anything like that. So that's not a problem.


...snip...


The kit comes with a LCD display, actually, and tutorials and
examples on using it. That I know I'll find interesting too. Ever
since I saw a video about LCD displays on a "The 8-bit guy" YouTube
video, I been wanting to toy around with those things.


Wait till you've had a bit of practice with them before you try writing
a driver for a new LCD display. The documentation for them is skimpy,
and you may need to guess a bit. I've made a few for the PIC 18F
series, which is comparable to this Atmel series.


I think what I'll be doing is just what is in the tutorials, at first. 
And toying around with what they have available. Looks like they already 
have a library built for the LCD display (it's a monochrome 20 x 40 or 
something like that) and some sample code on how to use it.



I am thinking this is going to be quite an interesting and fun hobby.



Certainly. My only work with the Arduino was using one as a graphics
co-processor for a PIC project to drive a 320x240 touch screen for a
camera control panel. There was a suitable Arduino library but not one
for the PIC, and time was in short supply. One drawback to the Arduino
here is that it doesn't have a lot of memory, so the screen fonts were
a bit chunky.


That's another thing I am noticing but a friend tells me I really won't 
need a lot of memory just for tinkering around with things. They do have 
a shield with an SD card reader/writer for it but my friend tells me 
that doesn't expand how much memory is available to store programs, but 
would only come in handy if you do a lot of writing of data or something.


Well, I guess you good folks got me straightened out. It looks like I 
won't need anything but what comes with the kit and the downloads to do 
the tinkering and will have to do it in C. I'll just forget about Python 
I guess. Not too big a problem.


I'm also amazed that Debian doesn't have much for the Arduino in the repo.




Re: Arduino and Python or gcc compiler?

2018-07-22 Thread Joe
On Sun, 22 Jul 2018 11:34:33 -0400
cyaiplexys  wrote:

> On 07/22/2018 11:13 AM, Erik Christiansen wrote:
> > On 22.07.18 10:29, cyaiplexys wrote:  
> >> I think my mindset also came from my days of trying to program the
> >> WowWee RoboSapien RS Media (ARM/Linux with Java). That was like a
> >> fully programmable computer and robot all in one.  
> > 
> > Then the full arduino environment will be more comfortable than raw
> > C on bare iron. While I program AVRs, including the ATmega328P used
> > on most arduino boards, in C and assembler, I understand that the
> > arduino environment provides a high level programming interface
> > which allows e.g. artists to write "sketches" to perform real-time
> > tasks. 

This is the great strength of the Arduino. Run the IDE on Windows or
Linux (the program format is the same on both), select the board you
have, plug it into a serial port (USB/serial chip these days) and
you're away. The Arduino board has a built-in bootloader, meaning you
don't need a specialist programmer, just a serial port.
 
> 
> After watching some YouTube tutorials, I am starting to see that. The 
> IDE isn't "real" C in that you're not directly compiling using gcc
> from the command line. It does everything for you behind the scenes.
> Not used to that since my old Windows days.
> 
> > There is quite a bit of peripheral hardware on an ATmega328P, from
> > serial USART, through timer/counters useful for e.g. PWM motor
> > control, through multi-channel 10 bit Analogue to digital
> > converter. The chip datasheet is 440 pages in length, and learning
> > to initialise and drive the on-chip paraphernalia is a non-trivial
> > task. The arduino environment provides a library of drivers AIUI,
> > to allow programming at the application level, rather than writing
> > your own drivers¹. It won't necessarily give you the last
> > microsecond of real-time performance, but it should be a low-pain
> > introduction. (Must be some reason for its popularity, I figure.)  
> 
> I got the starter kit with the Arduino UNO R3. Not knowing what that 
> means yet (I need to read into that) I am assuming that ATmega328P is 
> the Arduino MEGA and not the Arduino UNO R3? Or is it the CPU in all 
> Arduinos? I'll have to look into that. I did find out a bit after my 
> first post in this thread that Arduino isn't and ARM processor.
> 
> >> I don't mind using C, but am pretty bad at it. Maybe this is the
> >> time to finally get better at it.  
> > 
> > Learning two things at once is for self-driven stoics only, at
> > least if they're both non-trivial. Beginning with a friendly
> > development environment and application framework, complete with
> > examples which could be downloaded and used for tutorial purposes,
> > avoids the pain of a lot of stuff failing not because of coding
> > errors, but because not yet grokking the 440 pages of hardware spec
> > left one bit in that other mode enabling register unset, so it'll
> > never work until you find the clue in the doco.
> > 
> > There must be an arduino ML or forum, which would be a sanity saver.
> > Once master of that, then there's the AVRfreaks forum when the more
> > serious C journey begins. 

At the level of the Arduino, and what it is used for, the C required
isn't going to differ too much from Python. You're mostly going to
be bit-banging. If you know one modern procedural language, you can at
least potter around in others quite easily. 
> 
> I'll have to look into these forums and find one to join. I find
> forums and lists, etc. to be indispensable when learning new stuff.
> And also even if I am good with using something (like I am with
> Debian), still having some community based help had been very useful.
> 
> > OK, there are one or two arduinos with ARM chips, but I don't count
> > that as original arduino.  
> 
> Maybe that was the source of my confusion. But I think I'm sure that
> the Elegoo Super Starter Kit's Arduino UNO R3 is *not* ARM. They say
> it's 100% compatible with original Arduino so I assume it's got the
> same processor as the original.
> 
> > A raspberry Pi, running linux, would be a more familiar environment
> > by the sound of it. No problem running python there, but would
> > there be python I/O libraries?  

The 'Pi' comes from Python, which is its intended primary user
language. Peripherals intended for the Pi will come with Python
drivers, or at least Python interfaces.

> 
> That's ok. I am getting good enough in Python (and have made my own 
> libraries at times) that if it's not there, I might be able to create 
> one. Thing is, Raspberry Pi seems more like a computer, rather than a 
> way to experiment controlling things (safely) like electronic
> circuits on breadboards for the fun of it.

It is indeed. A Pi running a Debian desktop is painfully slow, but it
works. What it's surprisingly good at is running streaming software for
Internet TV, the system is optimised for high-definition HDMI output.
Google raspberry pi tv. 

Re: Arduino and Python or gcc compiler?

2018-07-22 Thread Cindy-Sue Causey
On 7/21/18, cyaiplexys  wrote:
> On 07/21/2018 07:36 PM, deloptes wrote:
>> Hi, how old are you?
>> The way you wrote is supposing you are New Gen kid.
>
> Why thank you! :) Actually, physically I'm over half a century old. I
> just try to keep a young mind. I'm a New Gen kid to all this new tech
> stuff though.


The word "tinker" was the tell I picked up on there. As it turns out,
that was right on the money. :D

Cindy :)
-- 
Cindy-Sue Causey
Talking Rock, Pickens County, Georgia, USA

* runs with duct tape *



Re: Arduino and Python or gcc compiler?

2018-07-22 Thread cyaiplexys

On 07/22/2018 11:13 AM, Erik Christiansen wrote:

On 22.07.18 10:29, cyaiplexys wrote:

I think my mindset also came from my days of trying to program the WowWee
RoboSapien RS Media (ARM/Linux with Java). That was like a fully
programmable computer and robot all in one.


Then the full arduino environment will be more comfortable than raw C on
bare iron. While I program AVRs, including the ATmega328P used on most
arduino boards, in C and assembler, I understand that the arduino
environment provides a high level programming interface which allows
e.g. artists to write "sketches" to perform real-time tasks.


After watching some YouTube tutorials, I am starting to see that. The 
IDE isn't "real" C in that you're not directly compiling using gcc from 
the command line. It does everything for you behind the scenes. Not used 
to that since my old Windows days.



There is quite a bit of peripheral hardware on an ATmega328P, from
serial USART, through timer/counters useful for e.g. PWM motor control,
through multi-channel 10 bit Analogue to digital converter. The chip
datasheet is 440 pages in length, and learning to initialise and drive
the on-chip paraphernalia is a non-trivial task. The arduino environment
provides a library of drivers AIUI, to allow programming at the
application level, rather than writing your own drivers¹. It won't
necessarily give you the last microsecond of real-time performance, but
it should be a low-pain introduction. (Must be some reason for its
popularity, I figure.)


I got the starter kit with the Arduino UNO R3. Not knowing what that 
means yet (I need to read into that) I am assuming that ATmega328P is 
the Arduino MEGA and not the Arduino UNO R3? Or is it the CPU in all 
Arduinos? I'll have to look into that. I did find out a bit after my 
first post in this thread that Arduino isn't and ARM processor.



I don't mind using C, but am pretty bad at it. Maybe this is the time to
finally get better at it.


Learning two things at once is for self-driven stoics only, at least if
they're both non-trivial. Beginning with a friendly development
environment and application framework, complete with examples which
could be downloaded and used for tutorial purposes, avoids the pain of a
lot of stuff failing not because of coding errors, but because not yet
grokking the 440 pages of hardware spec left one bit in that other mode
enabling register unset, so it'll never work until you find the clue in
the doco.

There must be an arduino ML or forum, which would be a sanity saver.
Once master of that, then there's the AVRfreaks forum when the more
serious C journey begins.


I'll have to look into these forums and find one to join. I find forums 
and lists, etc. to be indispensable when learning new stuff. And also 
even if I am good with using something (like I am with Debian), still 
having some community based help had been very useful.



OK, there are one or two arduinos with ARM chips, but I don't count that
as original arduino.


Maybe that was the source of my confusion. But I think I'm sure that the 
Elegoo Super Starter Kit's Arduino UNO R3 is *not* ARM. They say it's 
100% compatible with original Arduino so I assume it's got the same 
processor as the original.



A raspberry Pi, running linux, would be a more familiar environment by
the sound of it. No problem running python there, but would there be
python I/O libraries?


That's ok. I am getting good enough in Python (and have made my own 
libraries at times) that if it's not there, I might be able to create 
one. Thing is, Raspberry Pi seems more like a computer, rather than a 
way to experiment controlling things (safely) like electronic circuits 
on breadboards for the fun of it.



¹ OK, drivers for e.g. 2x20 character LCDs can be found on the net, but
where there's an arduino LCD "shield" (plug-in daughterboard), there'll
be an arduino driver ready to use.

Erik


The kit comes with a LCD display, actually, and tutorials and examples 
on using it. That I know I'll find interesting too. Ever since I saw a 
video about LCD displays on a "The 8-bit guy" YouTube video, I been 
wanting to toy around with those things.


I am thinking this is going to be quite an interesting and fun hobby.



Re: Arduino and Python or gcc compiler?

2018-07-22 Thread Erik Christiansen
On 22.07.18 10:29, cyaiplexys wrote:
> I think my mindset also came from my days of trying to program the WowWee
> RoboSapien RS Media (ARM/Linux with Java). That was like a fully
> programmable computer and robot all in one.

Then the full arduino environment will be more comfortable than raw C on
bare iron. While I program AVRs, including the ATmega328P used on most
arduino boards, in C and assembler, I understand that the arduino
environment provides a high level programming interface which allows
e.g. artists to write "sketches" to perform real-time tasks.

There is quite a bit of peripheral hardware on an ATmega328P, from
serial USART, through timer/counters useful for e.g. PWM motor control,
through multi-channel 10 bit Analogue to digital converter. The chip
datasheet is 440 pages in length, and learning to initialise and drive
the on-chip paraphernalia is a non-trivial task. The arduino environment
provides a library of drivers AIUI, to allow programming at the
application level, rather than writing your own drivers¹. It won't
necessarily give you the last microsecond of real-time performance, but
it should be a low-pain introduction. (Must be some reason for its
popularity, I figure.)

> I don't mind using C, but am pretty bad at it. Maybe this is the time to
> finally get better at it.

Learning two things at once is for self-driven stoics only, at least if
they're both non-trivial. Beginning with a friendly development
environment and application framework, complete with examples which
could be downloaded and used for tutorial purposes, avoids the pain of a
lot of stuff failing not because of coding errors, but because not yet
grokking the 440 pages of hardware spec left one bit in that other mode
enabling register unset, so it'll never work until you find the clue in
the doco.

There must be an arduino ML or forum, which would be a sanity saver.
Once master of that, then there's the AVRfreaks forum when the more
serious C journey begins.

OK, there are one or two arduinos with ARM chips, but I don't count that
as original arduino.

A raspberry Pi, running linux, would be a more familiar environment by
the sound of it. No problem running python there, but would there be
python I/O libraries?

¹ OK, drivers for e.g. 2x20 character LCDs can be found on the net, but
where there's an arduino LCD "shield" (plug-in daughterboard), there'll
be an arduino driver ready to use.

Erik



Re: Arduino and Python or gcc compiler?

2018-07-22 Thread cyaiplexys

On 07/22/2018 06:20 AM, deloptes wrote:

cyaiplexys wrote:


Well, since I use Debian I assumed this would be a place to ask what to
get from the Debian repo that would help in achieving my goal. But you
do make a good point. I'll have to find some Arduino forums to ask some
questions in because I'm quite sure I'll have a lot of them.


Sure Arduino forums will be useful when you have specific Arduino questions.
Related to debian you have this page
https://wiki.debian.org/Arduino
It looks like it gives you the connection to the arduino board /dev/ttyACM0.

Next CPUs - IMO you definitely need to know for which CPU you develop code
https://www.arduino.cc/en/Products/Compare
but it could be that the IDE hides this.

Salt it with some background knowledge
https://www.arduino.cc/en/Tutorial/Foundations

It is not a one day exercise, but it may be fun.

>

I did AVR for a hobby. I bought few types of AVR chips a dev board, that I
had to soldier myself and a programmer (total cost ~ €25,-). It took me
some time to understand how the programmer is to be used with the board and
how it is intended to work on linux. I guess it was two weekends that I
spent reading and trying. Finally Enlightment was there and voila, I can
write, compile, flash and run the MCs. Altogether it spanned over 8 months
because of job and family. I think the total time spent was about 1 month
though.
So it depends on your level and skill. It might take months or hours, but at
the end you will be an expert.


When I get into these things, it might take me a few months to maybe 
even years to learn something new fully. And some things only take a 
weekend. Depends on what skills one needs to get going with it. I have 
35+ years programming experience in many different languages, and 
tinkered in electronics even as young as age 7. But the thing is, while 
I learned the basics (and when Google came around, Googled for stuff I 
didn't know that I needed to apply to a project), and even took a couple 
online courses in programming, I find it's a matter of use it or lose 
it. If I don't use it regularly (like I do with PHP, HTML, CSS, Perl, 
and Python in my job), then I tend to forget almost all I learned and 
kinda end up Googling for help with everything or looking up my code 
snippets and notes.


But at the same time, I enjoy tinkering with stuff, even if I might 
forget a year or two later. For my own hobbies, I just get curious about 
some of the "new" (I know this stuff has been around awhile) technology 
out there and like to see how it all works.


It might be also worth learning some C. 


I had done some C programming now and then (K & R C, ANSI C, Mix Power 
C, Borland C++, gcc, Visual C) and now anytime I do anything in C, I use 
gcc (and also valgrind, autotools, and I forgot what else I use but I 
use Kate for my editor for nearly everything and compile at command 
line). I still struggle with C because I don't use it much. However, I 
use a lot of stuff that has a similar structure to C such as perl and 
PHP. Funny thing is, I also learned Java but almost never use it!



I am not sure how python compiles low level code, but I guess it

> comes with overhead.

Python is a scripting language so natively it doesn't get compiled, 
really. To compile Python code to binary .so for like Python libraries 
(which is NOT required but there are some uses for doing so), I use a 
program called 'cython' (in the debian repos) that converts Python code 
to C code, then uses gcc to compile the resulting C code. Does a decent 
job of it for what I was doing.


> Given the amount of memory available, it might be wise to keep low
> footprint. Also you do not need to know a lot of details. Focus is on
> bitwise operations that are used when working with bits.

I actually haven't done much of that in *years* - since my OS9-Level II 
days. Got to brush up on that now.


> But there are very good examples, so if you have an understanding of
> the concept of C language, it shouldn't be a big challenge.
>
> good luck

Good to know. And thank you for all the really good information. I'm 
saving it for my "list to learn".




Re: Arduino and Python or gcc compiler?

2018-07-22 Thread cyaiplexys

On 07/22/2018 03:26 AM, Joe wrote:

Joe, please forgive me that I forgot to click "Reply to list". I have NO 
valid excuse why I keep doing stupid things like that. :(



On Sat, 21 Jul 2018 18:15:12 -0400
cyaiplexys  wrote:


I am getting the Elegoo Super Starter Kit (Arduino Uno R3) to tinker
with (it's on order as of when I'm writing this post).

I looked in the Debian repos for stuff on Arduino and didn't find
much (at least not of interest to me).

I did download the IDE from Elegoo and their tutorials and libraries.
But it's all in C/C++. While I do know C and C++ (to some extent),
I'm very bad at it (I admit to not using it very much, maybe once
every other blue moon and lately we haven't had any blue moons that
warranted using C).

I recently been doing stuff in Python (especially for work, which is
not Arduino related in any way). I am really getting to like Python.
I have created my own Python Libraries for other things (again
unrelated) and even compiled them to .so (binary) using the 'cython'
compiler.

While I could create C source of a Python script using cython, I
don't know how to compile the resulting C source and upload it to the
Arduino board. I would like to use gcc.

Is there a cross-platform compiler for Arduino and gcc that anyone
has had experience with that works or they can recommend?

Or some way to program in Python?




Sure if I was going there I wouldn't be after starting from here...

I've seen your later post, and you may indeed be overestimating what
the Arduino can do, it's basically a very well developed ecosystem for
a microcontroller, with lots of real-world interfaces available. Just
for tinkering with electronics, it's fine.

If you're after a more powerful (i.e. PC-like) tinkering gadget, you
might be better looking at the Raspberry Pi (Pi for Python) and the
subsequent similar devices. More expensive than the Arduino, but still
pretty cheap. The Pi runs more than one OS, but the Raspbian version of
Debian is probably most widely-used. The Pi also has a great many
interface devices available, and Python is the expected scripting
language.


I will probably end up with one of those sooner or later. A friend as a 
Pi (I thought Pi meant 3.14...)


I keep hearing about Arduino and Raspberry Pi and always wondered what 
they were all about. So I chose to experiment with Arduino first. I know 
*nothing* about either at the moment. Still in the learning, Googling, 
asking stupid questions, etc. phase. :)


I think my mindset also came from my days of trying to program the 
WowWee RoboSapien RS Media (ARM/Linux with Java). That was like a fully 
programmable computer and robot all in one.


I don't mind using C, but am pretty bad at it. Maybe this is the time to 
finally get better at it.




Re: Arduino and Python or gcc compiler?

2018-07-22 Thread deloptes
cyaiplexys wrote:

> Well, since I use Debian I assumed this would be a place to ask what to
> get from the Debian repo that would help in achieving my goal. But you
> do make a good point. I'll have to find some Arduino forums to ask some
> questions in because I'm quite sure I'll have a lot of them.

Sure Arduino forums will be useful when you have specific Arduino questions.
Related to debian you have this page
https://wiki.debian.org/Arduino
It looks like it gives you the connection to the arduino board /dev/ttyACM0.

Next CPUs - IMO you definitely need to know for which CPU you develop code
https://www.arduino.cc/en/Products/Compare
but it could be that the IDE hides this.

Salt it with some background knowledge
https://www.arduino.cc/en/Tutorial/Foundations

It is not a one day exercise, but it may be fun.

I did AVR for a hobby. I bought few types of AVR chips a dev board, that I
had to soldier myself and a programmer (total cost ~ €25,-). It took me
some time to understand how the programmer is to be used with the board and
how it is intended to work on linux. I guess it was two weekends that I
spent reading and trying. Finally Enlightment was there and voila, I can
write, compile, flash and run the MCs. Altogether it spanned over 8 months
because of job and family. I think the total time spent was about 1 month
though.
So it depends on your level and skill. It might take months or hours, but at
the end you will be an expert.
It might be also worth learning some C. I am not sure how python compiles
low level code, but I guess it comes with overhead. Given the amount of
memory available, it might be wise to keep low footprint. Also you do not
need to know a lot of details. Focus is on bitwise operations that are used
when working with bits. But there are very good examples, so if you have an
understanding of the concept of C language, it shouldn't be a big
challenge.

good luck








Re: Arduino and Python or gcc compiler?

2018-07-22 Thread Joe
On Sat, 21 Jul 2018 18:15:12 -0400
cyaiplexys  wrote:

> I am getting the Elegoo Super Starter Kit (Arduino Uno R3) to tinker 
> with (it's on order as of when I'm writing this post).
> 
> I looked in the Debian repos for stuff on Arduino and didn't find
> much (at least not of interest to me).
> 
> I did download the IDE from Elegoo and their tutorials and libraries. 
> But it's all in C/C++. While I do know C and C++ (to some extent),
> I'm very bad at it (I admit to not using it very much, maybe once
> every other blue moon and lately we haven't had any blue moons that
> warranted using C).
> 
> I recently been doing stuff in Python (especially for work, which is
> not Arduino related in any way). I am really getting to like Python.
> I have created my own Python Libraries for other things (again
> unrelated) and even compiled them to .so (binary) using the 'cython'
> compiler.
> 
> While I could create C source of a Python script using cython, I
> don't know how to compile the resulting C source and upload it to the
> Arduino board. I would like to use gcc.
> 
> Is there a cross-platform compiler for Arduino and gcc that anyone
> has had experience with that works or they can recommend?
> 
> Or some way to program in Python?
> 


Sure if I was going there I wouldn't be after starting from here...

I've seen your later post, and you may indeed be overestimating what
the Arduino can do, it's basically a very well developed ecosystem for
a microcontroller, with lots of real-world interfaces available. Just
for tinkering with electronics, it's fine.

If you're after a more powerful (i.e. PC-like) tinkering gadget, you
might be better looking at the Raspberry Pi (Pi for Python) and the
subsequent similar devices. More expensive than the Arduino, but still
pretty cheap. The Pi runs more than one OS, but the Raspbian version of
Debian is probably most widely-used. The Pi also has a great many
interface devices available, and Python is the expected scripting
language.

-- 
Joe



Re: Arduino and Python or gcc compiler?

2018-07-21 Thread cyaiplexys

On 07/21/2018 09:01 PM, David Christensen wrote:

On 07/21/18 15:15, cyaiplexys wrote:
I am getting the Elegoo Super Starter Kit (Arduino Uno R3) to tinker 
with (it's on order as of when I'm writing this post).


I looked in the Debian repos for stuff on Arduino and didn't find much 
(at least not of interest to me).


I did download the IDE from Elegoo and their tutorials and libraries. 
But it's all in C/C++. While I do know C and C++ (to some extent), I'm 
very bad at it (I admit to not using it very much, maybe once every 
other blue moon and lately we haven't had any blue moons that 
warranted using C).


I recently been doing stuff in Python (especially for work, which is 
not Arduino related in any way). I am really getting to like Python. I 
have created my own Python Libraries for other things (again 
unrelated) and even compiled them to .so (binary) using the 'cython' 
compiler.


While I could create C source of a Python script using cython, I don't 
know how to compile the resulting C source and upload it to the 
Arduino board. I would like to use gcc.


Is there a cross-platform compiler for Arduino and gcc that anyone has 
had experience with that works or they can recommend?


Or some way to program in Python?

I'll use C/C++ until I can figure the Python stuff out. But I really 
would like to be able to use Python at some point.


It sounds like your intended use is as a hobbyist (?).


Yes. I heard about it and got curious. I liked tinkering with 
electronics back in the day and kinda wondered what this is about. It's 
just basically for my own fun. I don't expect to make something the 
world can't live without or anything like that.



STFW for Arduino Uno R3: >
https://store.arduino.cc/arduino-uno-rev3

Microcontroller ATmega328P

Flash Memory 32 KB (ATmega328P) of which 0.5 KB used by bootloader

SRAM 2 KB (ATmega328P)

EEPROM 1 KB (ATmega328P)

Clock Speed 16 MHz



STFW for the CPU:

http://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-42735-8-bit-AVR-Microcontroller-ATmega328-328P_Datasheet.pdf 



The Atmel® picoPower® ATmega328/P is a low-power CMOS 8-bit
microcontroller based on the AVR® enhanced RISC architecture.

STFW for embedded Python:

https://www.usenix.org/system/files/conference/atc12/atc12-final30.pdf

This  paper  presents  one  mechanism  for  doing  so:
an  efficient  embedded  Python  run-time  system  named
Owl. The Owl system is a complete Python development
toolchain and run-time system for microcontrollers that
do not have enough resources to run a real operating sys-
tem, but are still capable of running sophisticated soft-
ware systems.  These microcontrollers typically operate
at 50–100 MHz, have 64–128 KB of SRAM, and have
up  to  512  KB  of  on-chip  flash.


Note that the frequency, RAM, and ROM requirements for embedded Python 
exceed what is provided by the Arduino Uno.  So, that explains why I 
also find no solutions for Python on the Arduino Uno R3.



If you want an embedded kit that can do Python (2 or 3?), your best bet 
is to get a kit that supports Python OOTB:


https://wiki.python.org/moin/EmbeddedPython


Getting a kit that supports Linux OOTB would give you even more options:

https://www.linux.com/news/top-10-open-source-linux-boards-under-200


Lots of info there. Well, glad it's possible. Looks like it'll take some 
doing though. Obviously there won't be anything in Debian's Repo for it 
like I hoped.


Thank you for giving me some ideas on what to look for. That'll keep me 
busy for awhile!




Re: Arduino and Python or gcc compiler?

2018-07-21 Thread cyaiplexys

On 07/21/2018 07:36 PM, deloptes wrote:

Hi, how old are you?
The way you wrote is supposing you are New Gen kid.


Why thank you! :) Actually, physically I'm over half a century old. I 
just try to keep a young mind. I'm a New Gen kid to all this new tech 
stuff though.



Anyway few answers inline

cyaiplexys wrote:


I am getting the Elegoo Super Starter Kit (Arduino Uno R3) to tinker
with (it's on order as of when I'm writing this post).

I looked in the Debian repos for stuff on Arduino and didn't find much
(at least not of interest to me).



What did you expect to find exactly?


*gulp* Python libraries? Cython compiler for the Arduino CPU?

When I wrote this I didn't know exactly what I'm getting into. I heard 
of Arduino and had the impression it's an ARM or ARM-type processor on a 
board and you can interact with your electronic circuits you build with 
it and a computer. After writing the post I went and looked up some 
YouTube tutorials for beginners. I probably should have done that first 
before inserting foot in mouth. :-/



I did download the IDE from Elegoo and their tutorials and libraries.
But it's all in C/C++. While I do know C and C++ (to some extent), I'm
very bad at it (I admit to not using it very much, maybe once every
other blue moon and lately we haven't had any blue moons that warranted
using C).



Well for low level programming mostly C is used actually.
New things to learn -> write a list with dependencies and priorities.

:

More to learn -> add to the list
I did not have a look at Arduino but played with AVR chip programming, so
sure there is for Arduino as well.


I'll remain hopeful. I'm going to have a long list of things I'll want 
to learn.



Or some way to program in Python?

I'll use C/C++ until I can figure the Python stuff out. But I really
would like to be able to use Python at some point.


Finally you are on the wrong user list. This is general debian user list and
we discuss only debian related questions.
IMO Arduino and related should be somewhere else.


Well, since I use Debian I assumed this would be a place to ask what to 
get from the Debian repo that would help in achieving my goal. But you 
do make a good point. I'll have to find some Arduino forums to ask some 
questions in because I'm quite sure I'll have a lot of them.




Re: Arduino and Python or gcc compiler?

2018-07-21 Thread David Christensen

On 07/21/18 15:15, cyaiplexys wrote:
I am getting the Elegoo Super Starter Kit (Arduino Uno R3) to tinker 
with (it's on order as of when I'm writing this post).


I looked in the Debian repos for stuff on Arduino and didn't find much 
(at least not of interest to me).


I did download the IDE from Elegoo and their tutorials and libraries. 
But it's all in C/C++. While I do know C and C++ (to some extent), I'm 
very bad at it (I admit to not using it very much, maybe once every 
other blue moon and lately we haven't had any blue moons that warranted 
using C).


I recently been doing stuff in Python (especially for work, which is not 
Arduino related in any way). I am really getting to like Python. I have 
created my own Python Libraries for other things (again unrelated) and 
even compiled them to .so (binary) using the 'cython' compiler.


While I could create C source of a Python script using cython, I don't 
know how to compile the resulting C source and upload it to the Arduino 
board. I would like to use gcc.


Is there a cross-platform compiler for Arduino and gcc that anyone has 
had experience with that works or they can recommend?


Or some way to program in Python?

I'll use C/C++ until I can figure the Python stuff out. But I really 
would like to be able to use Python at some point.


It sounds like your intended use is as a hobbyist (?).


STFW for Arduino Uno R3:

https://store.arduino.cc/arduino-uno-rev3

Microcontroller ATmega328P

Flash Memory32 KB (ATmega328P) of which 0.5 KB used by bootloader

SRAM2 KB (ATmega328P)

EEPROM  1 KB (ATmega328P)

Clock Speed 16 MHz


STFW for the CPU:

http://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-42735-8-bit-AVR-Microcontroller-ATmega328-328P_Datasheet.pdf

The Atmel® picoPower® ATmega328/P is a low-power CMOS 8-bit
microcontroller based on the AVR® enhanced RISC architecture.


STFW for embedded Python:

https://www.usenix.org/system/files/conference/atc12/atc12-final30.pdf

This  paper  presents  one  mechanism  for  doing  so:
an  efficient  embedded  Python  run-time  system  named
Owl. The Owl system is a complete Python development
toolchain and run-time system for microcontrollers that
do not have enough resources to run a real operating sys-
tem, but are still capable of running sophisticated soft-
ware systems.  These microcontrollers typically operate
at 50–100 MHz, have 64–128 KB of SRAM, and have
up  to  512  KB  of  on-chip  flash.


Note that the frequency, RAM, and ROM requirements for embedded Python 
exceed what is provided by the Arduino Uno.  So, that explains why I 
also find no solutions for Python on the Arduino Uno R3.



If you want an embedded kit that can do Python (2 or 3?), your best bet 
is to get a kit that supports Python OOTB:


https://wiki.python.org/moin/EmbeddedPython


Getting a kit that supports Linux OOTB would give you even more options:

https://www.linux.com/news/top-10-open-source-linux-boards-under-200


David



Re: Arduino and Python or gcc compiler?

2018-07-21 Thread deloptes
Hi, how old are you?
The way you wrote is supposing you are New Gen kid.
Anyway few answers inline

cyaiplexys wrote:

> I am getting the Elegoo Super Starter Kit (Arduino Uno R3) to tinker
> with (it's on order as of when I'm writing this post).
> 
> I looked in the Debian repos for stuff on Arduino and didn't find much
> (at least not of interest to me).
> 

What did you expect to find exactly?

> I did download the IDE from Elegoo and their tutorials and libraries.
> But it's all in C/C++. While I do know C and C++ (to some extent), I'm
> very bad at it (I admit to not using it very much, maybe once every
> other blue moon and lately we haven't had any blue moons that warranted
> using C).
> 

Well for low level programming mostly C is used actually.
New things to learn -> write a list with dependencies and priorities.

> I recently been doing stuff in Python (especially for work, which is not
> Arduino related in any way). I am really getting to like Python. I have
> created my own Python Libraries for other things (again unrelated) and
> even compiled them to .so (binary) using the 'cython' compiler.
> 

More to learn -> add to the list

> While I could create C source of a Python script using cython, I don't
> know how to compile the resulting C source and upload it to the Arduino
> board. I would like to use gcc.
> 
More to learn -> add to the list

> Is there a cross-platform compiler for Arduino and gcc that anyone has
> had experience with that works or they can recommend?
> 
More to learn -> add to the list
I did not have a look at Arduino but played with AVR chip programming, so
sure there is for Arduino as well.

> Or some way to program in Python?
> 
> I'll use C/C++ until I can figure the Python stuff out. But I really
> would like to be able to use Python at some point.

Finally you are on the wrong user list. This is general debian user list and
we discuss only debian related questions.
IMO Arduino and related should be somewhere else.

regards



Arduino and Python or gcc compiler?

2018-07-21 Thread cyaiplexys
I am getting the Elegoo Super Starter Kit (Arduino Uno R3) to tinker 
with (it's on order as of when I'm writing this post).


I looked in the Debian repos for stuff on Arduino and didn't find much 
(at least not of interest to me).


I did download the IDE from Elegoo and their tutorials and libraries. 
But it's all in C/C++. While I do know C and C++ (to some extent), I'm 
very bad at it (I admit to not using it very much, maybe once every 
other blue moon and lately we haven't had any blue moons that warranted 
using C).


I recently been doing stuff in Python (especially for work, which is not 
Arduino related in any way). I am really getting to like Python. I have 
created my own Python Libraries for other things (again unrelated) and 
even compiled them to .so (binary) using the 'cython' compiler.


While I could create C source of a Python script using cython, I don't 
know how to compile the resulting C source and upload it to the Arduino 
board. I would like to use gcc.


Is there a cross-platform compiler for Arduino and gcc that anyone has 
had experience with that works or they can recommend?


Or some way to program in Python?

I'll use C/C++ until I can figure the Python stuff out. But I really 
would like to be able to use Python at some point.