Show Posts
Pages: [1] 2 3 ... 5
1  Using Arduino / Project Guidance / Why does Leonardo change com ports? on: July 13, 2013, 11:02:22 pm

This is my first experience with the Arduino Micro with the AtMega32u4.

I have been working with the Mouse and Keyboard library.

  When I program a sketch from my PC theUSB port is COM20.
  When the sketch runs, the USB port changes to COM21.
  When I re-program the same sketch, the port changes back to COM20, the part is re-programmed, then it changes to port COM21 again while the sketch is running.

But when I have a sketch which calls the Mouse or Keyboard library functions it never returns to port 20 to allow me to re-program it. It just times out with an error. In this case have to connect it to an STK600, erase the program and re-programming the boot loader.

This just can't be normal.

What am I missing concerning the use of the Mouse and Keyboard libraries?

2  Using Arduino / Programming Questions / Re: the F() function? on: January 19, 2013, 10:26:06 pm

I just found this in WString.h (the last file in the list - Murphy's law), but your explanation is what I really needed.

#define F(string_literal) (reinterpret_cast<__FlashStringHelper *>(PSTR(string_literal)))

3  Using Arduino / Programming Questions / Re: cant connect my Arduino with my iPad HELP ME! on: January 19, 2013, 10:19:48 pm
I have heard that it is almost impossible to communicate with the iPad because of Apple's proprietary stance on peripherals. Have you tried to go through the Apple developer channels on this? You may find that you need to put up a lot of $$$ to get this simple task completed.
4  Using Arduino / Programming Questions / the F() function? on: January 19, 2013, 10:14:46 pm
Has anyone seen this before? I can't find it in the docs.

Serial.println( F("What is this for?") );

5  Using Arduino / Microcontrollers / Re: What does the bootloader boot? on: July 30, 2012, 07:09:45 am
this looks like the official answer to your questions ...

6  Using Arduino / Microcontrollers / Re: variant for Mega644 in 44pin TQFP package on: July 30, 2012, 06:39:13 am
So, what do I do about a boot loader? I have tried an omniboot version for the 644 and it doesn't work. The bootl loader that comes with the maniac guy's code doesn't like the 644's signature bytes.

I feel that one way to solve this problem is to have control over the boot code, and that means compiling it myself.
I wrote a boot loader that works well with Arduino021, but it doesn't talk to Arduino1.0.1 either. That was two years ago and I forgot how I did it. I need a memory jog here.

So what'do I do? I keep asking for help on how to set up an environment for compiling a boot loader until I find one.

I see that this thread has moved from asking for variant files to this, so maybe I should start a new thread?

Apparently, I am asking for something that this forum is not allowed to provide.,53319.0.html
7  Using Arduino / Microcontrollers / Re: variant for Mega644 in 44pin TQFP package on: July 29, 2012, 01:04:19 pm
Thanks for that.

What I don't know how to do is compile it.  How do I execute the makefile?

I don't think my PC is set up to just type in make from the bootloader folder. What needs to be set up for make to work?

Is make the best choice? I have heard of cmake?
8  Topics / Home Automation and Networked Objects / Re: home distillation project on: July 28, 2012, 07:04:04 pm
This is just an opinion from someone who has been there and done that.

Building a PID controller is your goal. You can purchase them from several sources and re-sellers. Blichman Engineering comes to mind, based in Lafayette Indiana. Just do a web searh for PID controllers and you'll see the various manufacturers.

After you discover the detail that is needed to build a good PID temperature controller you may also discover that you are embarking on a one or two year project. The temperature proble for instance must be able to deliver the accuracy that you need to maintain a constant temperature plus or minus 0.1 degree F. You'll need to write code that builds a closed loop system where you constantly read the temperature and change the heat source to adjust the temp up/down. Like Chagrin said, you should probably buy these.

Then you have to decide whether the heating source should be gas or electric. If you choose gas, then your best path would be to purchase one. The gas burner controls are heavy with safety features that you do not want to learn about the hard way. If you go with electric heat, then you are going to have to build or purchase a high power SSR (Solid State Relay) that you can control with PWM.

Good luck with the project. Take the first year learning how to build any kind of control with the Arduino. That will give you enough experience to know whether you will need an UNO or a Mega2560.
9  Topics / Home Automation and Networked Objects / Re: home distillation project on: July 28, 2012, 06:49:39 pm
FYI: The department of Alcohol Tobacco and Firearms (ATF) will give you a premit to distill up to 10,000 gallons of ethanol per year.

Ethanol can be used do fuel your flex vehical, with a minor adjustment to the engine control calibration.

Maybe this project should be turned toward a more universal problem which is fuel for your car or truck.
10  Using Arduino / Installation & Troubleshooting / Re: Defective Mac IDE Install--Problem Solved on: July 28, 2012, 04:24:18 pm

You should not modify your core installation however (the
You install libraries by copying them to the libraries folder in your personal sketch folder.

That could make it difficult to maintain two versions of the Ardiono environment.

11  Using Arduino / Storage / Re: undocumented classes Sd2Card, SdVolume and SdFile on: July 28, 2012, 03:56:48 pm

If they don't want us to use these classes, then they should take them out of the example code that comes with the SD library.

CardInfo is the first example in the list and it uses the SdFat utility functions exclusively ...
// set up variables using the SD utility library functions:
Sd2Card card;
SdVolume volume;
SdFile root;

Does this mean that the SD classes cannot get the job done?

(Datalogger, Dumpfile, Files, and ReadWrite are using the SD classes)

Actually, it seems that using SdFat directly would be a better solution until the SD library improves.

12  Using Arduino / Microcontrollers / Re: What does the bootloader boot? on: July 28, 2012, 03:36:14 pm
would a reset not start the program without needing a bootloader?

Of couse it would. The idea is that the bootloader is there when you are ready to change the flash code during product development.
You just talk to the Arduino board through the USB connector and download a new flash program. Since you are connected to the Arduino, you have opportunity to send debug messages back to the 'IDE'.

They came up with a very small boot loader they call Omniboot. I think that it is less than 1k bytes, maybe smaller.
That doesn't take away a lot of your flash space, unless you are using a very small micro like a Tiny85.

I assume an ISP device would download the program from the IDE into the flash memory as well?

Yes, I have heard that you can use an ISP programmer and download code to the Arduino from the IDE. It probably is incinvenient, mostly because there is no way to talk back to the IDE through such a device. Otherwise, it programs the part just as well asn anything else.

I use an ISP device to program my production versions of the products. There is no need for a boot loader there.
An ISP device is actually not inconvenient at all in this context. It has its place.

So, the bootloader is very convenient for making program changes during a development period and the ISP programmer is best for mass production. The ISP programmer that I use is actually an Arduino Mega1280. It takes care of all of the necessary changes including setting the fuse bits, writing flash and EEProm memory and then locking the part so that no further changes can be made without erasing the entire chip. Works great.

13  Using Arduino / Microcontrollers / Re: variant for Mega644 in 44pin TQFP package on: July 28, 2012, 03:27:26 pm
Thanks. That looks like an almost match for what I need.

The bootloader expects to see a 1284 and I have a lot of 644 hardware. So I'll need to alter the boot code.

Can you tell me how to recompile the boot code on a Windows PC?
Not sure how to go about it.
14  Development / Suggestions for the Arduino Project / Re: Make Arduino Windows work like Arduino Mac on: July 28, 2012, 12:28:39 am
Well, I did figure out the conflict, and it does not make the task any easier.

My sketches are in a folder named 'Arduino Projects'. I recently installed Arduino 1.0.1 to try to catch up with the rest of the world. Since the new version did not directly support my processor (Mega644) I searched for someone who had modified version 1.0.1 and found one. They asked me to put their files in a folder named 'hardware' inside of my sketches folder. That seemed to work great for version 1.0.1, but ...

All of the versions previously installed use the same skatches folder, and they also looked at that new 'hardware' folder and tried to interpret the stuff in it. When they could not, they spit out errors upon errors. So, I have to remove the new 'hardware' folder to use the older versions. 

Here is a partial listing of the errors I get when running Arduino_0021 with the version 101 'hardware' folder. The line in bold is the clue here.

E:\Arduino Projects\Arduino\arduino-0021\arduino-0021\hardware\tools\avr\bin\avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega644p -DF_CPU=8000000L -DARDUINO=21 -IE:\Arduino Projects\hardware\mighty-1284p\cores\arduino -IE:\Arduino Projects\Arduino\arduino-0021\arduino-0021\libraries\SoftwareSerial -IE:\Arduino Projects\Arduino\arduino-0021\arduino-0021\libraries\SoftwareSerial\utility E:\Arduino Projects\Arduino\arduino-0021\arduino-0021\libraries\SoftwareSerial\SoftwareSerial.cpp -oC:\Users\James\AppData\Local\Temp\build4082915697125474477.tmp\SoftwareSerial\SoftwareSerial.cpp.o
E:\Arduino Projects\Arduino\arduino-0021\arduino-0021\libraries\SoftwareSerial\SoftwareSerial.cpp:24:24: error: WConstants.h: No such file or directory
E:\Arduino Projects\Arduino\arduino-0021\arduino-0021\libraries\SoftwareSerial\SoftwareSerial.cpp: In member function 'void SoftwareSerial::begin(long int)':
E:\Arduino Projects\Arduino\arduino-0021\arduino-0021\libraries\SoftwareSerial\SoftwareSerial.cpp:51: error: 'HIGH' was not declared in this scope

I suppose that the same problem will occur on the Mac platform.

So, the suggestion stands, in a modified form. Instead of 'make the PC like the Mac' how about this

Make it possible to have multiple versions of Arduino without any cross linking or conflicts.
Put all modifications to the installed version inside of the installed version folder and don't allow overrides like putting a 'hardware' folder in a common folder like the sketches folder.
15  Development / Other Software Development / Re: how to generate an asm program listing on: July 27, 2012, 11:35:08 pm
It looks to me like objdump will do what I need.


I really would like to be able to run the compiler manually on a file or two, so thanks for the compiler switches.
Not interested in running a makefile on Windows, excepting for the experience gained.

So, where do I find objdumP? A leading question indeed as there are many copies on my PC. Why so many? Who knows?

There is C:\WinAvr-20100110, C:\WinAVR-20090313, C:\Program Files (x86)\Atmel\AVR Tools\AVR Toolchain\bin; and then there is the one inside of the Arduino installation down in E:\Arduino Projects\Arduino\arduino-0021\arduino-0021\hardware\tools\avr.

Pages: [1] 2 3 ... 5