Show Posts
Pages: 1 [2] 3
16  Development / Other Software Development / Re: Arduino Library downloader on: August 11, 2011, 05:32:09 am
Hello Everyone.

i have developed a bit again in my free time.

i made some changes to the Library Downloader (version 0.1.2).
It now uses most of the new XML structure and now uses a 3 column list for the libs.

http://ardulibrary.code-i.de/
And i hope the new library directory will now be found automatically at the first start. i couldn't test it though.

And i also did a small web-application (Sorry for the missing layout and usability mistakes)
where everyone can register itself and can add libraries to the application and web page:
http://www.code-i.de/ardulibrary/

And no, the libraries in the list are not from me.
If a library creator registers, he/she can of course contact me and i will remove/hand over the lib to him/her.

And as always feedback from everyone is welcome.
17  Development / Other Software Development / Re: Arduino Library downloader on: June 07, 2011, 05:36:17 am
Thanks for the hint.

the application is asking for the correct folder when you start it for the first time.
When there is no sub-folder named libraries it will give a "Directory not found" message.

i believe the new library folder is then under the sketch folder that is in the user-home-directory?
Maybe i can find it automatically then.
18  Development / Other Software Development / Arduino Library downloader on: June 06, 2011, 06:57:37 am
Hi everyone,

i don't know if someone remembers me trying to make a library downloader for arduino in the old forum.
http://arduino.cc/forum/index.php/topic,1460.0.html

download and Source-Code here:
http://ardulibrary.code-i.de/



sadly i had not much time lately to continue with it (moved to a new home and a bigger project at work) and AlphaBeta leaved to work at another project.
So if someone is still interested and want to work with me i would like to continue with this project.

As always i still like to hear new suggestions for libraries (or new versions of them) to add to the application.

Thanks and happy coding.
19  Forum 2005-2010 (read only) / Syntax & Programs / Re: TouchShield and Serial String on: May 01, 2010, 11:54:47 am
Thanks a lot.

I think i got something working.

i changed the Arduino code to send a # for begin and a ; for the end of the string like:
Code:
snprintf(secondstr, sizeof(secondstr), "#%d:%d:%d;", hour, minute, second);

then  i changed the code for reading of the string in the touchshield to:
Code:
 // Monitor Serial Buffer of TouchShield Slide
  char charIn = 0;
  byte i = 0;
  char stringIn[32] = "";
  
  char startchar;
 int availableData = Serial.available();
 
 if ( availableData > 0 )  {
   startchar = Serial.read();
   if ( startchar == '#' ) {
     while ( charIn != ';' ) {
       if ( Serial.available() > 0 ) {
         charIn = Serial.read();
         if ( charIn == ';' ) {
           break;
         }
         stringIn[i] = charIn;
         i += 1;
       }
     }
   }
 }

i hope this is correct.

Only problem is, i still get a flashing screen like the erasing of the screen is taking a lot of time.
Do you have a idea how i can eleminate the screen flashing?

Thanks again
20  Forum 2005-2010 (read only) / Syntax & Programs / TouchShield and Serial String on: April 30, 2010, 09:58:34 pm
Hi everyone.

I am new at Arduino development and have a problem with programming the TouchShield and Arduino Board to communicate together.

Always when i send a String the TouchShield does show the first char alone and a half second later the whole string but without the first char.

i want to show the Time without flashing of the screen.

Here is my Code for the Arduino:

Code:
#include "Wire.h"
#include <AFSoftSerial.h>

#define DS1307_I2C_ADDRESS 0x68

//touch shield slide ports
#define RX_PIN  3
#define TX_PIN  2
AFSoftSerial touchSerial =  AFSoftSerial(RX_PIN, TX_PIN);

// Convert normal decimal numbers to binary coded decimal
byte decToBcd(byte val)
{
  return ( (val/10*16) + (val%10) );
}

