Show Posts
Pages: 1 [2] 3 4 ... 519
16  Community / Bar Sport / Re: Where can I get expert advice on a 4G mobile broadband problem? on: September 28, 2014, 04:58:39 pm
Who's your carrier? You might be able to find someone local to do some side-by-side tests since you have your location information next to your name. My problem is more obvious. There is a big hole in coverage area and I'm in the middle of that hole. Keep driving until you get on college campus.
17  Community / Bar Sport / Re: Altium will soon be free on: September 28, 2014, 04:55:21 pm
You missed EAGLE 7 then. They first thought to use some more stringent licensing methods but then backed off and returned to honor based licensing. You can install on multiple computers with the same license code, if you are the sole user, of course smiley-wink. Since I am not designing larger boards, I stayed with occasionally dishing out $70 for a light license when the major version increments.

I admit that I'm stuck with EAGLE and unwilling to move away. Every hour I spend learning a new CAD software is an hour that I can do other stuff, like sleeping, finishing grading papers, playing with my son, or just bashing on the keyboard to have fun or make some money. Big opportunity cost to switch CAD software. I might get the full license in the future myself.
18  Using Arduino / Programming Questions / Re: Arduino Mega Serial Issue on: September 28, 2014, 04:07:05 pm
Got it working on another PC.  Reinstalled the USB driver and IDE on the original PC and that is now working too smiley

It seems it was lying when it said it had uploaded.  The TX light on the board was lit constantly.

Thanks for the help guys, already got my i2c lcd up and running smiley

Compiling is not uploading. Uploading is uploading. You can compile without any arduino attached to your PC. If you remove your arduino from PC, which COM port disappears from your port list? That should tell you which port has the MEGA on it. There is no reason you have to "try to open both ports". I recommend you get a MEGA2560 R3. The MEGA1280 board has numerous problems that you don't want to deal with in the future. When you are more familiar with arduinos, you can decide what to do with it. As for myself, I use mine to routinely set up real time clocks on shields I build and sell. It only does that one thing now.
19  Development / Other Hardware Development / I2C port expanders PCF8575C vs. MCP23017 on: September 28, 2014, 02:12:47 pm
I need a few extra I/O pins so I did some "research" online.

Sparkfun offers PCF8575C breakout board:

Adafruit sells MCP23008 and 23017 breakout boards:

I am comparing their specs (links on their sales pages). It seems MCP230xx has wider operating voltage range and has several interrupt options and higher max I2C bus speed (none really matters to my project). PCF8575C is a 5V chip and has open drain interrupt.

Price-wise it is the opposite. PCF is twice the price of MCP:

I must have omitted something here. So if you have used either or both, which do you recommend me use? I am sensing rotary encoders and buttons. I will end up using 8-bit expander.
20  Community / Bar Sport / Re: Altium will soon be free on: September 28, 2014, 12:27:44 pm
I'm already fully invested in Eagle with a Pro license, will not be changing to anything else for quite a while.

Good for you. I only have light license so I can only exceed size limit with my edu full license on my open source physics lab projects.

21  Using Arduino / Programming Questions / Re: Basic question: Unresponsive sketch bricks Leonardo or Micro? on: September 28, 2014, 08:20:25 am
Thanks. I counted about 7 seconds between bootloader starting and exiting. During this time its serial port is visible. Should i use this serial port to quickly upload a blink? My sketch will hang if it runs again.
22  Using Arduino / Programming Questions / Basic question: Unresponsive sketch bricks Leonardo or Micro? on: September 28, 2014, 02:59:21 am
Despite my experience with UNO and MEGA, I am only starting to develop projects with these 32U4 based arduinos. one thing I found out was that they brick a lot. Say I do a real time clock project code and the wire.begin() is stuck, maybe bad backup battery, then I couldnt use the board until I reflashed bootloader. Is this normal?

More serious question: if sketch is stuck, will arduino ide be able to reset the mcu at all? After all, there is just one chip. If it is stuck, its usb serial is stuck, too, right?
23  Using Arduino / Programming Questions / Re: Leonardo's USB CDC serial port on: September 28, 2014, 02:50:00 am
Thanks westfw. I might give up developing with 32U4 altogether. Loading sketches bricked my prototypes numerous times.
24  Using Arduino / Programming Questions / Re: Multiple functions for same button on: September 28, 2014, 01:02:19 am
In your code, you try to sense a button and then decide what to print on the LCD. That is mixing the two together. You will have a hard time adding a new button, replacing some menu content etc.
25  Using Arduino / Programming Questions / Re: Multiple functions for same button on: September 28, 2014, 12:20:33 am
Welcome to the forum!

Let me tell you what your mistake is: you should totally separate key inputs and menu print-outs. Also, I suspect that once you get your code working, you will attempt to merge your code with some project you intend to control with your menu, making it into a spaghetti monster.

