I'm starting visual basic, (Slight Update)

If your going

the way of perl, this IDE looks pretty handy:

http://www.perl-express.com/

Dont know if its much cop but i garuntee its better than notepad!

Agreed

Those are prettier editors. If you are into pretty, go for those.

But for your first two or three programs, go hardcore. Get a feel of how notepad is failing you. Only then you know what to look for in a code editor. Hey, it might even be a practical tool for Picaxe Basic as well!

Rik (prefers vim)

OLE thingey plus IDE thingey

Well, at least I figured out why I know nothing about it.

From one of the many FAQs in the official perl documentation, about the module Win32::OLE …
“This module provides an interface to OLE Automation from Perl. OLE Automation brings VisualBasic like scripting capabilities and offers powerful extensibility and the ability to control many Win32 applications from Perl scripts.”

OLE is short for Object Linking and Embedding. It is <something finnicky> that <dark side coders> use when <who cares> and <something or another> need to <do stuff> together. Trust me. It is on the wiki.

All that this means to me is “stay away from it, might as well switch to VB after all”.


So, how about a more visual, user friendly, programming environment then? A so called IDE (Integrated Developer Environment)? I briefly tried Komodo by Activestate. And for Hello World programmers, it offer nothing really special. A few reasons why you might want to consider it anyway. Maybe a few proggies down the line:
- coloured code (syntax highlighting)
- syntax checking
- syntax prediction (it finishes your sentences, might as well get married, only cheaper)
- project file management
- module/library management
- code sharing with colleagues

You had me at hello, world. <kiss>

Oh, God!
You never said anything about DOS!!! DOS??? Oh, God. I thought we had problems with just your 1’s and 0’s! Well, I guess I figured out the 1’s and 0’s --how hard could it be to remember dos? Actually I took some advice from a suggestion below and downloaded perlexpress. Well, I guess I am a coder now!

My LED Blinks!!

Hello_World.jpg

I haven’t read the whole
I haven’t read the whole thread of comments so if the topic has wandered in a new direction forgive this post. Many, many years ago when I started programming I used VB quite a bit and this site http://www.planet-source-code.com/ came in handy on more than one occasion. The site has tons of sample code and projects for just about anything you might be working on.

Yep, I was refering to the

Yep, I was refering to the perl module that allows for com with bluetooth devices. I ended getting one of those sparkfun bluetooth modules that I’ve only done some early testing with. I hadit connected through one of my bs2 stamps which was serial connected via bt through the hyperterm. The program for it waited for a request(via the pc)to the bs2, it would then send the current temp from the bs2 via the bt connection. It was simple, but it was pretty cool to get it working.

When I was working on the perl implentation via bt serial com in linux, I was doing this on a vm on my windows host. This actually caused some issues with the host machine setup and I actually didn’t realize that it was due to the vm that I was having com issues. When I actually tried playing with it on my laptop that had linux on it as the host machine, I got it to work. I didn’t do too much though after that due to time so it’s been an idle project since. This has however resparked my interest in getting it up and running… I’ll consider doing a writeup on this as it was tricky at first…but maybe I’m just recalling the pita time I had with the vm setup :smiley:

Because you are shining a laser at it, cheater!

It says so right there in the debug window: useless use of a constant in void context. Guess that refers to you?

I’ll get my PC some of that express stuff, so we van talk out of our arses in sync.

Yay! Mine blinks too

hellow_world_pl.png

I now understand that this Perl Express has three tabs: input, code and output. How convenient for a unix-head like me. I'm liking it so far.

I also understand now that your screen show the output, not the code. Good LED blinking effort Chris!

wow…I just took a look at
wow…I just took a look at this since I decided to fiddle with my arduinos tonight…the serial and network libs look pretty slick. Also, this should be very transparent when bluetooth is involved. This is getting my vote to give it a chance CTC.

Basic

Chris-

You said “basic is basic is basic, right?” In a nut shell, false. VB is going to be very differnt than PBasic and RealBasic and QBasic, etc. The syntax will be very similar, in most cases, but whether you are working in an IDE or VBS, things will be totally different.

You said you want to fiddle with serial commands. I assume this means you are looking to interface your PICAXE projects to a PC and ultimately to a desktop or web app… Assuming that is true, VB might be an ok place to start. VB is super high level. It is essentially a hunk of APIs into the Windows OS. If you opt for a non .Net version of VB, you will need 3rd party serial dlls to connect to a serial port. If you go with .Net, I’d reccomend C# or C++. If you want some C# serial connection objects, let me know, Iwrote a few goodies a while back.

Good luck!

I have been uing Visual

I have been uing Visual Basic with microsoft visual studio express edition for quite a while now and my best advice would be: go to your local library and get a good book, there are tons of them out there, and it’s usually free. Internet-recoursses have not been very helpfoul to me in the verry beginning.