// Convert binary coded decimal to normal decimal numbers
byte bcdToDec(byte val)
{
  return ( (val/16*10) + (val%16) );
}

// Stops the DS1307, but it has the side effect of setting seconds to 0
// Probably only want to use this for testing
/*void stopDs1307()
{
  Wire.beginTransmission(DS1307_I2C_ADDRESS);
  Wire.send(0);
  Wire.send(0x80);
  Wire.endTransmission();
}*/

// 1) Sets the date and time on the ds1307
// 2) Starts the clock
// 3) Sets hour mode to 24 hour clock
// Assumes you're passing in valid numbers
void setDateDs1307(byte second,        // 0-59
                   byte minute,        // 0-59
                   byte hour,          // 1-23
                   byte dayOfWeek,     // 1-7
                   byte dayOfMonth,    // 1-28/29/30/31
                   byte month,         // 1-12
                   byte year)          // 0-99
{
   Wire.beginTransmission(DS1307_I2C_ADDRESS);
   Wire.send(0);
   Wire.send(decToBcd(second));    // 0 to bit 7 starts the clock
   Wire.send(decToBcd(minute));
   Wire.send(decToBcd(hour));      // If you want 12 hour am/pm you need to set
                                   // bit 6 (also need to change readDateDs1307)
   Wire.send(decToBcd(dayOfWeek));
   Wire.send(decToBcd(dayOfMonth));
   Wire.send(decToBcd(month));
   Wire.send(decToBcd(year));
   Wire.endTransmission();
}

// Gets the date and time from the ds1307
void getDateDs1307(byte *second,
          byte *minute,
          byte *hour,
          byte *dayOfWeek,
          byte *dayOfMonth,
          byte *month,
          byte *year)
{
  // Reset the register pointer
  Wire.beginTransmission(DS1307_I2C_ADDRESS);
  Wire.send(0);
  Wire.endTransmission();

  Wire.requestFrom(DS1307_I2C_ADDRESS, 7);

  // A few of these need masks because certain bits are control bits
  *second     = bcdToDec(Wire.receive() & 0x7f);
  *minute     = bcdToDec(Wire.receive());
  *hour       = bcdToDec(Wire.receive() & 0x3f);  // Need to change this if 12 hour am/pm
  *dayOfWeek  = bcdToDec(Wire.receive());
  *dayOfMonth = bcdToDec(Wire.receive());
  *month      = bcdToDec(Wire.receive());
  *year       = bcdToDec(Wire.receive());
}


// TouchShield functions
void printClockToScreen() {
  
}

void setup()
{
  byte second, minute, hour, dayOfWeek, dayOfMonth, month, year;
  
  Wire.begin();
  
  //set touch slide communication
  pinMode(RX_PIN, INPUT);
  pinMode(TX_PIN, OUTPUT);
  touchSerial.begin(9600);
  pinMode(9,INPUT);

  // Change these values to what you want to set your clock to.
  // You probably only want to set your clock once and then remove
  // the setDateDs1307 call.
  second = 45;
  minute = 23;
  hour = 23;
  dayOfWeek = 3;
  dayOfMonth = 28;
  month = 4;
  year = 10;
  //setDateDs1307(second, minute, hour, dayOfWeek, dayOfMonth, month, year);
}

void loop()
{
  byte second, minute, hour, dayOfWeek, dayOfMonth, month, year;

  getDateDs1307(&second, &minute, &hour, &dayOfWeek, &dayOfMonth, &month, &year);

  
  //touch slide send
  char secondstr[32];
  snprintf(secondstr, sizeof(secondstr), "%d:%d:%d", hour, minute, second);
  
  touchSerial.print(secondstr);


  delay(1000);
}

and here the code for the TouchShield:
Code:
// Globals
unsigned int Xstore;
unsigned int Ystore;

// Prepare Screen and Serial
void setup()
{
  background(0,0,0);
  stroke(255,255,255);
  fill(0,0,0);
  
  Serial.begin(9600);
  delay(100);
}

