Welcome! Log In Create A New Profile


Help for a newbie

Posted by bazwilson 
Help for a newbie
May 22, 2014 11:14PM
I have only just started playing with a BP2

I loaded rookie Ok and was playing with the ADC all was ok

then the function adc_init(2) and ADC_GET(2) no longer work turning function does not exist

Do I need to erase and reinstall rookie? and if so how do I erase it

Re: Help for a newbie
May 23, 2014 06:41AM
adc_init(n) is part of rookie and so if it is not there then, yes rookie has been erased from Flash; some tips:

This will indicate the number of saves to flash, for BP2, rookie takes up 2 saves
This will clear all of the saves so rookie can be installed again
For the BP2 you can take advantage of using an SD card to load and save rookie as follows:

Manual Option:
save MX3_rookie.bas and bv513_rookie.bas to an SD Card, put the card into the BP2 and then:

Automatic Option: This will check for the presence of rookie and load it if not there:
Save the rookie files as above and create main.bas with the following contents:
function main()
    print "\nChecking MX3_rookie.bas"
    if lookup("VERSION$") = 0 then
        print "\n** Loading MX3_rookie.bas **"
    print "\nbv513_rookie.bas"
    if lookup("RTS") = 0 then
        print "\n** Loading MX3_rookie.bas **"
There should now be 3 files on the SD Card, MX3_rookie.bas, bv513_rookie.bas and main.bas. The last file 'main.bas' is special in that it will run any time the BP2 is reset. If rookie is already in flash then it will not be loaded again. Installing rookie using this method only takes a couple of seconds so don't think it hasn't worked. I have not actually tested this code so there may be some minor errors. There is a comprehensive example of automatic loading and using the SD Card in the software on the zip file for the Wi-Fi shield
Sorry, you do not have permission to post/reply in this forum.