microsoft-press usually has a good book on this subject, but there are others too.

Visual studio is great for beginning, bexause by pressing “ctrl” and “space” at the same time you get a scrolldown with a list of every fitting keyword. also the compiler is very exact at giving error-massages, unlike in c++ or assembler, you pretty much exactly get to know where the problem is.

good look with this beautifoul language

 

PS: if you have the latest framework on your pc, VS can divide your Programm into different threads, so it actually takes advantage of modern multi-core CPUs. ( very helpfoul for brute force tasks^^).

 

PPS: I forgot one of the coolest things about vs: If you get the full version ( I know, it’s expensive) you can compile your programm for different processor architectures. You may think " all i need is x86 for my pc, but imagine this: You have a mobile phone with windows mobile edition and bluetoot. Your robot walter could be easilly equipped with a btm222 bluetooth module. now you can code a visual basig programm, compile it for your phone, and actually use it as a remite controll for your robot, isn’t that ever cool? ( I’m planing to do that with my robot)

Compete with PERL how?

The best thing about PERL is it’s ability to execute RegEx super fast. The second best thing about PERL is that it is now a legacy language that few use.

Although I straddle both open an non open source languages, something in the Windows family might pose a better launch pad for a newbie. Documentation is rich within Microsoft. Troubleshooting or seeking expertise within Python or PERLcan be like looking for a needle in a haystack for a beginner.

I would argue that few use

I would argue that few use perl. Rik, myself, I’m sure several others here. There is a strong community and large user base that use it on a professional bases. There are several great things about perl as well, one of them being the ability to execute regest quickly, but that is only one…The libraries(modules), the ease of use, crossplatform, cli scripting, web supported, etc.

 

Who is this “rom”?
Hoi Chris, I got some research done into the whole serial port communications between perl on win32 and a picaxe. I pulled it off, kinda. Click here. If you dare to continue this adventure.

Quick Code Question

So I am trying a simple serial test with processing now and well, my picaxe is not talking to my computer. I am sure the picaxe is spitting out the correct 1 and 0 as needed by the processing code -I have checked the output via the picaxe software. Now I am a little confused as to where to change the com number in the processing code. I am using the “picaxe brand” serial/USB adapter and prefer to plug it into com15. I modified what I thought I needed to in the code and got an error message when I did. Something about “out of bounds”. I plugged into a different USB and it turns out it was com9. Again, I changed what I thought I needed to in the code and the error message did not pop-up. However, the picaxe and the computer still will not have a conversation. I am also pretty sure I have the 9600 baud, stop bits, parity etc. are correct on both sides. --Here is the code with the part I changed highlighted… Any thoughts?

import processing.serial.*;

Serial myPort; // Create object from Serial class
int val; // Data received from the serial port

void setup()
{
size(200, 200);
// I know that the first port in the serial list on my mac
// is always my FTDI adaptor, so I open Serial.list()[0].
// On Windows machines, this generally opens COM1.
// Open whatever port is the one you’re using.
String portName = Serial.list()[9];
myPort = new Serial(this, portName, 9600);
}

void draw()
{
if ( myPort.available() > 0) { // If data is available,
val = myPort.read(); // read it and store it in val
}
background(255); // Set background to white
if (val == 0) { // If the serial value is 0,
fill(0); // set fill to black
}
else { // If the serial value is not 0,
fill(204); // set fill to light gray
}
rect(50, 50, 100, 100);
}


Great choice

Im working with processing at the moment and i love it :smiley:

This line is just listing all the serial ports available , you can comment it out, its not needed.


String portName = Serial.list()[9];

this is the lime you need to edit and you put “COM3” for example if its com port 3:
myPort = new Serial(this, “COM3”, 9600);

I assume you are using windows, it maybe different on other operating systems.

Also if you look at the code for my cat laser project it has an example in there of serial comms using processing, if you want i can cut the code down so its only the serial part.

Good choice on processing btw, its the easiest route to java.


Got it!!
I had tried com15 when I needed “com15”. The lack of the ""s got me. Thanks bunches, my picaxe is officially talking to my computer! Woo-hoo! I have serial (0) and serial (1) coming from my picaxe and a nice, little square blinking grey and black! I think my next step is to start learning how varialbes are dealt with and from there start using print to read some values spitting out of the picaxe. I guess I am going to try to mimic picaxe’s “debug”. Hell yeah!

Good to hear man

Theres loads out there to help with pretty much anything you want to do, the processing site is great and has laods of examples of things.

 

I’ve kinda lost the plot
I’ve kinda lost the plot here Chris. You are using Processing on your PC and PicAxe Basic on your Pic, and the two are talking via serial (or USB)? You are not writing programs in Processing and downloading them to a PIC to run?