uXe
October 30, 2017, 11:17am
1
Are there equivalents of the Arduino delay() and millis() functions that we can use with the Pokitto?
I found pokWaitms() and pokGetTime() here:
/**************************************************************************/
/*!
@file PokittoTimer.h
@author Jonne Valola
@section LICENSE
Software License Agreement (BSD License)
Copyright (c) 2016, Jonne Valola
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. Neither the name of the copyright holders nor the
This file has been truncated. show original
but only got errors trying to use them:
Error: Undefined symbol pokGetTime() (referred from main.LPC11U68.o).
Error: Undefined symbol pokWaitms(unsigned short) (referred from main.LPC11U68.o).
1 Like
There are two function in core library and they are both public functions
static uint32_t getTime();
static void wait(uint16_t);
/**************************************************************************/
/*!
@file PokittoCore.h
@author Jonne Valola
@section LICENSE
Software License Agreement (BSD License)
Copyright (c) 2016, Jonne Valola
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. Neither the name of the copyright holders nor the
This file has been truncated. show original
1 Like
spinal
October 30, 2017, 11:57am
4
I’ve been using the following to add a delay to my main loop…
// timing loop
while(game.getTime()-tempTime < myDelay){
refreshDisplay();
};
tempTime = game.getTime();
I didn’t realize there was a wait() function
2 Likes
Once upon a time I started to write keyboard function for pokitto. After 1 hour I found pokitto already have keyboard function in core library
2 Likes
spinal:
I’ve been using the following to add a delay to my main loop…
// timing loop
while(game.getTime()-tempTime < myDelay){
refreshDisplay();
};
tempTime = game.getTime();
I didn’t realize there was a wait() function
I’m still using the same. Found some problem to add correct reference to use wait.