Show Posts
Pages: [1] 2 3 ... 6
1  Using Arduino / Interfacing w/ Software on the Computer / Re: Arduino on Archlinux on a Pogoplug 4 on: August 26, 2014, 09:39:07 am
I was running makepkg when the problem happened; I was using "install" in a general sense.  The specific command I ran was

makepkg -s --asroot

when following instructions on http://www.instructables.com/id/Yours-Mine-and-AURs/

I don't know what Arduino does and does not need, so I was following instructions in an attempt to get everything in place.  Typically if I say, "oh, I'll just extract everything to a directory and take it from there," I quickly find missing dependencies, and those dependencies are missing dependencies. It's a mess that running makepkg is supposed to fix. 

Here, for example, is something I don't have an answer for:  do I need Java if I'm just doing things in a terminal window? 
Also, I'm unclear on how to convince an Arduino board to accept a new sketch over its serial port using its bootloader in a process initiated from the command line.

I can see that it's possible on this page:

https://github.com/arduino/Arduino/blob/ide-1.5.x/build/shared/manpage.adoc

using commands like:

arduino --upload /path/to/sketch/sketch.ino

but that page refers to the arduino command line command as "the Arduino IDE."  I know the IDE as we use it is a graphical tool, but in the literature, the command line tool is considered part of the IDE.
2  Using Arduino / Interfacing w/ Software on the Computer / Re: Arduino on Archlinux on a Pogoplug 4 on: August 25, 2014, 05:22:38 pm
As long as I can get a new sketch onto the Arduino using the bootloader via USB, then that would be acceptable. I've used AVRDude (outside of Arduino) many times, but always through some sort of special hardware that attaches via the ICSP. I don't think I've seen examples of people uploaded to an AVR controller using a serial connection and the bootloader; that's usually something I leave to the Arduino IDE to do. In this case it seemed the easiest way to do that would be with the IDE, which I planned to use via the command line. I got Java working on the Pogoplug, but evidently the hardware is too bare-bones to accept the install of the Arduino IDE itself. Does that require some sort of GUI?  This Pogoplug is entirely headless and comes with no video hardware of any kind, so there's no sense in installing a GUI.
3  Using Arduino / Interfacing w/ Software on the Computer / Re: Arduino on Archlinux on a Pogoplug 4 on: August 25, 2014, 02:20:44 pm
The problem is that so far I cannot install the IDE in any form on that architecture. The installation cranks away for awhile and then dies on an esoteric Java error.
4  Using Arduino / Interfacing w/ Software on the Computer / Re: Arduino on Archlinux on a Pogoplug 4 on: August 25, 2014, 12:25:02 pm
This might be an option:
https://bitbucket.org/dustin-robotics/lscreamer/src
something called RFC2217 that allows me to use serial ports on a remote host as if they were on my main computer. That way I could use the IDE on my main computer, upload sketches via RFC2217, and then monitor them either locally with Pogoplug or remotely across the network.
5  Using Arduino / Interfacing w/ Software on the Computer / Re: Arduino on Archlinux on a Pogoplug 4 on: August 25, 2014, 12:12:17 pm
Ideally I want to be able to upload new versions of the sketch from the Pogoplug. I understand this is more difficult.  Perhaps I don't need an Arduino IDE for that either, but I don't know how else to perform the careful choreography of signals to cause a new sketch to upload. It's not as important to be able to compile sketches on the Pogoplug, although that would be nice too.
6  Using Arduino / Interfacing w/ Software on the Computer / Arduino on Archlinux on a Pogoplug 4 on: August 25, 2014, 10:38:47 am
I have a Pogoplug 4 (a $25 device with a SATA port, USB 3.0 ports, gigabyte ethernet, etc.) onto which I installed the Arm version of Archlinux.  I've got it running Samba and even successfully capturing images with a webcam.  Now I'd like it to interface with an Arduino board via one of its USB ports so that it can do some real-world things (monitor temperatures, pan, tilt & zoom that webcam, etc.). Ideally I'd like to be able to issue commands to and update the sketch on the Arduino board via a non-GUI version of the Arduino IDE.  The problem is that there is no place online where this is detailed in a step-by-step manner. The instructions here are for installing on the x686 architecture of ArchLinux, and I changed the arch line in PKGBUILD to "arm," but inevitably I get a Java error:
http://www.instructables.com/id/Yours-Mine-and-AURs/