To solve your problem, you should use existing libraries such as my phi_prompt library or libraries by others. If you want to make your own, you have a very long way to go. You need to first write libraries to handle button push correctly. You are NOT handling them correctly. Then you need to write functions that render menus and read buttons from the libraries that handle buttons. Finally the project code can go in, hopefully mixed with menu code in a minimal amount. Your project should work without the menu, which should not be the focus of your project.
26  Using Arduino / Programming Questions / Leonardo's USB CDC serial port on: September 27, 2014, 11:56:56 pm
I am learning how to effectively use Leonardo/Micro's USB CDC serial port for stuff. I need some help figuring out how to mimic UNO's restart when serial port opens.

After some experimentation, I realized that opening Leonardo's USB CDC serial port won't reset the processor. OK. I have to find software way to do it.

What I tried was using if(Serial). According to the description, Serial==TRUE when serial port opens:

I tried this with the ASCII table example code:

void setup() {
 //Initialize serial and wait for port to open:

// first visible ASCIIcharacter '!' is number 33:
int thisByte = 33;
// you can also write ASCII characters in single quotes.
// for example. '!' is the same as 33, so you could also use this:
//int thisByte = '!'; 

void loop() {
  if (thisByte==33) {
    while (!Serial) {
    ; // wait for serial port to connect. Needed for Leonardo only
  // prints title with ending line break
  Serial.println("ASCII Table ~ Character Map");
  // prints value unaltered, i.e. the raw binary version of the
  // byte. The serial monitor interprets all bytes as
  // ASCII, so 33, the first number,  will show up as '!'

  Serial.print(", dec: ");
  // prints value as string as an ASCII-encoded decimal (base 10).
  // Decimal is the  default format for Serial.print() and Serial.println(),
  // so no modifier is needed:
  // But you can declare the modifier for decimal if you want to.
  //this also works if you uncomment it:

  // Serial.print(thisByte, DEC); 

  Serial.print(", hex: ");
  // prints value as string in hexadecimal (base 16):
  Serial.print(thisByte, HEX);     

  Serial.print(", oct: ");
  // prints value as string in octal (base 8);
  Serial.print(thisByte, OCT);     

  Serial.print(", bin: ");
  // prints value as string in binary (base 2)
  // also prints ending line break:
  Serial.println(thisByte, BIN);   

  // if printed last visible character '~' or 126, stop:
  if(thisByte == 126) {     // you could also use if (thisByte == '~') {
    // This loop loops forever and does nothing
    while (Serial) {
    ; // wait for serial port to connect. Needed for Leonardo only
  // go on to the next character

My prototype board uses TXLED pin (D30) so don't be alarmed.

I was trying to let Micro wait until Serial disconnects and then wait for it reopen to reprint the ASCII table. Unfortunately this only works once immediately following a sketch upload. The LED on D30 blinks and I get the whole ASCII table. If I subsequently close and reopen the serial port monitor, I get some partial table and the LED is not blinking. I guess it never detects Serial becoming FALSE.

Without modification to the ASCII table code, I get nothing after I open serial monitor a second time.

What did I do wrong?
27  Using Arduino / Microcontrollers / Re: Can't Use an Arduino as ISP on: September 27, 2014, 11:47:42 pm
The bootloader or anything on the flash will always be erased in entirety before new flash is loaded via the ICSP header. Like others said, make sure you disable bootloader fuse settings.
28  Development / Other Hardware Development / Re: Trademark issues with using Arduino Leonardo bootloader on: September 27, 2014, 01:55:35 am
Been a month already. I just sent in my application to openmoko. I was in contact with Arduino people. It seems that they may consider some Arduino PID if you join the Arduino at heart program. Hopefully they make some decision to share their PID or apply for a new vid just for arduino at heart program. That will be very helpful to designers using 32U4 chip.

Another hurdle I am trying to jump across is that once you have your own VID and PID, windows won't find driver for you anymore. You can force install arduino driver but your device shows up as arduino micro on device manager. Not too cool. Tampering with Arduino.inf is futile. It's encrypted with a hash file. Now if arduino llc really want more people to design around their products, they will need to find a way to make it happen. I can prototype my device, I can lay a board, but I can't get the damn windows driver to install automatically. I'll need a mac and a linux.
29  Development / Other Hardware Development / Re: Driver install hurdle for custom ATMEGA32U4 device on: September 27, 2014, 01:26:15 am
OK, a different angle: does atmel have a driver that I can use instead of arduino driver? This is a really major hurdle.
30  Using Arduino / Project Guidance / Re: What's happening with my robot? on: September 27, 2014, 01:13:36 am
Can you stick a 10uF cap between the VCC and GND wires on the servo? That will stabilize the power supply. Think of a capacitor as a fly wheel if you like mechanics. A large fly wheel stabilizes the rotation.
Pages: 1 [2] 3 4 ... 519