Show Posts
Pages: [1]
1  Development / Other Software Development / Proper way to release modified for OSX? on: March 19, 2014, 01:16:08 pm
If I decided to offer a copy of my modified OSX for download on my personal website, would that be legal? Could I get in trouble? Do I have to change it name/icon to reflect that it is not the original file?

What is the appropriate way for publishing a modified if there is one?

2  Using Arduino / Programming Questions / Re: Struggling with Majenko's ICSC Library, Pointers, and Arrays on: March 14, 2014, 06:34:08 pm

Awesome. I'm excited to get this all up and running. Thank you so much for putting this library together. I'm working on what I hope will soon be  a RS-485 based multipoint network for a home brew industrial control computer system smiley This was going to be a lot more complicated w/o your help!


EDIT: Just got home and tested it. Works like a charm! Thanks again smiley-cool
3  Using Arduino / Programming Questions / Re: Struggling with Majenko's ICSC Library, Pointers, and Arrays on: March 14, 2014, 05:02:14 pm
Cool, thank you so much for responding!

I'll try to use what you've laid out as soon as I get home. I'm still a little weak on my pointers and all that, so lets see if I understand this correctly:  

With ICSC.send(2, 'F', 2, (char *)&AnalogValue);  I'm casting the address of AnalogValue, a 16bit integer, into a char pointer.

And with uint16_t *value = (uint16_t *)data; I'm casting the the address stored in the data char pointer into a int pointer called value , presumably so that incrementing the pointer will result in the right address (2 byte increment) for the int type data that was originally passed on through the ICSC.send function.

Does that sound about right?
4  Using Arduino / Programming Questions / Re: Struggling with Majenko's ICSC Library, Pointers, and Arrays on: March 13, 2014, 04:04:13 pm
Added most recent code to parent.
5  Using Arduino / Programming Questions / [SOLVED] Struggling with Majenko's ICSC Library, Pointers, and Arrays on: March 13, 2014, 02:39:56 pm
I'm trying to get the hang for majenko's ICSC library. I'm not a very experienced programmer and I am still learning how to handle pointers and arrays. If anyone could explain to me what I'm doing wrong here that would be much appreciated.

Right now I have a setup with two Arduinos and am trying to do this:

- take a 10bit analog read value on Arduino1(master),
- split it up into two pieces so it can fit into the char array for ICSC.send
- send the data to Arduino2(slave)
- Recombine the data on Arduino2 to get the original 10bit ADC value
- use that value to set the blink frequency of an LED on Arduino 2

I seem to consistently only get the first 7 bits of the ADC value on Arduino2, so there seems to be either a problem with how I'm trying to read the data in the array on Arduino2, or how I am storing data the data in the array on Arduino1.

Master Code:
#include <ICSC.h>
uint16_t AnalogValue;
char datastream[2];
void setup()
  ICSC.begin(1, 115200); // assign device ID 1, baudrate
void loop()
 AnalogValue = analogRead(A0);
 datastream[0] = (char) AnalogValue & 0xff;
 datastream[1] = (char) AnalogValue >> 8;
 ICSC.send(2, 'F', 2, (char *)&datastream);

Slave Code:
#include <ICSC.h>
uint16_t blinktime = 300; // default blink frequency: 500ms
boolean led; // LED status on/off
void setup()
  ICSC.begin(2, 115200); // assign device ID 2, baudrate
  ICSC.registerCommand('F', &frequency); // command F deferrs to the frequency function
  pinMode(13, OUTPUT); // Pin 13 is our
  digitalWrite(13, LOW);
void loop()
  ICSC.process(); // listen for commands
  digitalWrite(13, led); // enforce led status
  led = !led; // change led status for next cycle
  delay(blinktime); // wait for <blinktime> amount of milliseconds
void frequency(unsigned char src, char command, unsigned char len, char *data)
 uint16_t value1 = (uint16_t) *(data);
 uint16_t value2 = (uint16_t) *(data+1);
 uint16_t value3 = value2 << 8;
 value1 = value1 + value3;
 blinktime = value1;// assign blinktime combined value
6  Using Arduino / Project Guidance / Re: PHP question: controlling Arduino over Ethernet using LAMP on: September 26, 2012, 05:03:09 pm
Thx SurferTim, but I got that part figured out pretty well!