and this page is totally not helpful:

https://wiki.archlinux.org/index.php/Arduino

it tells me to "Install arduino from the AUR."

Is there anyone who knows how to install a command-line version of the Arduino IDE on an Arm-based computer running Archlinux? And if so, could you kindly list the steps?  Thanks so much!

7  Using Arduino / Installation & Troubleshooting / Re: can't add a programmer to Arduino 1.0.3 on: July 06, 2013, 07:05:30 pm
hmm, the upgrade to 1.5.2 fixed my problem.  thanks!
8  Using Arduino / Installation & Troubleshooting / can't add a programmer to Arduino 1.0.3 on: July 06, 2013, 06:20:27 pm
I've tried editing programmers.txt in /hardware in the Arduino directory as well as /hardware in the sketch directory, but nothing I do changes the list of programmers available. I can tell my edits are having no effect since even editing the names of programmers that are present has no effect.  Is there some other super secret place where the programmer list is stored that I do not know about?  I'm using Arduino on Windows 7.  Changes to programmers.txt have immediate effects in Arduino 023 -- and because i can find my programmer there but not in 1.0.3, i've been reluctant to upgrade.
9  Community / Exhibition / Gallery / Using an AtTiny as a configurable environment controller on: June 29, 2013, 05:42:36 pm
I have a complex Arduino-based solar hot water controller that I can configure and monitor using a 100 ft. serial cable. (I'm not using a modern Arduino, but instead one that connects via a Max232 -- USB does not have an adequate range.)  This normally works okay and I can use its bootloader(s) (there's a master and a slave) to upload new firmware.  Occasionally, though, there are problems.  When the serial cable gets unplugged from the computer, that 100 feet of unterminated wire pulls in all sorts of random noise and repeatedly resets the controller via the DTR line (which is connected to the reset line via a capacitor -- as is the case in Arduino Diecimilas). To make the solar controller more reliable, I needed a way to switch off the capacitive connection between DTR and reset and only enable it when I need to upload new firmware.  So I build a circuit based on an AtTiny85 (which is programmable from within the Arduino environment -- see https://www.sparkfun.com/products/11460 ) that monitors the serial transmit line (transmit from the computer, receive to the Atmega328s) looking for a string of the form '!X[digit]' -- if it sees that, it turns on a pin that, using a 4016 CMOS switch, connects the DTR to the Atmega reset pin for a length of time equal to 10 raised to the power of [digit] seconds.  During that time, I can reflash the Atmega328s as usual.  Otherwise I can only read data from the Atmega328s and send them serial-based queries and instructions.  This has made the solar controller much more reliable.  Here's the source code of the AtTiny:

Code:
/*
SERIAL WATCHDOG
June 27, 2013
Judas Gutenberg
Serial watchdog for the AT Tiny 45/85/84
It monitors a serial line for !X[digit] or !R
if the former, it makes pin 0 go high for 10^[digit] seconds
if the latter, it sends a low-going pulse out of pin 1 for 1/100th of a second
i use this as a serial watchdog on an Arduino, allowing
me to keep the capacitor on the reset pin disconnected most of the time
so a disconnected serial cable won't throw the arduino in a loop
i use the !R to force a hardware reset of both a master and slave arduino.
*/

#include <SoftwareSerial.h>
SoftwareSerial softSerial(3, 4); // RX, TX
char byteThird;
char byteSecond;
char byteFirst;
long milliStart;
long timeOn=10000;
int len=0;

void setup()
{
pinMode(0, INPUT);
digitalWrite(0,LOW);
softSerial.begin(19200);
 
}


void loop()
{

if (softSerial.available() > 0)
{
byteFirst=byteSecond;
byteSecond=byteThird;
byteThird = softSerial.read();
}
if(byteFirst=='!')
{
if(byteSecond=='X')
{
//softSerial.println(byteThird);
len=(int)byteThird-48;
milliStart=millis();
pinMode(0, OUTPUT);
digitalWrite(0,HIGH);
  clearBytes();
}
if(byteSecond=='R')
{

pinMode(1, OUTPUT);
digitalWrite(1,HIGH);
delay(10);
digitalWrite(1,LOW);
  delay(10);
digitalWrite(1,HIGH);
pinMode(1, INPUT);
clearBytes();
}
}

if(milliStart+( powerof(10,len) *1000)<millis())
{
digitalWrite(0,LOW);
pinMode(0, INPUT);
 
}
delay(500);
}

void clearBytes()
{
byteThird=0;
byteSecond=0;
byteFirst=0;
}


unsigned long powerof(long intin, byte powerin)
//raises intin to the power of powerin
//not using "pow" saves me a lot of Flash memory
{
  unsigned long outdata=1;
  byte k;
  for (k = 1; k <powerin+1; k++)
  {
    outdata=outdata*intin;
  }
  return outdata;
}


And here's the schematic for how I attached it to the Atmegas:



learn more about my solar controller here:
http://asecular.com/projects/homebrewsolar.php
10  Using Arduino / Microcontrollers / Re: weird sketch size issues with Optiboot in Arduino 0022/0023 and Atmega328 on: January 05, 2013, 07:02:16 pm
I'm using an old Arduino BT for testing at my workstation and, for the actual application, an Atmega328 in an Olimex 28 pin development board (reachable only via RS-232) -- so I wouldn't have thought to call it a UNO.
11  Using Arduino / Microcontrollers / Re: weird sketch size issues with Optiboot in Arduino 0022/0023 and Atmega328 on: January 05, 2013, 11:34:41 am
i narrowed down the range of sketch sizes where the optiboot bootloader would fail to between 28660 and 28676 and then did google searches on each of the values with optiboot:

optiboot 28660
optiboot 28661
etc.

and got hits for 28666 and 28668 -- that latter one (and 28672) gave me this page:
http://code.google.com/p/optiboot/issues/detail?id=23
12  Using Arduino / Microcontrollers / Re: weird sketch size issues with Optiboot in Arduino 0022/0023 and Atmega328 on: January 04, 2013, 10:34:03 pm
I loaded the bootloader myself, using (in at least one case) the optiboot bootloader provided with the Arduino022 download (I've found it more or less impossible to migrate my code to Arduino 1.0X, but then again there isn't much motivation). The thing about "well known bugs" is that they're only really well-known to people who know.  My Google searches turned up nothing when I searched for all the symptoms I was seeing. It's good to hear this bug has been fixed; Optiboot is so much better than any other bootloader I've tried.  I really don't have the time to wait around for the stock bootloader. Also:  for an Arduino to be usable in real equipment, there needs to be a watchdog (supported by Optiboot and Adaboot). Otherwise your solar pump will hang at some point while you're on a beach in the Dominican Republic and all your antifreeze will boil out into the snow.
13  Using Arduino / Microcontrollers / weird sketch size issues with Optiboot in Arduino 0022/0023 and Atmega328 on: January 04, 2013, 10:03:14 pm
This is just a word of warning to people who compile large Atmega328 sketches using the Optiboot bootloader on Arduino0022 and 0023 (I haven't tried it on other versions of the IDE).  When the sketch exceeds 28725 bytes in size (and possibly smaller, though no smaller than 27734 bytes), the upload will fail if you are using the Optiboot bootloader.  It will initially seem to be working (lights will blink, etc.) but the the upload will hang.  This isn't a problem with the Adaboot bootloader (and perhaps others that allow so much usable flash space).  It was good to finally figure out that the size of the sketch was the issue and not something else. (It took me hours to figure out what was wrong -- it was only obvious when I tried uploading a different sketch.)

The error you will get when the upload fails is:

avrdude: stk500_getsync(): not in sync: resp=0x00
avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x51
14  Using Arduino / Installation & Troubleshooting / Re: Pony Serial Programmer in Arduino 1.0.3 on: December 30, 2012, 06:27:11 pm
the commands in avrdude work for ponyser -- that's never been a problem. that's how i write the bootloader.
15  Using Arduino / Installation & Troubleshooting / Re: Pony Serial Programmer in Arduino 1.0.3 on: December 17, 2012, 08:56:58 pm
i would modify board.txt if i could find any info on what needed to be changed.  when i did this for arduino23, all i had to do was modify programmers.txt.  as things stand now, i can't use arduino1.0.3 -- which is just as well considering how much code of mine that it breaks (arduino.h, really?).  but i would like to try out some libraries written by others for it.
Pages: [1] 2 3 ... 6