AVR Studio 7, and importing/compiling/debuging Arduino Sketches?

Go To Last Post
10 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Howdy All!,

 

I see in the liner notes the new version of Atmel Studio 7, had the ability to import and run Arduino sketches.  However I'm not finding any instructions just how to to this?

 

Is anyone aware of proper procedure, and if it works or not?

 

Best,

 

Rando

 

Ps. FYI, The X-plained 328 pb, is detected by the AVR Studio 7 (Windows 10), where it was not by 6.2 sp2, compiles, and debugs OK, programming seems very slow.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hey I just found it!

 

File > New Project > Create new project from Arduino Sketch

 

EZPZ

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks!

 

Here's a screencap of a simple sketch I downloaded almost at random, to work with a magnetic pendulum.

 

#define THRESHOLD 10
#define PUSH_TIME 30
#define A_PIN  A0

void setup() {
  pinMode(A_PIN,INPUT);
  analogReference(INTERNAL);
}

void loop() {
  if(analogRead(A_PIN)>THRESHOLD) {
    pinMode(A_PIN,OUTPUT);
    digitalWrite(A_PIN,HIGH);
    delay(PUSH_TIME);
    pinMode(A_PIN,INPUT);
  }
  delay(1);
}

 

 

 

 

 

It's clear the import sketch function makes all sorts of interesting decisions about what libraries to include, and how to light off the project. Much to learn here.

 

I want to get the X-plain 328pb in the loop with this. True hardware step by step debugging of Arduino sketches, inexpensively, seems almost in reach!

 

Rando

Last Edited: Fri. Oct 2, 2015 - 11:51 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I tried to import a project last night but failed at first. The import did not add the Arduino.h in one of the files, as a result it didn't know about uint8_t etc.

 

After a bit of fiddling around I manually added the line and it all compiled correctly.

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I'm wondering what this new capability in AVR Atmel Studio 7 means for the public perception of the legitimacy of the Arduino ecosystem?

 

R.,

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Horses for courses?? "Electronics challenged people" who like "baby talk for potheads" (Copyright of quoted text belong to their respective authors...) will still use the Arduino ecosystem.

 

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Is it that we can write a code in arduino ide for arduino mega 2560 and then using this option of importing arduino sketch can i create hex file and burn it onto a customised atmega 2560 board using usb asap programmer?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yes.
But it is considerably easier to just use the Arduino IDE.
Choose upload with external programmer (USBASP) instead of bootloader.
.
David.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Using that can we burn arduino code on atmega 2560 mini customised board by nex robotics as i dont have any idea on that?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

And serial communication via Bluetooth between arduino and customised board gave me a lag of 4 sec i dont know why but will even coding my customised board via arduino ide will give me the same lag when i do serial communication with customised board?