|
572
|
Using Arduino / Interfacing w/ Software on the Computer / Re: Arduino, PC, Ethernet, and VB
|
on: December 14, 2012, 07:37:05 am
|
You're going to have to decide whether you want to use a web server / HTTP approach or an old-school telnet-style approach on the Arduino. There are plenty of examples for the web server case (and in fact Zoomkat will be here any second to share some solid working HTTP code.) It might be worth taking a look at the BitlashWebServer example that ships with Bitlash ( http://bitlash.net). It's a sketch that exposes Bitlash scripting as a web service from the Arduino over Ethernet. It also has a telnet server so you can just send commands, as opposed to commands wrapped in HTTP GET requests. For your project you could just send "d13=1" to turn on the LED on pin 13, and "d13=0" to turn it off. Bitlash here: http://bitlash.net and you can browse the web server/telnet sketch code that ships in the distribution here: https://github.com/billroy/bitlash/blob/master/examples/BitlashWebServer/BitlashWebServer.inoGood luck with your project, -br Edit: D13 is not going to work for an LED because it is used by the Ethernet shield. Discovered this while creating a new built-in script for the BitlashWebServer. But now you can open a browser on the server ip-address/toggle5 and it will turn pin 5 on and off.
|
|
|
|
|
576
|
Using Arduino / Project Guidance / Re: Hardware for a new project (Arduino Mini, Wireless, LEDs)
|
on: December 13, 2012, 09:26:14 am
|
That's a good place to start. In Bitlash, you'd approach it a little differently: You'd do the usual initialization in a function named 'startup': function startup {pinmode(13,1);}
…and then you'd type (or send from a PC side program): d13=1 // to turn it on, and d13=0 // to turn it off
Once you've got it under command line control, Commander can put it on the web. -br
|
|
|
|
|
577
|
Using Arduino / Project Guidance / Re: Hardware for a new project (Arduino Mini, Wireless, LEDs)
|
on: December 13, 2012, 09:14:50 am
|
One way to skin that cat would be to attach a bluetooth serial adapter to the mini, rendering it portable/wireless, and control it over bluetooth serial from the PC side with something like Bitlash Commander: https://github.com/billroy/bitlash-commander -- which also exposes a web control panel interface so you can switch your LED on and off in the browser. Mind the 3.3V vs. 5V supply and signal issues when you buy stuff to go with the Mini, especially if you are thinking about going with a shield for the regular Arduino form factor and some ad-hoc wiring. Good luck with your project, -br
|
|
|
|
|
582
|
Community / Exhibition / Gallery / Re: Bitlash Commander: Web UI toolkit for Arduino
|
on: December 12, 2012, 03:30:57 pm
|
|
To work on the controls requires only a browser and text editor.
I'm actively developing Commander, so if you check back in a couple days it will probably have an XY control. No guarantees...
Your bigger task is building out the robot side and getting the software to drive it hooked up and under control of the Bitlash interpreter on Arduino. Once you can control your robot from the command line, it's ready for a Commander control panel.
The tricky part about implementing "go forward" and "go left" at the same time is not at the control panel end, it's on the Arduino where you have to work out how to walk and chew gum at the same time. To go forward 10 and left 5, for example, you can just go forward 10 and then go left 5, but most people probably expect that a robot will go forward a little and left a little to more or less move in a straight line. So you end up breaking larger moves into smaller ones you can interlace. That requires a little thought.
-br
|
|
|
|
|
583
|
Community / Exhibition / Gallery / Re: Bitlash Commander: Web UI toolkit for Arduino
|
on: December 12, 2012, 01:40:31 pm
|
Thanks for your note… 1. So, how difficult is it to modify the Bitlash controls? Ideally I would like to have a virtual joystick, basically just a circle with a dot in it that can be dragged with the mouse for driving the rover. Like putting it in the top left would make it steer left while moving forward. Is there a GUI I can use to redesign the Bitlash GUI to be something like this? Do the controls act like a continuous input until released and "auto center" when released? If not, how hard would that be to program? I would want it to stop as soon as I released the slider/joystick or if there was an interruption in the connection.
Moving the controls you see around, changing their size/shape/contents is easy. But you are proposing something a little more, a new control, an XY-type joystick control. Cool idea. New controls are not hard, but they are integrated pretty deep. They're implemented in javascript in public/svg-controls.js if you want to take a look. What you're proposing isn't hard. Let me think about it a bit. Meanwhile, you can get a lot of what you want with sliders, for a prototype. Give that a think and see where you can get with it. 2. Could the Bitlash webpage be hosted on the arduino itself like on an ethernet/wifi shield? If possible, I could use an RF solution of getting the video to another PC for the video encoding and not have to have a PC on the rover. Or maybe it would be better to use an XBee between the server and the rover/arduino and only have arduino, and XBee and an RF video TX on the rover.
Sorry, the smallest thing I believe Commander will run on (so far) is the Raspberry Pi, which I haven't tested yet but understand runs node.js. But you could use any remote serial connection you like between the PC hosting Commander and Arduino; I routinely talk to remote Bitlash over Bluetooth, for example. I understand it's possible to use XBee for similar, but haven't done it. As long as Commander can open it as a serial port, it can send commands to it. -br
|
|
|
|
|