C++ and Serial.cpp

slimplynth

Senior Member
Hello, been a while but I've been searching/reading. I'm currently on with a c++ evening class. I want to make it relevant to something i already (partly) understand. I want to receive serial data from a picaxe using c++ but the web is devoid of a simple picaxe example. (Ive got the serial.cpp and .h files for arduino.. the settings look compatible with picaxe.. does anyone have any examples? Thanks.
 
Last edited:

Technical

Technical Support
Staff member
If you have a C++ example already just edit it to the COM port you want to use and then set to 4800,n,8,1 (or 9600,n,8,1 for X2 parts) and then run this in your PICAXE

Code:
do
sertxd("Counter=",#b1,cr,lf)
inc b1
pause 500
loop
 

slimplynth

Senior Member
Thanks Technical.. what i was hoping for was a console cpp example for displaying serial output from a picaxe, using the serial.cpp and serial.h files..
 

grim_reaper

Senior Member
What development environment are you using? When you mentioned 'console' I assume you are using C++ with .NET?

There is a basic example on this Arduino page which could easily be modified for PICAXE.
 

slimplynth

Senior Member
Hi Grim Visual Studio 2015.. the course ive started is a beginners course.. All assignments are limited to the windows console applications.. thanks for the link.. i should have read it properly the first time, there is a main cpp at the bottom, below the instructions for the CLR windows form..thankyou.
 

grim_reaper

Senior Member
No problem slimplyth. I'm still stuck on Visual Studio 2013, because I'm too tight to pay for a new license for 2015! I've also been using VB rather that C/C++/C# for nearly 20 years now, so that's ingrained in me too.

Hopefully your course will help get the language basics under your belt, along with the principles of object based coding, then you can just add windows and other fancy things to your serial application. Good luck with it!
 
Top