Unfortunately polling the sensor is just the first step, a test to establish communication from the apache server to the arduino; the end goal is much more sophisticated: ultimately I want to be able to have a network that can handle dozens of sensor stations, with potentially hundreds of individual sensors. I want to be able to remotely adjust all kinds of settings on the sensor stations: recalibrating sensors, changing sensors poll intervals, setting clock chips, downloading/clearing micro sd backup data to name just a few. I don't know if the continuous polling method is suitable for a scenario where I want a large and growing number of sensor stations, that just seems like it would spell out trouble; wouldn't I essentially be doing a DDOS attack on my own server?

Is there a way that I could just execute a php GET on the server that contains a predefined data (maybe just a single character) and targets the IP of the Arduino sensor station? Does the Arduino have to answer in a specific way for the transaction to be completed?

I think what I am trying to do is possible, I just can't quite wrap my head around the actual coding part of it. I've been looking for some kind of example code, even if it were just some one who turned a LED on and off using a PHP script on an apache server with the arduino connected ethernet. Anyways, I appreciate all ideas and suggestions smiley

7  Using Arduino / Project Guidance / Re: PHP question: controlling Arduino over Ethernet using LAMP on: September 26, 2012, 12:19:57 am
If this wasn't the right forum to find help in, maybe a moderator could move my thread into the "Networking, Protocols, and Devices"-Forum?   

Much appreciated!
8  Using Arduino / Project Guidance / PHP question: controlling Arduino over Ethernet using LAMP on: September 25, 2012, 11:22:49 am
I'm working on a data-logging project that connects an Arduino based weather-station to a linux server via ethernet. I'm using the LAMP stack on my server and am calling a PHP script to transfer sensor data from the Arduino to the server and store it in a MySQL database, and then another PHP script and Open Flash Chart v2 to to display the data in graphs. That part works pretty well.

Right now the weather station is programmed to automatically send its data to the server at a fixed interval. In addition to that, what I would like to be able to do is execute a PHP script on the linux server that tells the Arduino to take a current reading of all its sensors and send the data back to the server: I want to be able to remotely trigger a sensor poll.

I'm not very experienced with PHP. I can get the Arduino to wait, look, and interpret data coming from the server, but I have no idea what the PHP script to send data back over TCP/IP to the Arduino looks like. I imagine I have to define the Arduino's IP address, port, then initialize some sort of handshake with the Arduino, and send my data packet.

I don't really understand how to do that in PHP, or if it is even possible. Any suggestions, ideas, or example/pseudo code would be greatly appreciated!

Yours Truly.
9  Using Arduino / Project Guidance / Re: Passing Arduino Data to Webserver on: July 21, 2012, 05:31:08 pm
Great, those are some pretty solid leads. I can work a strategy off of that. Thanks for all the advice!
10  Using Arduino / Project Guidance / Re: Passing Arduino Data to Webserver on: July 20, 2012, 09:02:45 pm
Thank you for your response!

It isn't all that clear what results you are looking for.

Oh, sorry about that. Let me try again: The result I am looking for is a graphical representation of an archive of historic sensor data for research, and an overview of real time sensor values for monitoring, accessible by internet browser on our LAN.

What I'm working with: Arduino 2009, Ethernet Shield, and a dedicated Ubuntu server with LAMP. I haven't quite done anything like this before, hence trying to get some pointers from people with more experience with this sort of thing, what sort of challenges they encountered in their approach etc.

I haven't even thought about using an actual database to store the data, I was just thinking maybe parsing values that are being written into a txt file, but I can totally see the advantages of writing to a database and being able to use the data for all kinds of things from there on out. Ultimately I'm hoping to be able to add any number of Arduino clients to the network, so we can gather all kinds of environmental data, and storing it in a database would allow us to cross reference and compare our sensor data in all sorts of interesting ways. Thanks for the idea!

11  Using Arduino / Project Guidance / Passing Arduino Data to Webserver on: July 20, 2012, 05:57:16 pm
Hi y'all   smiley-kitty

I'm starting a new project and I was hoping to run this by the community first and get some hints. The general idea is to log sensor data from an Arduino with an Ethernet shield (possibly with SD card) to an Apache web-server. The raw sensor data would be converted into graphs and real time values (using a php script?) and would be accessible to anyone in the network through their browser. The system would be running 24/7 observing an Aquaponics setup. The goal is to have both an historic archive of sensor data for research, and an overview of real time sensor values.

