Speeduino is now on Github Sponsors (Rather than Patreon): https://github.com/sponsors/noisymime
For any add-on boards such as VR conditioners, optos and OEM interface boards
User avatar
By antonyu
#27639
PSIG wrote:
Tue Aug 07, 2018 7:45 pm
UNO R2? I don't recall when they went from the old 2kb to the newer 0.5kb bootloader :?: but Ardu-Stim nearly fills an R3's flash, and the old bootloader size would make the difference too small. Maybe that's it? There may be some clue in the verbose output on compiling between available space and compiled code size, or load Blink and see how much space remains and calculate it. If it loads onto a Mega, then the code is good, and you may need to load a new bootloader on your old R2. Maybe.
:?
David
Have also looking into this and haven't got the R3 bootloader on the R2 since it seems to be a little tricky.

Regarding the Verbose and space available:
Sketch uses 30042 bytes (93%) of program storage space. Maximum is 32256 bytes.
Global variables use 1128 bytes (55%) of dynamic memory, leaving 920 bytes for local variables. Maximum is 2048 bytes.


It should be enough no? Even with R2 bootloader. ("30042 bytes (93%) of program storage space" is without bootloader?)
User avatar
By antonyu
#27641
After trying too many things but before grabbing the credit card to order another Arduino, I moded this UNO R2 into R3 spec (just a couple of diodes welded) just for the heck of it... no luck.

PSIG mentioned the bootloader and that pushed me to flash a new bootloader.

I used the oldie AVRISP MKII programer with the Atmel Studio. The hex was optiboot_atmega328.hex
Too easy without messing with fuses or anything.

Back to Arduino IDE
Writing | ################################################## | 100% 4.86s

avrdude: 30042 bytes of flash written
avrdude: verifying flash memory against C:\Users\XXX\AppData\Local\Temp\arduino_build_175426/ardustim.ino.hex:
avrdude: load data flash data from input file C:\Users\XXX\AppData\Local\Temp\arduino_build_175426/ardustim.ino.hex:
avrdude: input file C:\Users\XXX\AppData\Local\Temp\arduino_build_175426/ardustim.ino.hex contains 30042 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 3.85s

avrdude: verifying ...
avrdude: 30042 bytes of flash verified

avrdude done. Thank you.


It uploaded without any error :mrgreen:

Going to call it a day before any more testing but have to thank you guys for all the help :)
By Lays
#27792
How the f*** am I supposed to get this to compile for Uno when I can't get under 33482 bytes (103%) by commenting everything but one wheel pattern from wheel_defs.h?
User avatar
By PSIG
#27795
Lays wrote:
Mon Aug 13, 2018 6:35 pm
How the f*** am I supposed to get this to compile for Uno when I can't get under 33482 bytes (103%) by commenting everything but one wheel pattern from wheel_defs.h?
Hello, Lays! Welcome to the f***ing forums. :lol: If you altered the Arduino IDE for compiling -Os to -O3 parameter as outlined in the Wiki here, change it back so it compiles to a smaller size. That's usually the issue with files too large, anyway. If no joy, post the version of Ardu-Stim you're trying.

David
By Sagal89
#34255
apollard wrote:
Thu Jan 19, 2017 3:14 pm
dirtyharry wrote: Where abouts in the program is the commented out code for a pot control. Have got it all working and have pre-set the wheel like yourself but I really don't want the gui.

Loosing the will to live with this massively over complicated simulator , many thanks to the creator but something simpler with possibly an lcd display would have been more usable for myself.

Open Ardustim, then click on the Loop.cpp tab. Find the following code:
/* if (adc0_read_complete == true)
{
adc0_read_complete = false;
tmp_rpm = adc0 << TMP_RPM_SHIFT;
if (tmp_rpm > TMP_RPM_CAP)
tmp_rpm = TMP_RPM_CAP;
reset_new_OCR1A(tmp_rpm);
}
*/
Un-comment the code by deleting the /* and */ so that it reads
if (adc0_read_complete == true)
{
adc0_read_complete = false;
tmp_rpm = adc0 << TMP_RPM_SHIFT;
if (tmp_rpm > TMP_RPM_CAP)
tmp_rpm = TMP_RPM_CAP;
reset_new_OCR1A(tmp_rpm);
}
I believe that is the only change I made. It defaults to the pot on A0 (adc0) after 5 seconds IF there is no serial connection. So, you must power the auduino via the Vin pin or +5V pin, not the USB.
Hello friends,
this isn't working for me. I've been trying all things but i have this error:

sketch\loop.cpp: In function 'void loop()':

loop.cpp:47:7: error: 'adc0_read_complete' was not declared in this scope

if (adc0_read_complete == true)

^

loop.cpp:50:5: error: 'tmp_rpm' was not declared in this scope

tmp_rpm = adc0 << TMP_RPM_SHIFT;

^

loop.cpp:50:15: error: 'adc0' was not declared in this scope

tmp_rpm = adc0 << TMP_RPM_SHIFT;

^

exit status 1
'adc0_read_complete' was not declared in this scope


I don't understant why... Anyone knows??????

thx
User avatar
By PSIG
#34261
@Sagal89 - look at the outline by Linkus here: How to get Ardustim working with a POT for RPM MAP and TPS

If no joy, I'll post the sketch I use on a Nano with a potentiometer glued on-top. :lol: Remember, it cannot be connected by USB for the pot to work. Powering it from the Speeduino is simplest and ensures good grounding between the Ardu_Stim and the Speeduino.

David
By Sagal89
#34268
PSIG wrote:
Wed May 01, 2019 12:40 am
@Sagal89 - look at the outline by Linkus here: How to get Ardustim working with a POT for RPM MAP and TPS

If no joy, I'll post the sketch I use on a Nano with a potentiometer glued on-top. :lol: Remember, it cannot be connected by USB for the pot to work. Powering it from the Speeduino is simplest and ensures good grounding between the Ardu_Stim and the Speeduino.

David
Many thanks David, im going to try with this new information!!
User avatar
By tobbera
#34361
Thanks for the instructions. I have Ardu-stim up and running on a Arduino Nano and I have also managed to create my own wheel pattern. But how is the RPM Scaler used bellow?

/* Pointer to friendly name string, pointer to edge array, RPM Scaler, Number of edges in the array */
{ dizzy_four_cylinder_friendly_name, dizzy_four_cylinder, 0.03333, 4 },
{ dizzy_six_cylinder_friendly_name, dizzy_six_cylinder, 0.05, 6 },
{ dizzy_eight_cylinder_friendly_name, dizzy_eight_cylinder, 0.06667, 8 },
  • 1
  • 4
  • 5
  • 6
  • 7
  • 8
Fuel load calculation

Starting to look at the injectors properly now tha[…]

Kawasaki Concours 2.0

Having second thoughts about cutting a hole in my […]

I finally think I have almost crossed another hurd[…]

Weird TPS+voltage problem

it could be corruption in the tune. Can I suggest[…]

Still can't find what you're looking for?