| Author |
Message |
![[Post New]](/forum/templates/default/images/icon_minipost_new.gif) 03/12/2009 00:50:04
|
narenblr
Initiate
Joined: 06/10/2009 01:17:36
Messages: 28
Location: Bangalore, India
Offline
|
Interesting and I’m sure this will be useful.
Arduino is an open-source electronics prototyping platform based on flexible, easy-to-use hardware and software. It's intended for artists, designers, hobbyists, and anyone interested in creating interactive objects or environments.
Arduino can sense the environment by receiving input from a variety of sensors and can affect its surroundings by controlling lights, motors, and other actuators. The microcontroller on the board is programmed using the Arduino programming language (based on Wiring) and the Arduino development environment (based on Processing). Arduino projects can be stand-alone or they can communicate with software on running on a computer (e.g. Flash, Processing, MaxMSP).
The boards can be built by hand or purchased preassembled; the software can be downloaded for free. The hardware reference designs (CAD files) are available under an open-source license, you are free to adapt them to your needs.
http://www.arduino.cc/
Regards,
Naren
|
|
|
 |
![[Post New]](/forum/templates/default/images/icon_minipost_new.gif) 10/02/2010 10:51:52
|
Andras
Initiate
Joined: 05/01/2010 15:54:00
Messages: 28
Location: Netherlands
Offline
|
Indeed it is usefull. If you're interested in hooking up an Arduino with Mango, you might be interested in my post on Jee Labs hardware.
I used the modbus RTU slave code from
http://sites.google.com/site/jpmzometa/arduino-mbrt
for use with JeeNodes to get data into Mango. You can use this with any other Arduino board in order to hook it up with Mango.
|
|
|
 |
![[Post New]](/forum/templates/default/images/icon_minipost_new.gif) 29/09/2010 22:35:14
|
JointTech
Initiate
Joined: 29/09/2010 22:22:17
Messages: 9
Offline
|
The problem is that site gives just enough info for us noobs to know its possible. But not enough to actually get it to work. An actual working example with an arduino, LED and Mango would be nice. Look, mango can turn on this LED using this arduino sketch with the LED plugged into analog port 3. or Look, Mango can log the temp and graph it using this arduino sketch and a TMP36 sensor plugged into analog 2.
I can cut and paste and hack like a champ but I'm losing all my hair with this. http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1285803728/0
|
|
|
 |
![[Post New]](/forum/templates/default/images/icon_minipost_new.gif) 30/09/2010 17:27:39
|
Andras
Initiate
Joined: 05/01/2010 15:54:00
Messages: 28
Location: Netherlands
Offline
|
Hi JointTech,
The sample code initializes the mobus holding register 0 to 123. For your first test, you don't have to do anything else; you can leave the your-code-goes-here part empty .
Next, hook up the Arduino serial port to the machine running Mango and create a Modubus data source.
Then create a data point for holding register 0 and have Mango poll it regularly. If all goes well, you should get the 123 value in your data point.
When this works, you can proceed to put whatever value you would like in the holding register from the your-code-goes-here section. Just assign the value to regs[MB_REG0]. The start_mb_slave() function in the loop runner will take care of responding to modbus master commands.
|
|
|
 |
![[Post New]](/forum/templates/default/images/icon_minipost_new.gif) 30/09/2010 19:57:48
|
JointTech
Initiate
Joined: 29/09/2010 22:22:17
Messages: 9
Offline
|
thanks for the reply.
I setup a data source.
and a datapoint
Mango is not giving me any more errors but I'm not seeing the 123 you mentioned.
could you give me one more kick in the right direction? Mango is making me feel really dense. I suppose my complete lack of understanding of M2M in general isnt helping.
|
|
|
 |
![[Post New]](/forum/templates/default/images/icon_minipost_new.gif) 30/09/2010 20:35:17
|
JointTech
Initiate
Joined: 29/09/2010 22:22:17
Messages: 9
Offline
|
I feel like I'm hijacking a thread, but in my defense this will help the next guy with just enough knowledge to almost make it, ;)
I think I'm starting to get the coding part.
I "think" this should send the temperature variable to mb_reg0 and mango should be able to map graph the changing temp every 5 seconds. which is what the mango poll rate for that data source is set to.
|
|
|
 |
![[Post New]](/forum/templates/default/images/icon_minipost_new.gif) 30/09/2010 21:20:46
|
JointTech
Initiate
Joined: 29/09/2010 22:22:17
Messages: 9
Offline
|
Hah. had to change the modbus data type in the Point Details to 2 byte unsigned integer.
Whoo hoo. I have a datapoint that is showing 123
Ok I think thats good enough to know it works. I will open a new thread if I fail miserably on the next step.
thanks
|
|
|
 |
![[Post New]](/forum/templates/default/images/icon_minipost_new.gif) 30/09/2010 21:38:52
|
mlohbihler
Master
![[Avatar]](/forum/images/avatar/eccbc87e4b5ce2fe28308fd9f2a7baf3.png)
Joined: 01/03/2007 22:48:52
Messages: 1456
Offline
|
I feel like I'm hijacking a thread
I think you hijacked the forum, but no worries. Interesting stuff. I'm glad it all worked out.
|
Best regards,
Matthew Lohbihler |
|
|
 |
![[Post New]](/forum/templates/default/images/icon_minipost_new.gif) 01/10/2010 20:19:57
|
JointTech
Initiate
Joined: 29/09/2010 22:22:17
Messages: 9
Offline
|
for posterity's sake. heres a full working example.
http://mango.serotoninsoftware.com/forum/posts/list/0/567.page#2721
|
|
|
 |
![[Post New]](/forum/templates/default/images/icon_minipost_new.gif) 02/02/2012 22:20:47
|
hugo007
Initiate
Joined: 19/01/2012 12:25:05
Messages: 4
Offline
|
ok this is working
And now how to set a simple LED on arduino using this method?
I was looking for set the coils register but I can't find nothing
I belive it is not implement yet on arduino modbus slave
Correct me if in wrong
thanks
|
|
|
 |
![[Post New]](/forum/templates/default/images/icon_minipost_new.gif) 02/02/2012 23:18:12
|
JointTech
Initiate
Joined: 29/09/2010 22:22:17
Messages: 9
Offline
|
this is a really old thread. I spent about 2 weeks total with mango back in 2010... I have no idea. You may want to cross post this at the arduino forum.
|
|
|
 |
|
|