It seems there are a number of different ways of achieving what I am trying to do. I'm a quick learner and not intimidated by having to figure out some new things, but I also want to avoid getting stuck in dead ends, wasting time trying to make some god awful hack work reliably when I should have gone a different route entirely.

So here is my question: What has worked for you? How would you go about achieving the kind of result that I am looking for?

Thank you for your collaboration smiley !
12  Using Arduino / Sensors / 18B20 in strong electro magnetic fields? on: August 16, 2011, 09:46:49 am
Hi there!

I'm working on an axial flux alternator. As a safety feature, I would like to integrate temp sensors into the stator, as close as possible to where the magnets pass, so I can monitor internal temperature and trigger a shut down in case the alternator starts overheating during operation.

I have some 18B20 lying around, but I'm not sure if they will perform well inside a generator due to the presence of strong inductive forces, magnetic fields etc. Maybe it's just a question of having the right filters? The Alternator is slated to run at a steady 500-550 RPM, so EM noise should only occur in a distinct frequency range during normal operation.

The whole stator element, including sensors, will be pored in resin before operation. So, what ever I decide to do, once it's done, it's done smiley

I'm open to any suggestions, ideas... Thanks!

13  Forum 2005-2010 (read only) / Development / Re: MenuBackend, new menu managment library on: November 18, 2010, 09:35:19 pm
Wow, I've been looking for something like this for a while now, looks quite impressive!

Question: Was the MenuBackend example code specifically written for serial LCD's? If yes, how could one go about making it work with 4bit/8bit controlled 44780's LCDisplays?

14  Forum 2005-2010 (read only) / Troubleshooting / Re: newbie camera questions on: December 09, 2010, 09:53:04 pm
If you just want color, I'm just talking off the top of my head, but what if you'd go analogue, with an amplified (1V->5V) composite signal; only reading chrominance and luminance of a certain part of the image and not even storing the rest of it?

It would take lots of trial and error and calibrating until you're reading the correct pulses and get the ATMels A/D converter to read the right parts of the pulse and then trying /the right part of right scan line... but I think it could be done. Although, I don't remember how fast the composite carrier frequency is. Maybe too fast  :-/

15  Forum 2005-2010 (read only) / Exhibition / Digital Ship's Bells Clock on: December 09, 2010, 08:29:09 pm
Hi y'all!

After silently browsing the forum for hours on end and sucking up all the wisdom and experience I could find, here is my first little Arduino project:

The Digital Ship's Bell Clock

This community is amazing and I wish I would have had such a resource when I was working commercially with PICs a few years back. Never got any good at it, but that experience let's me really appreciate all the time and love this community has put into everything.

You rock.

My software runs on a tiny Arduino clone, the Dorkboard:

I also made a little carrier to hold all the components and a 5V regulator:

Hidden under the carrier is a little sparkfun DS1307 RealTimeClock module.

A few words regarding the code. I'm multiplexing the 7SEG directly off the ATMega, no shiftregister or dedicated driver. Because of that I refrained from using delay(). I increment certain variables every main loop cycle instead for specific timing on some of the functions.

 File Name: Shipsbells_120910.pde
 Date: 12/09/2010
 Author: R.Jacobson, with lots of inspiration from the forums
 Special thanks to hari; your multiplexing solution for the sparkfun 7-Segment dislpay
 is what makes this work!
 And to my old friend Mike, for helping me clean up the mess that used to be
 void checkBells() !
 Hardware: Freeduino Dorkboard, 7-Segment Display, 1307 RTC, Speaker

 This program runs a digital clock showing military (24h)
 time and sounds a speaker in the manner of a ship's bell.
 A ship's bell is struck every 30 minutes, with number of strikes increasing
 by that same cycle, culminating in 8 strikes at the 4th hour.
 A day is split into six four-hour shifts:
 Full hours are struck in groups of two for easier recognition.
 For example, 1530h (3:30pm) would be  (* *)  (* *)  (* *)  (*)
 Three double strikes for the full hours and a single for the half hour.

Unfortunately the entire code was over 9000 characters, too long for the forum (too many explanatory comments? smiley )

You can find the complete code and a circuit diagram here:

Comments, suggestions, improvements, questions, everything is welcome - I'm just glad to be back in the game smiley-grin ! This was a great little practice project. Next one might be a little more sophisticated, but I'm taking one step at a time here :smiley

Pages: [1]