void loop()
{
  
  // Monitor Serial Buffer of TouchShield Slide
  char charIn = 0;
  byte i = 0;
  char stringIn[32] = "";
  
  while( Serial.available() ) {
    charIn = Serial.read();
    stringIn[i] = charIn;
    i += 1;
  }
  
  // Clear screen and display the serial buffer as text
  if (stringIn[0])
  {
   background(0,0,0);
   text("Time:", 50, 50);
   text(stringIn, 50, 100);
  }  
}

thanks for any help or idea.
21  Forum 2005-2010 (read only) / Exhibition / Re: Alarm clock - lots of features on: November 05, 2010, 01:24:46 pm
oh. it looks like the design from picteks looks more advanced. my does have the problem that the screen starts to show scrambled stuff after some days. I really dont know why. And the speaker connected to the speakjet is making noise when the display brightness is high and it is even louder when the power is below 7V.

here is a list of the stuff currently connected to it:

for the clock:
1 Arduino of course.
mp3 trigger v1
speakjet shield
a touchshield as screen and input (wanted to replace with cheaper lcd screen)
2 loudspeaker
1 rf receiver

for the sensor:
1 arduino mini pro 5v
a rf sender
a sht15 temperatur & humidity sensor.
1000 mAh battery
<5v to 5v converter
1 sparkfun li,io battery charger

i never really planned anything of this but i can release some source code if wished. smiley-wink
22  Forum 2005-2010 (read only) / Exhibition / Re: Alarm clock - lots of features on: October 18, 2010, 10:50:44 am
nice project.
Just like my first try with the arduino.

Have build a Clock with an Speakjet so it can say the time. (that was not so easy even with the phrase o matic tool because this is only giving english words and my clock should speak German)

an external temperature sensor that sends the temperature to the clock over a cheap rf module every 5 minutes and goes into sleep mode for the next 5 minutes.
(made with an arduino pro mini) just testing the time it can survive with one battery charge.

only bad thing i burned my RTC and they are not cheap enough that i want to burn some more smiley-wink, so i dont have any battery backup of the clock at the moment.
i was in need to make the full clockwork with arduino code. (not so heavy with the help of the nice working time and alarm library)

but i am happy that it works now, even with some of its flaws.
i know i have done it mostly myself (of course with a lot of help from some tutorials and forum posts etc.)


thank you for all this nice developement tools and help.
23  Forum 2005-2010 (read only) / Bar Sport / Re: Arduino Library downloader on: December 08, 2010, 04:25:54 am
hi. looks nice already.
Just one thing.
Please don't write the E-Mail addresses down in plain text everywhere.

Just don't want do get Spam from Spambots. smiley-wink

When you finished writing the XML from the page just tell me the URL and i will insert it into the application.

Most important stuff is already working in the application with the test XML from you.
After that we can build in the search into the application.

24  Forum 2005-2010 (read only) / Bar Sport / Re: Arduino Library downloader on: November 28, 2010, 12:51:33 am
that is odd.

I have changed nothing regarding the functionality to extract or remove the correct files.

The only thing i can think of that have changed is the wxWidgets version with what i compiled the application that is now the newest SVN version 2.9.2.
(and that the file size somehow got double the size but that might only be a compiler configuration)

the new XML format would be nice so we can start to parse the new format.

Just one question. For what are the authors right under the root tag in your XML?
http://alexanderbrevig.com/hosting/arduinolibraries.net/ArduinolibML.xml
They are not connected to a library so i don't know if they are even needed there and the authors for the libs are right there inside the lib tag.

and 1 think i right now are think about is the version.
The version String should be the same for every lib. (like "0.0.1" to "0.1.3")
because at the moment every library developer uses another format there, even chars like "1.0.2c" or just the date.

that way i could just remove the dots(.) and i am able to read is as a value that is higher when the version is newer.
25  Forum 2005-2010 (read only) / Bar Sport / Re: Arduino Library downloader on: November 27, 2010, 10:22:32 pm
i just updated it so it will show the user if the download, the extraction or remove was successful or not.

