programming with windows 10 and arduino.

Thread Starter

denison

Joined Oct 13, 2018
163
Hi all, I have been very successful in programming the nano board and have made several very useful programs with external inputs and outputs from the board. I made the analog circuits that achieve the same results many years ago but wanted to do the microcontroller solution to keep the people happy who think everything should be done with digital electronics.
Now I find I need to make the programming much more detailed to accomplish much more. The problem here of course is that you have limited space on the Atmega 328p microcontroller. I am considering the idea of using my windows 10 Lenova laptop and the arduino programming to run the external devices rather than the Atmega.
Is there a way to do this? I am considering using the programming language 'pure basic'. But why use a different language now that I have become proficient in arduino?
There will of course be the problems of getting data in and out of the laptop which I have no idea how to do it.
 

dl324

Joined Mar 30, 2015
12,224
Now I find I need to make the programming much more detailed to accomplish much more. The problem here of course is that you have limited space on the Atmega 328p microcontroller.
I'd look for ways to reduce memory usage. You can save by not using the canned functions to use the I/O ports. You may also be able to reduce memory usage by using defines instead of variables. Or you could switch to an Arduino Mega that has 8X the memory of an Uno.
 

MrChips

Joined Oct 2, 2009
22,505
Don't use floating point arithmetic.
Avoid using library functions and write your own so that you have control on space usage.
 

djsfantasi

Joined Apr 11, 2010
7,210
First, what memory are you running out of? Flash or RAM?

Put any fixed text used in print statements in the F() function. It takes them out of RAM and stored them in Flash memory.

Look up the PROGMEM keyword. It does something similar for large arrays of static data.

Upgrade to the Mega.
 

Thread Starter

denison

Joined Oct 13, 2018
163
hi den,
If I read you correctly, you want to create a virtual Arduino in your Windows PC.??
E
Yes Eric I suppose this is what I want. Basically I want to use arduino programming on my laptop which has large amounts of RAM to input and output data to control external devices. I have become interested in self driving cars and the amount of sensor data you will be receiving will never be able to be managed by arduino nano, uno or even mega.
Our brain manages very well as an onboard computer using visual data only. It seems to me that the technology of radar and lidar seems a bit excessive. Our brain does not contain radar or lidar but we still manage to drive ok and avoid obstacles.
 

Thread Starter

denison

Joined Oct 13, 2018
163
hi den,
If I read you correctly, you want to create a virtual Arduino in your Windows PC.??
E
From "stack exchange" forum got the difference between the meaning of emulator and simulator. Now a virtual Arduino would be like Ltspice in which you can simulate an arduino circuit. For example it would show the blinking led in this sketch and the circuit connections, resistors etc. However it cannot blink a real led just as a simulated Ltspice circuit cannot run the real circuit. It only runs a virtual circuit.
Now what is an emulator of the blinking led sketch. An example would be an analog circuit to blink the led using a capacitor. Another example that I am interested in is using my pc to blink the led without the arduino board but still using the arduino code.
So what I want to do is emulate the blinking led sketch from my pc without uploading the sketch to the arduino board. The advantages of this would be much more programming space for longer sketches.
If the creators of arduino can do this it would be a mega improvement in arduino.
 

Wolframore

Joined Jan 21, 2019
2,183
Why use Arduino code at that point? just program in python, you really need to get a raspberry pi, you can run Linux and blink whatever you want and run an HDMI screen while doing tons of other things... with or without screens, keyboards, etc, the point of the Arduino and tiny microcontrollers is to be small devices designed to do simple tasks fast... if you need more there are bigger chips out there. For instance it has more than enough capability to run a DRO system on a machine, read RPM, positions in multiple axis...etc and run multiple digital displays. I believe the MEGA has been used to run 3D printing machines. But if you need more room for video or heavy audio programming there are other chips.
 

Thread Starter

denison

Joined Oct 13, 2018
163
Why use Arduino code at that point? just program in python, you really need to get a raspberry pi, you can run Linux and blink whatever you want and run an HDMI screen while doing tons of other things... with or without screens, keyboards, etc, the point of the Arduino and tiny microcontrollers is to be small devices designed to do simple tasks fast... if you need more there are bigger chips out there. For instance it has more than enough capability to run a DRO system on a machine, read RPM, positions in multiple axis...etc and run multiple digital displays. I believe the MEGA has been used to run 3D printing machines. But if you need more room for video or heavy audio programming there are other chips.
 
Top