It will also create a debug.txt in the application directory with some information that could help to know what happens if something is not working.

It would be nice when you could try the new version and send me the debug.txt when it does not work again.

Thanks.
26  Forum 2005-2010 (read only) / Bar Sport / Re: Arduino Library downloader on: November 26, 2010, 09:09:12 pm
you might be right.
i tried to work on the IDE because i am still digging into wxWidgets and learning a lot.

I branched the IDE Project so work can continue without interrupting the small Library application whenever i or some other want.

Bad that the removing does not work for you.
It is not really checking if the install or remove process was fully successful.
Some thing i can think of are some File or directory permission problems.

I will write a small debug version that writes a debug.txt so i can have a look at it.
(but first i need some sleep)

don't have any idea.
I think we should just look how it turns out and how the page is accepted by the other developers here. smiley-wink

Do you want to host my application on that webpage once it parses your XML?
27  Forum 2005-2010 (read only) / Bar Sport / Re: Arduino Library downloader on: November 26, 2010, 08:32:45 pm
I did some small User feedback optimization, so the user sees the process bar when the install or remove process starts and not when it is already finished.
updated the old link for the application.


I also tried to begin with a small IDE with the Scintilla wrapper.
It is not usable at the moment. It is only possible to open a file, edit it and to save it back.
The syntax highlighting needs more work too.

I looked a little bit at the source code from the Arduino IDE and the compile process looks quite complicated.
That will be much work i think.

see a small screenshot here
28  Forum 2005-2010 (read only) / Bar Sport / Re: Arduino Library downloader on: November 25, 2010, 07:10:16 pm
Hi,

which version is tested might be nice to know. didn't thought about that before.
I think there are some libraries that are not compatible with some version of the Arduino IDE.

example sketches can already be inside the library.zip. so i think this is enough to start with a library.

And thanks for testing the program.
It is saving the version of the installed library in the registry from windows, or once it will get compiled under linux in an ini-file.

You can find the registry keys in:
HKEY_CURRENT_USER\Software\ardulibrary.code-i.de\Ardulibrary\Settings\installedlibs

I don't know what might go wrong for you but you can check this registry key.

Of course i thought about finding already installed libraries, but the subdirectory where the library is inside can be named like everyone want and i don't have an idea how to know what library and what version of it is in this directory.

The delete library button will change right after you installed a library.
But you are right. i already changed the application so it updates the listitem and description directly.
29  Forum 2005-2010 (read only) / Bar Sport / Re: Arduino Library downloader on: November 25, 2010, 12:09:31 pm
Hi,

looks somewhat complicated. I hope when you are finished i will be able to parse your XML correctly. smiley-wink

I now finished the stuff i really wanted to do in the application.

It does not longer depend on the 7zip executable and is extracting the library on its own. Only supporting Zip at the moment.

with this change there are 3 libraries that might not longer be compatible because of a different folder structure.
I commented them out in the XML.

It is now also possible to remove libraries that you installed before.

http://ardulibrary.code-i.de/_media/dl/ardulibrary0.1.1.zip

for deinstalling the application is analyzing the zip that you downloaded and removes the files according to the structure in the zip file.

I hope this works correctly. so it should not be possible to remove files outside of the scope and without adding the structure to the XML.
30  Forum 2005-2010 (read only) / Bar Sport / Re: Arduino Library downloader on: November 24, 2010, 08:31:00 am
hi,
and thanks for testing it aliensailor.

that is a dll from the compiler. just like the vc++ runtimes i think.

it should only be needed as long as it is compiled as a debug executable.
I now included it into the zip file in the main post so if you re download it, it should work now.

Sorry for that but i am relatively new to this.

we can of course continue to talk here. But i also added you to Google Talk if you don't mind. smiley
Pages: 1 [2] 3